Skip to content
77 changes: 39 additions & 38 deletions react-app/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,42 +1,43 @@
import js from '@eslint/js';
import react from 'eslint-plugin-react';
import reactHooks from 'eslint-plugin-react-hooks';

export default [
js.configs.recommended,
{
"extends": [
"eslint:recommended",
"plugin:import/errors",
"plugin:react/recommended",
"plugin:jsx-a11y/recommended",
"prettier",
"airbnb"
],
"rules": {
"react/prop-types": 0,
"jsx-a11y/label-has-for": 0,
"jsx-a11y/anchor-is-valid": 0,
"jsx-a11y/click-events-have-key-events": 0,
"no-console": 1,
"quotes": [
2,
"single",
{
"avoidEscape": true,
"allowTemplateLiterals": true
}
]
files: ['**/*.{js,jsx}'],
plugins: {
react,
'react-hooks': reactHooks,
},
"plugins": ["react", "import", "jsx-a11y"],
"parser": "react-scripts/node_modules/babel-eslint",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
globals: {
window: 'readonly',
document: 'readonly',
console: 'readonly',
process: 'readonly',
},
},
"env": {
"es6": true,
"browser": true,
"node": true
}
}

]
settings: {
react: {
version: 'detect',
},
},
rules: {
'react/prop-types': 'off',
'react/react-in-jsx-scope': 'off',
'no-console': 'warn',
'quotes': ['error', 'single', { avoidEscape: true, allowTemplateLiterals: true }],
'no-unused-vars': 'warn',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn',
},
},
];
Loading