-
Notifications
You must be signed in to change notification settings - Fork 0
/
commonjs.js
57 lines (57 loc) · 1.4 KB
/
commonjs.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
module.exports = {
env: {
es6: true,
node: true,
},
extends: [
"eslint:recommended",
"plugin:import/errors",
"plugin:prettier/recommended",
],
ignorePatterns: ["**/dist/**", "dist/"],
overrides: [
{
files: ["__tests__/**", "**/*.spec.js", "**/*.test.js"],
plugins: ["vitest"],
rules: {
"vitest/no-focused-tests": ["error", { fixable: false }],
"vitest/no-disabled-tests": "warn",
"no-restricted-syntax": "off",
},
},
{
files: ["*.cjs"],
rules: {
"import/no-commonjs": "off",
},
},
],
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
plugins: ["no-autofix", "prettier"],
rules: {
"import/extensions": ["error", "ignorePackages"],
"import/no-commonjs": "off",
"import/no-unresolved": ["error", { ignore: ["^csv-stringify/sync$"] }],
"no-autofix/prefer-const": "warn",
"no-console": "warn",
"no-fallthrough": "error",
"no-restricted-syntax": [
"error",
"ExportNamedDeclaration",
"ExportDefaultDeclaration",
"ExportAllDeclaration",
"ImportDeclaration",
],
"no-shadow": "error",
"no-shadow-restricted-names": "error",
"no-unused-vars": "warn",
"no-use-before-define": [
"warn",
{ functions: true, classes: true, variables: true },
],
"object-shorthand": ["error", "always"],
},
};