-
Notifications
You must be signed in to change notification settings - Fork 21
/
eslint.config.mjs
73 lines (64 loc) · 1.65 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import tseslint from 'typescript-eslint';
import ddgConfig from '@duckduckgo/eslint-config';
import globals from 'globals';
// @ts-check
const c = tseslint.config(
...tseslint.configs.recommended,
...ddgConfig,
{
ignores: ['lib/consentomatic/**/*', 'dist/**/*'],
},
{
languageOptions: {
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
{
languageOptions: {
globals: {
...globals.browser,
...globals.node,
},
ecmaVersion: 2021,
sourceType: 'module',
},
rules: {
'@typescript-eslint/no-explicit-any': 0,
'no-unused-expressions': 0,
'@typescript-eslint/no-unused-expressions': 0,
'@typescript-eslint/no-require-imports': 0,
'@typescript-eslint/no-unused-vars': [
'error',
{
args: 'none',
caughtErrors: 'none',
ignoreRestSiblings: true,
vars: 'all',
},
],
'no-undef': 'off',
},
},
{
files: ['addon/**/*'],
languageOptions: {
globals: {
...globals.webextensions,
},
},
},
{
files: ['tests/**/*', 'tests-wtr/**/*'],
languageOptions: {
globals: {
...globals.jasmine,
...globals.chai,
before: 'readonly',
},
},
},
);
export default c;