-
Notifications
You must be signed in to change notification settings - Fork 4
/
.eslintrc.cjs
70 lines (66 loc) · 1.77 KB
/
.eslintrc.cjs
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
module.exports = {
$schema: 'https://json.schemastore.org/eslintrc',
root: true,
parser: '@typescript-eslint/parser',
extends: [
'plugin:prettier/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'plugin:@typescript-eslint/recommended',
],
plugins: ['simple-import-sort', 'import'],
parserOptions: {
ecmaVersion: 2018,
ecmaFeatures: { jsx: true },
sourceType: 'module',
},
ignorePatterns: ['dist/', 'node_modules/', '.next'],
rules: {
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'no-unused-vars': 'off',
'simple-import-sort/imports': [
'error',
{
groups: [
['^\\u0000'],
['^node:', '^@?\\w'], // packages
['^'],
['^\\.'], // relative
],
},
],
'simple-import-sort/exports': 'error',
'sort-imports': 'off',
'import/order': 'off',
'import/no-unresolved': 'off',
'import/first': 'error',
'import/newline-after-import': 'error',
'import/no-duplicates': 'error',
'import/no-useless-path-segments': 'error',
'import/no-named-as-default': 'off',
'prettier/prettier': [
'error',
{
semi: true,
trailingComma: 'all',
singleQuote: true,
printWidth: 120,
tabWidth: 2,
arrowParens: 'avoid',
bracketSameLine: false,
},
],
'no-console': [
'error',
{
allow: ['debug', 'error'],
},
],
},
};