-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
flat.cjs
52 lines (51 loc) · 1.5 KB
/
flat.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
// @ts-expect-error It does not have typings
const comments = require('@eslint-community/eslint-plugin-eslint-comments/configs');
// @ts-check
const eslintJs = require('@eslint/js');
const eslintConfigPrettier = require('eslint-config-prettier');
const globals = require('globals');
const tseslint = require('typescript-eslint');
const stylistic = require('@stylistic/eslint-plugin');
const airbnbRules = require('./airbnb-rules.cjs');
const rules = require('./rules.cjs');
const cjsFiles = require('./overrides/cjs-files.cjs');
const tsFiles = require('./overrides/ts-files.cjs');
const importX = require('./plugins/import-x.cjs');
const noSecrets = require('./plugins/no-secrets.cjs');
const optimizeRegEx = require('./plugins/optimize-regex.cjs');
const promise = require('./plugins/promise.cjs');
const settings = require('./settings.cjs');
module.exports = tseslint.config(
eslintJs.configs.recommended,
...tseslint.configs.recommended,
comments.recommended,
...promise,
eslintConfigPrettier,
...importX,
...noSecrets,
...optimizeRegEx,
{
name: 'eslint-config-airlight-base',
plugins: {
'@typescript-eslint': tseslint.plugin,
// @ts-expect-error No typings yet?
'@stylistic': stylistic
},
languageOptions: {
ecmaVersion: 2020,
sourceType: 'module',
parser: tseslint.parser,
globals: {
...globals.es2015,
...globals.es2020
}
},
rules: {
...airbnbRules,
...rules
},
settings
},
...tsFiles,
...cjsFiles
);