-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
30 lines (30 loc) · 990 Bytes
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
module.exports = {
env: {
browser: true,
es2020: true,
},
extends: [
'plugin:react/recommended',
'airbnb',
],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 11,
sourceType: 'module',
},
plugins: [
'react',
],
rules: {
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }], // Support for JSX in JS ( in index.js )
'no-param-reassign': 0, // Changed the parameter directly
'max-len': 0, // Max Line Length
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }], // Allow i++ in loops
'brace-style': ['error', 'stroustrup', { allowSingleLine: true }], // Allow if/else in single line
'jsx-a11y/no-onchange': 0, // Allow onChange (instead of onBlur)
'no-nested-ternary': 0, // Allow nested ternary
'import/no-extraneous-dependencies': ['error', { devDependencies: ['**/*.test.js', '**/*.spec.js', '**/*.test.jsx', '**/*setupTests.js'] }], // For JEST/Enzyme
},
};