forked from cssnano/cssnano
-
Notifications
You must be signed in to change notification settings - Fork 0
/
eslint.config.js
68 lines (67 loc) · 1.45 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
56
57
58
59
60
61
62
63
64
65
66
67
68
const js = require('@eslint/js');
const eslintConfigPrettier = require('eslint-config-prettier');
const globals = require('globals');
module.exports = [
{
ignores: ['site/_site/**/*'],
},
js.configs.recommended,
eslintConfigPrettier,
{
files: [
'packages/**/*.js',
'example-cli-usage/**/*.js',
'util/**/*.js',
'.prettierrc.js',
'eslint.config.js',
'site/*.js',
],
languageOptions: {
ecmaVersion: 2020,
sourceType: 'commonjs',
globals: {
...globals.node,
},
},
rules: {
curly: 'error',
'dot-notation': 'error',
eqeqeq: 'error',
'new-cap': 'error',
'no-alert': 'error',
'no-caller': 'error',
'no-eval': 'error',
'no-labels': 'error',
'no-lonely-if': 'error',
'no-new': 'error',
'no-proto': 'error',
'no-return-assign': 'error',
'no-self-compare': 'error',
'no-shadow': 'error',
'no-useless-call': 'error',
'no-var': 'error',
'no-void': 'error',
'no-warning-comments': 'error',
radix: 'error',
yoda: 'error',
},
},
{
files: ['packages/**/*.mjs', 'util/**/*.mjs', 'site/util/**/*.mjs'],
languageOptions: {
sourceType: 'module',
ecmaVersion: 2021,
globals: {
...globals.node,
},
},
},
{
files: ['site/src/*.js'],
languageOptions: {
globals: {
...globals.browser,
},
},
},
];