-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.eslintrc.js
52 lines (51 loc) · 1.24 KB
/
.eslintrc.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
module.exports = {
root: true,
parser: "@babel/eslint-parser",
extends: ["@webpack-contrib/eslint-config-webpack", "prettier"],
overrides: [
{
files: ["test/**/*.js", "test/**/.*.js"],
parserOptions: {
sourceType: "module",
allowImportExportEverywhere: true,
},
// globals: {
// __dirname: "off",
// __filename: "off",
// exports: "off",
// module: "off",
// require: "off",
// },
settings: {
"import/extensions": [".mjs", ".cjs", ".js"],
"import/ignore": ["\\.(coffee|scss|css|less|hbs|svg|json|md)$"],
"import/resolver": {
node: {
extensions: [".mjs", ".cjs", ".js", ".jsx", ".json", ".node"],
},
},
},
plugins: ["import"],
rules: {
"import/extensions": [
"error",
"always",
{
ignorePackages: true,
},
],
"import/no-useless-path-segments": [
"error",
{
noUselessIndex: false,
},
],
"no-import-assign": "error",
"import/no-extraneous-dependencies": [
"error",
{ packageDir: __dirname },
],
},
},
],
};