feat[react]: Linting with eslint 9
This commit is contained in:
parent
14eab04d5b
commit
f69093b0dc
99 changed files with 1260 additions and 956 deletions
30
packages/react/eslint.config.mjs
Normal file
30
packages/react/eslint.config.mjs
Normal file
|
@ -0,0 +1,30 @@
|
|||
import js from '@eslint/js'
|
||||
import globals from 'globals'
|
||||
import pluginReact from 'eslint-plugin-react'
|
||||
import { defineConfig } from 'eslint/config'
|
||||
|
||||
export default defineConfig([
|
||||
{
|
||||
files: ['**/*.{js,mjs,cjs,jsx}'],
|
||||
plugins: { js },
|
||||
extends: ['js/recommended'],
|
||||
},
|
||||
{
|
||||
files: ['**/*.{js,mjs,cjs,jsx}'],
|
||||
languageOptions: { globals: { ...globals.browser, ...globals.node } },
|
||||
},
|
||||
{
|
||||
plugins: pluginReact.configs.flat.recommended.plugins,
|
||||
languageOptions: pluginReact.configs.flat.recommended.languageOptions,
|
||||
rules: {
|
||||
...pluginReact.configs.flat.recommended.rules,
|
||||
// Maybe one day someone wants to do this, but we use jsdoc for now
|
||||
'react/prop-types': 0,
|
||||
},
|
||||
settings: {
|
||||
react: {
|
||||
version: 'detect',
|
||||
},
|
||||
},
|
||||
},
|
||||
])
|
Loading…
Add table
Add a link
Reference in a new issue