-
Notifications
You must be signed in to change notification settings - Fork 245
/
eslint.config.mjs
54 lines (47 loc) · 1.25 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
import ddgConfig from '@duckduckgo/eslint-config';
import globals from 'globals';
export default [
...ddgConfig,
{
ignores: ['shared/js/content-scope/sjcl.js', 'unit-test/data/reference-tests/'],
},
{
languageOptions: {
globals: {
...globals.node,
...globals.webextensions,
...globals.browser,
...globals.jasmine,
...globals.jquery,
},
},
rules: {
'no-shadow': ['error'],
'no-restricted-syntax': [
'error',
{
selector: ':matches(ImportNamespaceSpecifier, ExportAllDeclaration, ExportNamespaceSpecifier)',
message: 'Prefer explicit named imports over wildcard (import * as x)',
},
],
},
},
{
files: ['packages/ddg2dnr/**/*.js'],
rules: {
'generator-star-spacing': [
'error',
{
before: false,
after: true,
},
],
},
},
{
files: ['packages/privacy-grade/**/*.js'],
rules: {
'object-shorthand': 0,
},
},
];