Skip to content

Commit

Permalink
Use eslint-disable-next-line for erring rules
Browse files Browse the repository at this point in the history
  • Loading branch information
chitoku-k committed Sep 28, 2024
1 parent e6dae7d commit ed4253f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions gatsby-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@ export const onCreateWebpackConfig: GatsbyNode['onCreateWebpackConfig'] = ({
})

if (stage === 'build-javascript') {
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
const config: Configuration = getConfig()
if (config.optimization) {
config.optimization.minimizer = [
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
plugins.minifyJs({
extractComments: false,
}),
Expand Down
3 changes: 2 additions & 1 deletion plugins/historia-taxonomy-plugin/gatsby-node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,14 @@ export const createPages: GatsbyNode['createPages'] = async ({

const isPluginObject = (plugin: PluginRef): plugin is IPluginRefObject => typeof plugin === 'object'

/* eslint-disable @typescript-eslint/no-shadow */
export const createResolvers: GatsbyNode['createResolvers'] = ({
// eslint-disable-next-line @typescript-eslint/no-shadow
createResolvers,
}: CreateResolversArgs): void => {
const plugin = config.plugins?.filter(isPluginObject).find(p => p.resolve === 'gatsby-transformer-remark')
const excerptSeparator = plugin?.options?.excerpt_separator as string | undefined

// eslint-disable-next-line @typescript-eslint/no-unsafe-call
createResolvers({
CategoriesYaml: {
articles: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/PspSdkFunction/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ const PspSdkFunction: FunctionComponent<PspSdkFunctionProps> = ({
');',
].join(separator), Prism.languages.c, 'c')

/* eslint-disable react/no-danger */
return (
<div className={styles.entry}>
<pre className={clsx(styles.prototype, 'language-c')}>
{/* eslint-disable-next-line react/no-danger */}
<code className="language-c" dangerouslySetInnerHTML={{ __html: highlighted }} />
</pre>
<div className={styles.description}>
Expand Down
2 changes: 1 addition & 1 deletion src/components/PspSdkMacro/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ const PspSdkMacro: FunctionComponent<PspSdkMacroProps> = ({
');',
].join(separator), Prism.languages.c, 'c')

/* eslint-disable react/no-danger */
return (
<div className={styles.entry}>
<pre className={clsx(styles.prototype, 'language-c')}>
{/* eslint-disable-next-line react/no-danger */}
<code className="language-c" dangerouslySetInnerHTML={{ __html: highlighted }} />
</pre>
<div className={styles.description}>
Expand Down

0 comments on commit ed4253f

Please sign in to comment.