@jsenv/eslint-config-relax 1.7.3 → 1.7.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/eslint-config-relax",
3
- "version": "1.7.3",
3
+ "version": "1.7.6",
4
4
  "description": "A pleaseant ESLint configuration for any project",
5
5
  "repository": {
6
6
  "type": "git",
@@ -24,15 +24,15 @@
24
24
  ],
25
25
  "scripts": {},
26
26
  "dependencies": {
27
- "@babel/eslint-parser": "7.28.4",
27
+ "@babel/eslint-parser": "7.28.5",
28
28
  "@jsenv/eslint-import-resolver": "8.4.2",
29
- "@jsenv/eslint-plugin": "1.0.0",
30
- "@jsenv/urls": "2.9.2",
29
+ "@jsenv/eslint-plugin": "1.1.0",
30
+ "@jsenv/urls": "2.9.3",
31
31
  "eslint-plugin-html": "8.1.3",
32
32
  "eslint-plugin-import-x": "4.16.1",
33
33
  "eslint-plugin-react": "7.37.5",
34
34
  "eslint-plugin-regexp": "2.10.0",
35
- "globals": "16.4.0"
35
+ "globals": "16.5.0"
36
36
  },
37
37
  "devDependencies": {},
38
38
  "engines": {
@@ -1,3 +1,6 @@
1
+ // TODO: ideally when any dev package condition result in a file not found we should
2
+ // warn and fallback to other conditions
3
+
1
4
  import babelParser from "@babel/eslint-parser";
2
5
  import jsenvPlugin from "@jsenv/eslint-plugin";
3
6
  import { urlToRelativeUrl } from "@jsenv/urls";
@@ -39,6 +42,7 @@ export const eslintConfigRelax = ({
39
42
  reactVersion = "detect",
40
43
  reactVersionForPreact = "19.2.0",
41
44
  importResolutionLogLevel,
45
+ importResolutionDevConditions = [],
42
46
 
43
47
  browserFiles = [],
44
48
  browserAndNodeFiles = [],
@@ -149,7 +153,12 @@ export const eslintConfigRelax = ({
149
153
  "import-x/resolver": {
150
154
  "@jsenv/eslint-import-resolver": {
151
155
  rootDirectoryUrl: String(rootDirectoryUrl),
152
- packageConditions: ["node", "development", "dev:*", "import"],
156
+ packageConditions: [
157
+ "node",
158
+ "development",
159
+ ...importResolutionDevConditions,
160
+ "import",
161
+ ],
153
162
  logLevel: importResolutionLogLevel,
154
163
  },
155
164
  },
@@ -169,7 +178,11 @@ export const eslintConfigRelax = ({
169
178
  "import-x/resolver": {
170
179
  "@jsenv/eslint-import-resolver": {
171
180
  rootDirectoryUrl: String(rootDirectoryUrl),
172
- packageConditions: ["node", "development", "dev:*"],
181
+ packageConditions: [
182
+ "node",
183
+ "development",
184
+ ...importResolutionDevConditions,
185
+ ],
173
186
  logLevel: importResolutionLogLevel,
174
187
  },
175
188
  },
@@ -262,7 +275,12 @@ export const eslintConfigRelax = ({
262
275
  "import-x/resolver": {
263
276
  "@jsenv/eslint-import-resolver": {
264
277
  rootDirectoryUrl: browserDirectoryUrl || rootDirectoryUrl,
265
- packageConditions: ["browser", "development", "dev:*", "import"],
278
+ packageConditions: [
279
+ "browser",
280
+ "development",
281
+ ...importResolutionDevConditions,
282
+ "import",
283
+ ],
266
284
  logLevel: importResolutionLogLevel,
267
285
  },
268
286
  },
@@ -299,6 +317,17 @@ export const eslintConfigRelax = ({
299
317
  {
300
318
  files: ["**/*.html"],
301
319
  plugins: { html },
320
+ rules: {
321
+ // Ignore JSX components (start with uppercase)
322
+ // https://github.com/BenoitZugmeyer/eslint-plugin-html/issues/295
323
+ "no-unused-vars": [
324
+ rulesRelax["no-unused-vars"][0],
325
+ {
326
+ ...rulesRelax["no-unused-vars"][1],
327
+ varsIgnorePattern: "^[A-Z]",
328
+ },
329
+ ],
330
+ },
302
331
  settings: {
303
332
  "html/javascript-mime-types": [
304
333
  "text/javascript",