forked from sverweij/dependency-cruiser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
73 lines (73 loc) · 2.96 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
70
71
72
73
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)
"security/detect-non-literal-fs-filename": "off",
"import/exports-last": "off", // Useless remnant of the time when single pass compilers were in vogue
"import/no-unresolved": "off", // Does not recognize package.json #imports, which we use (in nodejs since v12.9.0), nor does it understand self-references to exports (e.g. dependency-cruiser/mermaid-reporter-plugin)
"no-param-reassign": "error",
"node/no-missing-import": "off", // Does not recognize package.json #imports, which we use (in nodejs since v12.9.0), nor does it understand self-references to exports (e.g. dependency-cruiser/mermaid-reporter-plugin)
"node/no-missing-require": "off", // Does not recognize package.json #imports, which we use (in nodejs since v12.9.0), nor does it understand self-references to exports (e.g. dependency-cruiser/mermaid-reporter-plugin)
"unicorn/no-empty-file": "off", // See https://github.com/sindresorhus/eslint-plugin-unicorn/issues/2175
"unicorn/no-useless-fallback-in-spread": "off", // useful, probably. We'll try it later, though
},
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",
"no-prototype-builtins": "off", // perfectly fine to use hasOwnProperty c.s. in tests
"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/cli/tools/svg-in-html-snippets/script.snippet.js",
"test/integration/**",
"test/*/__fixtures__/**",
"test/*/*/__fixtures__/**",
"test/*/*/*/__fixtures__/**",
"test/*/__mocks__/**",
"test/*/*/__mocks__/**",
"types/**",
],
};