Skip to content
Discussion options

You must be logged in to vote

Hmm, it worked for me for TS and TSX files. Might be that it's missing the matcher?

We could maybe put the React and Next stuff into one object and add files: ['**/*.ts', '**/*.tsx'], to it.

Something like this:

export default [
  {
    files: ['**/*.ts', '**/*.tsx'],
    plugins: {
      react: reactPlugin,
      'react-hooks': hooksPlugin,
      '@next/next': nextPlugin,
    },
    rules: {
      ...reactPlugin.configs['jsx-runtime'].rules,
      ...hooksPlugin.configs.recommended.rules,
      ...nextPlugin.configs.recommended.rules,
      ...nextPlugin.configs['core-web-vitals'].rules,
      '@next/next/no-img-element': 'error',
    },
  },
  ... rest of your config
]

And yes, sorry, …

Replies: 9 comments 26 replies

Comment options

You must be logged in to vote
9 replies
@ryancwalsh
Comment options

@milos-sikic-nimbus-tech
Comment options

Answer selected by ryancwalsh
@ryancwalsh
Comment options

@milos-sikic-nimbus-tech
Comment options

@ryancwalsh
Comment options

@nyxb
Comment options

Comment options

You must be logged in to vote
1 reply
@ryancwalsh
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
9 replies
@dir
Comment options

@jkaleshi14
Comment options

@r34son
Comment options

@dir
Comment options

@timtucker-dte
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@mdillgen
Comment options

@bdlowery
Comment options

@isaacbowen
Comment options

Comment options

You must be logged in to vote
2 replies
@ya2s
Comment options

@SukkaW
Comment options

Comment options

You must be logged in to vote
2 replies
@quanghuynt14
Comment options

@ShueiYang
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet