bahlint 28.58.693401 → 28.58.6934001
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/config/default-config.js +66 -48
- package/package.json +2 -2
|
@@ -10,69 +10,87 @@
|
|
|
10
10
|
//-----------------------------------------------------------------------------
|
|
11
11
|
|
|
12
12
|
const Rules = require("../rules");
|
|
13
|
+
const js = require("@eslint/js");
|
|
13
14
|
|
|
14
15
|
//-----------------------------------------------------------------------------
|
|
15
16
|
// Helpers
|
|
16
17
|
//-----------------------------------------------------------------------------
|
|
17
18
|
|
|
18
19
|
const sharedDefaultConfig = [
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
20
|
+
// Ensure JS files are globbed by default
|
|
21
|
+
{
|
|
22
|
+
files: ["**/*.js", "**/*.mjs"],
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
files: ["**/*.cjs"],
|
|
26
|
+
languageOptions: {
|
|
27
|
+
sourceType: "commonjs",
|
|
28
|
+
ecmaVersion: "latest",
|
|
29
|
+
},
|
|
30
|
+
},
|
|
30
31
|
];
|
|
31
32
|
|
|
32
33
|
exports.defaultConfig = Object.freeze([
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
34
|
+
{
|
|
35
|
+
plugins: {
|
|
36
|
+
"@": {
|
|
37
|
+
languages: {
|
|
38
|
+
js: require("../languages/js"),
|
|
39
|
+
},
|
|
39
40
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
41
|
+
/*
|
|
42
|
+
* Because we try to delay loading rules until absolutely
|
|
43
|
+
* necessary, a proxy allows us to hook into the lazy-loading
|
|
44
|
+
* aspect of the rules map while still keeping all of the
|
|
45
|
+
* relevant configuration inside of the config array.
|
|
46
|
+
*/
|
|
47
|
+
rules: new Proxy(
|
|
48
|
+
{},
|
|
49
|
+
{
|
|
50
|
+
get(target, property) {
|
|
51
|
+
return Rules.get(property);
|
|
52
|
+
},
|
|
52
53
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
54
|
+
has(target, property) {
|
|
55
|
+
return Rules.has(property);
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
),
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
language: "@/js",
|
|
62
|
+
linterOptions: {
|
|
63
|
+
reportUnusedDisableDirectives: 1,
|
|
64
|
+
},
|
|
65
|
+
},
|
|
65
66
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
// default ignores
|
|
68
|
+
{
|
|
69
|
+
ignores: ["**/node_modules/", ".git/"],
|
|
70
|
+
},
|
|
70
71
|
|
|
71
|
-
|
|
72
|
+
// === Your desired default behavior ===
|
|
73
|
+
|
|
74
|
+
// 1) ESLint JS recommended rules
|
|
75
|
+
...js.configs.recommended,
|
|
76
|
+
|
|
77
|
+
// 2) Your overrides / extra rules
|
|
78
|
+
{
|
|
79
|
+
files: ["**/*.{js,mjs,cjs}"],
|
|
80
|
+
languageOptions: {
|
|
81
|
+
ecmaVersion: "latest",
|
|
82
|
+
sourceType: "module",
|
|
83
|
+
},
|
|
84
|
+
rules: {
|
|
85
|
+
"no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
|
|
86
|
+
"no-console": "off",
|
|
87
|
+
"no-debugger": "warn",
|
|
88
|
+
},
|
|
89
|
+
},
|
|
72
90
|
]);
|
|
73
91
|
|
|
74
92
|
exports.defaultRuleTesterConfig = Object.freeze([
|
|
75
|
-
|
|
93
|
+
{ files: ["**"] }, // Make sure the default config matches for all files
|
|
76
94
|
|
|
77
|
-
|
|
95
|
+
...sharedDefaultConfig,
|
|
78
96
|
]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bahlint",
|
|
3
|
-
"version": "28.58.
|
|
3
|
+
"version": "28.58.6934001",
|
|
4
4
|
"author": "Nicholas C. Zakas <nicholas+npm@nczconsulting.com>",
|
|
5
5
|
"description": "An AST-based pattern checker for JavaScript.",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -142,8 +142,8 @@
|
|
|
142
142
|
"@babel/core": "^7.4.3",
|
|
143
143
|
"@babel/preset-env": "^7.4.3",
|
|
144
144
|
"@cypress/webpack-preprocessor": "^6.0.2",
|
|
145
|
-
"@eslint/json": "^0.14.0",
|
|
146
145
|
"@eslint/eslintrc": "^3.3.3",
|
|
146
|
+
"@eslint/json": "^0.14.0",
|
|
147
147
|
"@trunkio/launcher": "^1.3.4",
|
|
148
148
|
"@types/esquery": "^1.5.4",
|
|
149
149
|
"@types/node": "^22.13.14",
|