/
.eslintrc.cjs
92 lines (90 loc) · 2.35 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
// eslint-disable-next-line no-undef
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
ecmaVersion: 2022,
project: [
'./packages/*/tsconfig.json',
'./packages/*/test/tsconfig.json',
'./tsconfig.eslint.json',
],
},
plugins: ['@typescript-eslint', 'import', 'prettier', 'filenames'],
extends: [
'eslint:recommended',
'plugin:prettier/recommended',
'prettier',
'plugin:@typescript-eslint/recommended',
'plugin:import/typescript',
'plugin:import/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
],
overrides: [
{
files: ['./packages/*/test/**/*.ts'],
rules: {
"import/no-extraneous-dependencies": ['off']
}
},
],
rules: {
curly: 'error',
'import/no-default-export': 'error',
'import/no-duplicates': 'error',
'import/no-extraneous-dependencies': 'error',
'import/no-unassigned-import': 'error',
'import/no-unresolved': 'off',
'import/namespace': 'off',
'import/named': 'off',
'import/order': [
'error',
{
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object', 'type'],
},
],
'prettier/prettier': [
'error',
{
printWidth: 100,
singleQuote: true,
trailingComma: 'es5',
},
{
usePrettierrc: false,
},
],
'@typescript-eslint/restrict-template-expressions': ['off'],
'@typescript-eslint/no-use-before-define': [
'error',
{
functions: false,
},
],
'@typescript-eslint/interface-name-prefix': ['off'],
'@typescript-eslint/explicit-function-return-type': [
'error',
{
allowExpressions: true,
allowTypedFunctionExpressions: true,
allowHigherOrderFunctions: true,
},
],
'@typescript-eslint/no-non-null-assertion': ['off'],
'@typescript-eslint/no-inferrable-types': ['off'],
'@typescript-eslint/no-unused-vars': ['error', { varsIgnorePattern: '_' }],
},
ignorePatterns: [
'dist',
'node_modules',
'fixtures',
'*.config.*',
'release.js',
'.eslintrc.cjs',
'packages/test-support/scripts/setup-fixtures.js',
'packages/migrate/scripts/*.js',
'scripts/*.mjs',
'packages/codefixes/src/*.generated.ts',
],
};