Skip to content

Commit

Permalink
Add(ESLint): ESLint configuration for React
Browse files Browse the repository at this point in the history
  • Loading branch information
1aron committed Nov 27, 2024
1 parent caf3729 commit 428c6d4
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions packages/eslint-config/configs/react.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const reactPlugin = require('eslint-plugin-react')
const reactHooksPlugin = require('eslint-plugin-react-hooks')

/** @type {import('eslint').Linter.Config} */
module.exports = {
...reactPlugin.configs.flat.recommended,
rules: {
...reactPlugin.configs['jsx-runtime'].rules,
...reactHooksPlugin.configs.recommended.rules,
'react/display-name': 'off'
},
plugins: {
'react': reactPlugin,
'react-hooks': reactHooksPlugin,
},
files: ['**/*.{js,mjs,cjs,jsx,mjsx,ts,tsx,mtsx}'],
}

0 comments on commit 428c6d4

Please sign in to comment.