-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.cjs
63 lines (56 loc) · 1.16 KB
/
.eslintrc.cjs
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
/*
* /.eslintrc.cjs
*
* This file steers IDEs, even when ESLint is not brought in as a dependency.
*
* References:
* - Configuring ESLint
* -> https://eslint.org/docs/user-guide/configuring
*/
const [off,warn,error] = ['off','warn','error'];
module.exports = {
root: true,
extends: [
'eslint:recommended'
],
env: {
es6: true
},
parserOptions: {
ecmaVersion: 2020, // we might use: object spread (2018), dynamic import (2020)
sourceType: 'module'
},
rules: {
// eslint:recommended
"no-unused-vars": [warn, {
varsIgnorePattern: "^_",
argsIgnorePattern: "^_",
}]
},
// All variations are specified under 'overrides'
overrides: [
{ // web component sources
files: ["package/**/*.js"],
env: {
browser: true,
es6: true
}
},
{ // general non-browser JS ('vite.config.js' etc.); not Node sources
files: ["*.js"],
globals: {
process: true,
}
},
// cjs build files (including this one)
{
files: ["*.cjs"], // .eslintrc.cjs
env: {
es6: true
},
globals: {
module: true
}
}
]
};