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.
@@ -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
- // intentionally empty config to ensure these files are globbed by default
20
- {
21
- files: ["**/*.js", "**/*.mjs"],
22
- },
23
- {
24
- files: ["**/*.cjs"],
25
- languageOptions: {
26
- sourceType: "commonjs",
27
- ecmaVersion: "latest",
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
- plugins: {
35
- "@": {
36
- languages: {
37
- js: require("../languages/js"),
38
- },
34
+ {
35
+ plugins: {
36
+ "@": {
37
+ languages: {
38
+ js: require("../languages/js"),
39
+ },
39
40
 
40
- /*
41
- * Because we try to delay loading rules until absolutely
42
- * necessary, a proxy allows us to hook into the lazy-loading
43
- * aspect of the rules map while still keeping all of the
44
- * relevant configuration inside of the config array.
45
- */
46
- rules: new Proxy(
47
- {},
48
- {
49
- get(target, property) {
50
- return Rules.get(property);
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
- has(target, property) {
54
- return Rules.has(property);
55
- },
56
- },
57
- ),
58
- },
59
- },
60
- language: "@/js",
61
- linterOptions: {
62
- reportUnusedDisableDirectives: 1,
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
- // default ignores are listed here
67
- {
68
- ignores: ["**/node_modules/", ".git/"],
69
- },
67
+ // default ignores
68
+ {
69
+ ignores: ["**/node_modules/", ".git/"],
70
+ },
70
71
 
71
- ...sharedDefaultConfig,
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
- { files: ["**"] }, // Make sure the default config matches for all files
93
+ { files: ["**"] }, // Make sure the default config matches for all files
76
94
 
77
- ...sharedDefaultConfig,
95
+ ...sharedDefaultConfig,
78
96
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bahlint",
3
- "version": "28.58.693401",
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",