Skip to content

Commit fed98cb

Browse files
committed
ad linters
1 parent 3758103 commit fed98cb

File tree

4 files changed

+354
-70
lines changed

4 files changed

+354
-70
lines changed

.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
build/

.eslintrc.js

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
//eslint-disable-next-line
2+
module.exports = {
3+
parser: '@babel/eslint-parser', // Use if you're using Babel for JSX and ES6 features
4+
parserOptions: {
5+
ecmaVersion: 2015, // Set to 2015 or a higher version
6+
sourceType: 'module',
7+
ecmaFeatures: {
8+
jsx: true,
9+
},
10+
},
11+
plugins: ['react', 'react-hooks', 'jsx-a11y', 'import'],
12+
"settings": {
13+
"react": {
14+
"version": "18" // Replace with your React version
15+
},
16+
},
17+
"env": {
18+
"browser": true
19+
},
20+
extends: ['eslint:recommended', 'plugin:react/recommended', 'plugin:jsx-a11y/recommended'],
21+
rules: {
22+
// Add your custom rules here
23+
'react/jsx-filename-extension': ['error', { extensions: ['.js', '.jsx'] }],
24+
'react-hooks/rules-of-hooks': 'error',
25+
'react-hooks/exhaustive-deps': 'warn',
26+
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
27+
"jsx-a11y/no-static-element-interactions": "off",
28+
"jsx-a11y/click-events-have-key-events": "off",
29+
"jsx-a11y/anchor-is-valid": "off",
30+
"jsx-a11y/label-has-associated-control": "off",
31+
// ... other rules
32+
},
33+
};
34+
35+

0 commit comments

Comments
 (0)