-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
128 lines (127 loc) · 2.93 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
module.exports = {
overrides: [
{
files: ["**/*.mjs", "*.mjs"], env: {
node: true,
es2021: true,
},
parserOptions: {
ecmaVersion: 'latest',
sourceType: "module",
},
},
{
files: ["**/*.astro", "*.astro"],
plugins: ["astro", "import"],
env: {
node: true,
"astro/astro": true,
es2021: true,
},
parser: "astro-eslint-parser",
parserOptions: {
parser: "@typescript-eslint/parser",
extraFileExtensions: [".astro"],
ecmaVersion: 'latest',
sourceType: "module",
},
rules: {
"astro/no-conflict-set-directives": "error",
"astro/no-unused-define-vars-in-style": "error",
'no-param-reassign': 0,
'no-restricted-syntax': 0,
'no-irregular-whitespace': 0,
"no-tabs": 0,
'sort-keys': [1, 'asc', { natural: true, allowLineSeparatedGroups: true }],
'import/order': 0,
'import/extensions': 0,
'import/no-extraneous-dependencies': 0,
'import/prefer-default-export': 0,
'import/export': 0,
'import/order': [
2,
{
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
'newlines-between': 'always',
pathGroups: [
{
pattern: '@/**',
group: 'internal',
},
],
alphabetize: {
order: 'asc',
},
},
],
},
},
{
files: ["**/*.astro/*.js", "*.astro/*.js, **/*.js", "*.js"],
env: {
browser: true,
es2021: true,
},
parserOptions: {
ecmaVersion: 'latest',
sourceType: "module",
},
rules: {
"prettier/prettier": "off",
},
},
{
files: ["**/*.astro/*.ts", "*.astro/*.ts", "**/*.ts", "*.ts"],
env: {
browser: true,
es2021: true,
},
parser: "@typescript-eslint/parser",
parserOptions: {
project: "./tsconfig.json",
ecmaVersion: 'latest',
sourceType: 'module',
},
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'prettier',
],
rules: {
"prettier/prettier": "off",
'@typescript-eslint/no-shadow': 0,
'@typescript-eslint/consistent-type-imports': [
'error',
{ prefer: 'type-imports', disallowTypeAnnotations: false }
],
'no-param-reassign': 0,
'no-restricted-syntax': 0,
'no-irregular-whitespace': 0,
"lines-between-class-members": ["error", "never"],
'@typescript-eslint/no-loop-func': 0,
'sort-keys': [1, 'asc', { natural: true, allowLineSeparatedGroups: true }],
'import/order': 0,
'import/extensions': 0,
'import/no-extraneous-dependencies': 0,
'import/prefer-default-export': 0,
'import/export': 0,
'import/order': [
2,
{
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
'newlines-between': 'always',
pathGroups: [
{
pattern: '@/**',
group: 'internal',
},
],
alphabetize: {
order: 'asc',
},
},
],
},
},
],
}