-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
108 lines (108 loc) · 3.21 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
module.exports = {
plugins: ['simple-import-sort', 'unused-imports', 'prettier'],
extends: ['eslint:recommended', 'next', 'next/core-web-vitals', 'prettier', 'airbnb'],
rules: {
semi: [2, 'never'],
'no-unused-vars': 'off',
'react/no-unescaped-entities': 'off',
'react/display-name': 'off',
'react/jsx-curly-brace-presence': ['error', { props: 'never', children: 'never' }],
'import/no-extraneous-dependencies': 'off',
'react/prop-types': 'off',
'react/jsx-props-no-spreading': 'off',
'react/jsx-no-useless-fragment': 'off',
'react/jsx-one-expression-per-line': 'off',
'react/jsx-wrap-multilines': 'off',
'react/no-array-index-key': 'off',
'global-require': 'off',
'jsx-quotes': ['error', 'prefer-single'],
'jsx-a11y/click-events-have-key-events': 'off',
'jsx-a11y/no-static-element-interactions': 'off',
'import/extensions': 'off',
'import/prefer-default-export': 'off',
'import/no-unresolved': 'off',
'unused-imports/no-unused-imports': 'error',
'unused-imports/no-unused-vars': [
'error',
{
vars: 'all',
varsIgnorePattern: '^_',
args: 'after-used',
argsIgnorePattern: '^_',
},
],
'simple-import-sort/exports': 'error',
'simple-import-sort/imports': [
'error',
{
groups: [
// ext library & side effect imports
['^@?\\w', '^\\u0000'],
// {s}css files
['^.+\\.s?css$'],
// Other imports
['^@/'],
// Other imports
['^~/'],
// relative paths up until 3 level
[
'^\\./?$',
'^\\.(?!/?$)',
'^\\.\\./?$',
'^\\.\\.(?!/?$)',
'^\\.\\./\\.\\./?$',
'^\\.\\./\\.\\.(?!/?$)',
'^\\.\\./\\.\\./\\.\\./?$',
'^\\.\\./\\.\\./\\.\\.(?!/?$)',
],
// other that didnt fit in
['^'],
],
},
],
'import/first': 'error',
'import/newline-after-import': 'error',
'import/no-duplicates': 'error',
indent: 'off',
'linebreak-style': ['error', 'unix'],
'max-len': [2, { code: 120, ignoreComments: true, ignoreStrings: true }],
'no-await-in-loop': 'off',
'no-underscore-dangle': 'off',
'no-plusplus': 'off',
'no-console': 'off',
'no-return-await': 'off',
'no-param-reassign': 'off',
'no-confusing-arrow': 'off',
'no-nested-ternary': 'off',
'no-template-curly-in-string': 'off',
'no-restricted-globals': 'off',
'no-restricted-syntax': 'off',
'jsx-a11y/label-has-associated-control': 'off',
'jsx-a11y/no-autofocus': 'off',
'object-curly-newline': 'off',
'operator-linebreak': 'off',
'no-return-assign': 'off',
'arrow-parens': 'off',
'consistent-return': 'off',
'implicit-arrow-linebreak': 'off',
'function-paren-newline': 'off',
'prettier/prettier': [
'error',
{
semi: false,
tabWidth: 2,
printWidth: 120,
singleQuote: true,
jsxSingleQuote: true,
trailingComma: 'all',
bracketSpacing: true,
plugins: ['prettier-plugin-tailwindcss'],
},
],
camelcase: [0],
},
globals: {
React: true,
JSX: true,
},
}