-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlegacy.cjs
56 lines (55 loc) · 1.33 KB
/
legacy.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
// @ts-check
const airbnbRules = require('./airbnb-rules.cjs');
const rules = require('./rules.cjs');
const tsFilesRules = require('./overrides/ts-files.cjs');
const cjsFilesRules = require('./overrides/cjs-files.cjs');
const settings = require('./settings.cjs');
// @ts-expect-error What it needs idk
/** @type {import('eslint-define-config').ESLintConfig} */
module.exports = {
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module'
},
env: {
es2015: true,
es2020: true
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@eslint-community/eslint-comments/recommended',
'plugin:promise/recommended',
'prettier',
'plugin:import-x/recommended',
'plugin:import-x/typescript'
],
plugins: [
'@typescript-eslint',
'@stylistic',
'promise',
'optimize-regex',
'no-secrets'
],
rules: {
...airbnbRules,
...rules
},
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
};