-
Notifications
You must be signed in to change notification settings - Fork 784
/
.eslintrc.cjs
109 lines (109 loc) · 3.21 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
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
109
module.exports = {
extends: [
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'plugin:react/all',
'standard',
'prettier',
],
settings: {
'import/resolver': { typescript: null },
react: { version: '16' },
},
env: {
commonjs: true,
es6: true,
node: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
ecmaVersion: 2020,
},
plugins: ['@typescript-eslint', 'eslint-plugin-tsdoc', 'markdown'],
globals: {
globalThis: false,
},
rules: {
'linebreak-style': ['error', 'unix'],
'lines-between-class-members': 'off',
'no-caller': 'error',
'no-console': 'off',
'no-empty': 'off',
'no-prototype-builtins': 'off',
'no-shadow': 'error',
'no-useless-constructor': 'off',
'no-var': 'error',
'import/no-extraneous-dependencies': ['error', { devDependencies: false }],
'import/order': [
'error',
{
alphabetize: { order: 'asc', caseInsensitive: true },
'newlines-between': 'always',
groups: ['builtin', 'external', 'internal', 'parent', 'index', 'sibling'],
pathGroups: [{ pattern: '@interactjs/**', group: 'internal' }],
},
],
'operator-linebreak': 'off',
'prefer-arrow-callback': ['error', { allowNamedFunctions: true }],
'prefer-const': 'error',
'standard/array-bracket-even-spacing': 'off',
'standard/computed-property-even-spacing': 'off',
'standard/object-curly-even-spacing': 'off',
'tsdoc/syntax': 'warn',
'@typescript-eslint/array-type': ['error', { default: 'array-simple' }],
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/member-accessibility': 'off',
'@typescript-eslint/no-empty-interface': 'error',
'@typescript-eslint/no-inferrable-types': 'error',
'@typescript-eslint/no-use-before-define': 'off',
},
overrides: [
{
files: '*.{ts{,x},vue}',
rules: {
'import/named': 'off',
'import/no-named-as-default': 'off',
'import/no-unresolved': 'off',
'no-redeclare': 'off',
'no-shadow': 'off',
'no-undef': 'off',
'no-unused-vars': 'off',
'no-use-before-define': 'off',
},
},
{
files: '{,.md/}*.vue',
extends: ['plugin:vue/vue3-essential'],
parserOptions: { parser: '@typescript-eslint/parser' },
},
{
files: '*.spec.ts',
extends: ['plugin:jest/recommended', 'plugin:jest/style'],
rules: {
'array-bracket-spacing': 'off',
'import/no-extraneous-dependencies': 'off',
'jest/consistent-test-it': ['error', { fn: 'test' }],
},
},
{ files: '**/*.md', processor: 'markdown/markdown' },
{
files: '**/*.md/*.{{ts,js}{,x},vue}',
rules: {
'arrow-parens': 'off',
'import/no-named-as-default': 'off',
'import/no-unresolved': 'off',
'no-console': 'off',
'no-redeclare': 'off',
'no-shadow': 'off',
'no-undef': 'off',
'no-unused-vars': 'off',
'no-use-before-define': 'off',
'no-var': 'off',
'prefer-arrow-callback': 'off',
},
},
],
}