-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint.config.mjs
54 lines (52 loc) · 1.17 KB
/
eslint.config.mjs
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
import path from 'node:path';
import afc from '@antfu/eslint-config';
export default afc({
/* Files */
ignores: ['docs/*'],
gitignore: { files: path.join(import.meta.dirname, '.gitignore') },
/* Languages & Features */
javascript: true,
typescript: true,
jsx: true,
yaml: true,
jsonc: true,
markdown: true,
/* Frameworks & Libraries */
test: true,
react: false,
stylistic: false
}).then((opts) => [
...opts,
{
rules: {
/* ROOT */
'prefer-template': 0,
'no-console': 1,
'no-warning-comments': [
1,
{ terms: ['fixme', 'todo', 'refactor', 'xxx'] }
],
/* Import */
'import/order': [
2,
{
groups: [
...['builtin', 'external'],
...['internal', 'parent', 'sibling', 'index']
],
pathGroups: [{ pattern: '@/**', group: 'internal' }]
}
],
/* JSONC */
'jsonc/sort-keys': 0,
/* Typescript */
'ts/no-redeclare': 0,
'ts/no-namespace': [
2,
{ allowDeclarations: true, allowDefinitionFiles: true }
],
/* Test */
'test/consistent-test-it': [2, { fn: 'test' }]
}
}
]);