forked from sverweij/dependency-cruiser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
69 lines (69 loc) · 2.13 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
module.exports = {
root: true,
extends: ["moving-meadow", "plugin:@typescript-eslint/recommended"],
plugins: ["@typescript-eslint"],
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 2021,
},
rules: {
"@typescript-eslint/no-explicit-any": "off", // I'd rather have this explicitly so I can see where they are
"@typescript-eslint/no-var-requires": "off", // we kind-of live off of those in here
"@typescript-eslint/no-unused-vars": "off", // duplicate of the same in several other sets
"budapestian/global-constant-pattern": "off", // currently does not work with the AST as emitted @typescript-eslint parser (FIXME)
"no-param-reassign": "error",
"security/detect-non-literal-fs-filename": "off",
"unicorn/no-useless-fallback-in-spread": "off", // useful, probably. We'll try it later, though
"import/exports-last": "off", // Useless remnant of the time when single pass compilers were in vogue
},
overrides: [
{
files: ["**/*.d.ts"],
rules: {
"init-declarations": "off", // in transient contexts it's not even _possible_ to init declarations
},
},
{
files: ["test/**/*.{js,mjs,cjs}"],
env: {
mocha: true,
},
rules: {
"max-lines": "off",
"max-lines-per-function": "off",
"mocha/valid-suite-description": [
"error",
{
pattern: "^\\[[EIU]\\]",
suiteNames: ["describe"],
message:
"start suite titles with [E], [I] or [U] to mark them as E2E, Integration or Unit test suite",
},
],
},
},
{
files: ["**/*.mjs"],
rules: {
"node/no-unsupported-features/es-syntax": "off",
},
},
],
ignorePatterns: [
".pnp.cjs",
".yarn",
"node_modules",
"coverage",
"tmp",
"src/**/*.schema.mjs",
"src/**/*.template.js",
"src/cli/tools/svg-in-html-snippets/script.snippet.js",
"test/integration/**",
"test/*/__fixtures__/**",
"test/*/*/__fixtures__/**",
"test/*/*/*/__fixtures__/**",
"test/*/__mocks__/**",
"test/*/*/__mocks__/**",
"types/**",
],
};