-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathlegacy.js
More file actions
58 lines (57 loc) · 1.46 KB
/
legacy.js
File metadata and controls
58 lines (57 loc) · 1.46 KB
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
// @ts-check
import airbnbRules from './airbnb-rules.json' with { type: 'json' };
import cjsFilesRules from './overrides/cjs-files.js';
import tsFilesRules from './overrides/ts-files.js';
import rules from './rules.json' with { type: 'json' };
import settings from './settings.json' with { type: 'json' };
// @ts-expect-error What it needs idk
/** @type {import('eslint-define-config').ESLintConfig} */
export default {
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module'
},
env: {
es2015: true,
es2020: true
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@eslint-community/eslint-plugin-eslint-comments/recommended',
'plugin:promise/recommended',
'prettier',
'plugin:import-x/recommended',
'plugin:import-x/typescript'
],
plugins: [
'@typescript-eslint',
'promise',
'optimize-regex',
'no-secrets',
'import-x'
],
rules: {
...airbnbRules,
...rules,
'no-secrets/no-secrets': 'error',
'import-x/no-unresolved': 'error'
},
overrides: [
{
// enable the rule specifically for TypeScript files
files: ['*.ts'],
extends: ['plugin:@typescript-eslint/strict-type-checked'],
rules: tsFilesRules[0].rules
},
{
files: ['*.js', '*.jsx', '*.mjs', '*.cjs'],
extends: ['plugin:@typescript-eslint/disable-type-checked']
},
{
files: ['*.cjs'],
rules: cjsFilesRules[0].rules
}
],
settings
};