-
Notifications
You must be signed in to change notification settings - Fork 7
/
eslint.config.mjs
45 lines (38 loc) · 1.16 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
// @ts-check
import globals from 'globals';
import js from '@eslint/js';
import ts from 'typescript-eslint';
export default ts.config(
js.configs.recommended,
...ts.configs.recommended,
{
languageOptions: {
globals: globals.node,
},
rules: {
// We are *way* past this point lmao
'@typescript-eslint/no-explicit-any': 'off',
// Only way I can do indentation in ts-doc
'no-irregular-whitespace': 'off',
// Makes underscore variables not throw a fit
'@typescript-eslint/no-unused-vars': ['error', {
argsIgnorePattern: '^_',
varsIgnorePattern: '^_',
caughtErrorsIgnorePattern: '^_',
}],
// Sometimes 'requires' is necessary
'@typescript-eslint/no-require-imports': 'off',
// https://stackoverflow.com/questions/49743842/javascript-unexpected-control-characters-in-regular-expression
'no-control-regex': 'off',
// Linting
'semi': 'error',
'comma-dangle': ['error', 'always-multiline'],
},
},
{
// disable type-aware linting on JS files
files: ['**/*.*js'],
...ts.configs.disableTypeChecked,
rules: { 'no-undef': 'off' },
},
);