This repository was archived by the owner on Feb 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
85 lines (85 loc) · 2.26 KB
/
.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
module.exports = {
root: true,
parser: '@babel/eslint-parser',
parserOptions: {
babelOptions: {
presets: ['@babel/preset-react'],
},
},
env: {
browser: true,
es2020: true,
node: true,
},
plugins: ['react'],
ignorePatterns: ['**/*.min.js'],
overrides: [
{
files: ['**/*.{js,jsx}'],
rules: {
'react/prop-types': 'off',
},
},
],
extends: ['airbnb', 'airbnb/hooks', 'plugin:@next/next/recommended'],
rules: {
'react/jsx-indent': [
'error',
2,
{ checkAttributes: true, indentLogicalExpressions: true },
],
'object-curly-newline': [
'error',
{ minProperties: 5, multiline: true, consistent: true },
],
'import/order': [
'error',
{
alphabetize: { order: 'asc' },
groups: [
['builtin', 'external'],
'internal',
'parent',
'sibling',
'index',
],
'newlines-between': 'never',
},
],
// 'react/sort-prop-types': ['error', { requiredFirst: true, sortShapeProp: true }],
'import/no-extraneous-dependencies': 'off',
'nonblock-statement-body-position': 'off',
curly: 'off',
'max-len': 'off',
'no-nested-ternary': 'off',
'no-restricted-syntax': 'off',
'arrow-body-style': 'off',
'react/no-array-index-key': 'off',
'no-plusplus': 'off',
'consistent-return': 'off',
'newline-per-chained-call': 'off',
'default-case': 'off',
'no-underscore-dangle': 'off',
'react/jsx-props-no-spreading': 'off',
'no-alert': 'off',
'no-else-return': 'off',
'jsx-a11y/label-has-associated-control': 'off',
'react/jsx-one-expression-per-line': 'off',
'react/no-unused-prop-types': 'error',
'no-param-reassign': 'off',
'react/no-unescaped-entities': 'off',
'no-console': 'off',
'react/require-default-props': 'off',
'react/jsx-filename-extension': 'off',
'no-shadow': 'off',
'global-require': 'off',
'react/forbid-prop-types': 'off',
'func-names': 'off',
'@next/next/no-sync-scripts': 'off',
'@next/next/no-img-element': 'off',
'jsx-a11y/anchor-is-valid': 'off',
'no-promise-executor-return': 'off',
'default-param-last': 'off',
'react/no-unstable-nested-components': 'off',
},
};