-
Notifications
You must be signed in to change notification settings - Fork 143
/
Copy patheslint.config.js
55 lines (52 loc) · 1.08 KB
/
eslint.config.js
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
import js from '@eslint/js';
import globals from 'globals';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
export default [
js.configs.recommended,
eslintPluginPrettierRecommended,
{
languageOptions: {
globals: {
...globals.browser,
...globals.serviceworker,
...globals.webextensions,
__PLATFORM__: 'readonly',
},
ecmaVersion: 'latest',
sourceType: 'module',
},
rules: {
'no-restricted-syntax': [
'error',
{
selector: 'Program > ExpressionStatement > AwaitExpression',
message: 'Global await in module body is not allowed.',
},
],
},
},
{
files: ['scripts/**/*.js', 'tests/**/*.js'],
languageOptions: {
globals: {
...globals.node,
},
},
},
{
files: ['tests/**/*.spec.js'],
languageOptions: {
globals: {
...globals.mocha,
},
},
},
{
ignores: [
'dist/*',
'xcode/*',
'src/rule_resources*',
'web-ext-artifacts/*',
],
},
];