-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.mjs
More file actions
56 lines (54 loc) · 1.5 KB
/
Copy patheslint.config.mjs
File metadata and controls
56 lines (54 loc) · 1.5 KB
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
import js from "@eslint/js"
import globals from "globals"
import { fixupPluginRules } from "@eslint/compat"
import ninjaPlugin from "eslint-plugin-ninja"
import unicorn from "eslint-plugin-unicorn"
import perfectionist from "eslint-plugin-perfectionist"
import sonar from "eslint-plugin-sonarjs"
const ninja = fixupPluginRules(ninjaPlugin)
export default [
{
ignores: ["node_modules/**", "stuff/**", "eslint.config.mjs", "test/**", "webpack.config.js", "dist/**", "build/**", "t.js", "packages/**", "scripts/**", "misc/**", "browser/**"]
},
perfectionist.configs["recommended-natural"],
{
files: ["**/*.js", "**/*.mjs", "**/*.cjs"],
plugins: {
js,
ninja,
unicorn,
"sonarjs": sonar
},
languageOptions: {
globals: {
...globals.browser,
...globals.node
}
},
rules: {
...js.configs.all.rules,
...unicorn.configs.all.rules,
...sonar.configs.recommended.rules,
"strict": "off",
"func-style": "off",
"ninja/prefer-npm": 2,
"ninja/no-woof": 2,
"ninja/no-xkcd": 2,
"ninja/optimize-string-ternary": 2,
"ninja/no-no-plusplus": 2,
"ninja/no-ts": 2,
"ninja/lottery": [2, { probability: 1 }],
"unicorn/prefer-module": "off",
"unicorn/filename": "off",
"perfectionist/sort-imports": "off",
"perfectionist/sort-modules": "off",
"unicorn/filename-case": "off"
}
},
{
files: ["**/*.js"],
languageOptions: {
sourceType: "commonjs"
}
}
]