exadev-eslint-config 2.12.2 → 2.12.3

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/dist/index.cjs CHANGED
@@ -39,6 +39,7 @@ let typescript = require("typescript");
39
39
  typescript = __toESM(typescript, 1);
40
40
  let ts_api_utils = require("ts-api-utils");
41
41
  //#region src/jsdoc.ts
42
+ const JS_TS_FILE_PATTERNS$1 = "**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}";
42
43
  const jsdocConfig = eslint_plugin_jsdoc.default.configs["flat/recommended-tsdoc-error"];
43
44
  const REQUIREMENTS_TIER_RULES = [
44
45
  "jsdoc/require-example",
@@ -61,12 +62,14 @@ const REQUIREMENTS_TIER_RULES = [
61
62
  "jsdoc/require-yields-type"
62
63
  ];
63
64
  const jsdocAndTsdoc = [{
65
+ files: [JS_TS_FILE_PATTERNS$1],
64
66
  ...jsdocConfig,
65
67
  rules: {
66
68
  ...jsdocConfig.rules,
67
69
  ...Object.fromEntries(REQUIREMENTS_TIER_RULES.map((rule) => [rule, "off"]))
68
70
  }
69
71
  }, {
72
+ files: [JS_TS_FILE_PATTERNS$1],
70
73
  plugins: { tsdoc: eslint_plugin_tsdoc.default },
71
74
  rules: { "tsdoc/syntax": "error" }
72
75
  }];
@@ -156,7 +159,7 @@ function buildReactConfig(options = {}) {
156
159
  }
157
160
  //#endregion
158
161
  //#region package.json
159
- var version = "2.12.2";
162
+ var version = "2.12.3";
160
163
  //#endregion
161
164
  //#region src/rules/barrel-helpers.ts
162
165
  const INDEX_BASENAME$1 = /^index\.[cm]?[tj]sx?$/;
@@ -1399,11 +1402,22 @@ const plugin = {
1399
1402
  //#endregion
1400
1403
  //#region src/recommended-type-checked.ts
1401
1404
  const TEST_FILE_PATTERNS = "**/*.{test,spec}.{ts,tsx,mts,cts,js,jsx,mjs,cjs}";
1405
+ const JS_TS_FILE_PATTERNS = "**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}";
1406
+ function scopeToJsTs(configs) {
1407
+ return configs.map((config) => config.files ? config : {
1408
+ ...config,
1409
+ files: [JS_TS_FILE_PATTERNS]
1410
+ });
1411
+ }
1402
1412
  const recommendedTypeChecked = [
1403
- _eslint_js.default.configs.recommended,
1404
- ...typescript_eslint.default.configs.strictTypeChecked,
1405
- ...typescript_eslint.default.configs.stylisticTypeChecked,
1406
1413
  {
1414
+ ..._eslint_js.default.configs.recommended,
1415
+ files: [JS_TS_FILE_PATTERNS]
1416
+ },
1417
+ ...scopeToJsTs(typescript_eslint.default.configs.strictTypeChecked),
1418
+ ...scopeToJsTs(typescript_eslint.default.configs.stylisticTypeChecked),
1419
+ {
1420
+ files: [JS_TS_FILE_PATTERNS],
1407
1421
  plugins: { exadev: plugin },
1408
1422
  linterOptions: { noInlineConfig: true },
1409
1423
  rules: {
package/dist/index.js CHANGED
@@ -8,6 +8,7 @@ import { AST_NODE_TYPES, ESLintUtils, TSESLint } from "@typescript-eslint/utils"
8
8
  import * as ts from "typescript";
9
9
  import { isPropertyReadonlyInType, isTypeReference } from "ts-api-utils";
10
10
  //#region src/jsdoc.ts
11
+ const JS_TS_FILE_PATTERNS$1 = "**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}";
11
12
  const jsdocConfig = jsdoc.configs["flat/recommended-tsdoc-error"];
12
13
  const REQUIREMENTS_TIER_RULES = [
13
14
  "jsdoc/require-example",
@@ -30,12 +31,14 @@ const REQUIREMENTS_TIER_RULES = [
30
31
  "jsdoc/require-yields-type"
31
32
  ];
32
33
  const jsdocAndTsdoc = [{
34
+ files: [JS_TS_FILE_PATTERNS$1],
33
35
  ...jsdocConfig,
34
36
  rules: {
35
37
  ...jsdocConfig.rules,
36
38
  ...Object.fromEntries(REQUIREMENTS_TIER_RULES.map((rule) => [rule, "off"]))
37
39
  }
38
40
  }, {
41
+ files: [JS_TS_FILE_PATTERNS$1],
39
42
  plugins: { tsdoc },
40
43
  rules: { "tsdoc/syntax": "error" }
41
44
  }];
@@ -125,7 +128,7 @@ function buildReactConfig(options = {}) {
125
128
  }
126
129
  //#endregion
127
130
  //#region package.json
128
- var version = "2.12.2";
131
+ var version = "2.12.3";
129
132
  //#endregion
130
133
  //#region src/rules/barrel-helpers.ts
131
134
  const INDEX_BASENAME$1 = /^index\.[cm]?[tj]sx?$/;
@@ -1368,11 +1371,22 @@ const plugin = {
1368
1371
  //#endregion
1369
1372
  //#region src/recommended-type-checked.ts
1370
1373
  const TEST_FILE_PATTERNS = "**/*.{test,spec}.{ts,tsx,mts,cts,js,jsx,mjs,cjs}";
1374
+ const JS_TS_FILE_PATTERNS = "**/*.{ts,tsx,mts,cts,js,jsx,mjs,cjs}";
1375
+ function scopeToJsTs(configs) {
1376
+ return configs.map((config) => config.files ? config : {
1377
+ ...config,
1378
+ files: [JS_TS_FILE_PATTERNS]
1379
+ });
1380
+ }
1371
1381
  const recommendedTypeChecked = [
1372
- js.configs.recommended,
1373
- ...tseslint.configs.strictTypeChecked,
1374
- ...tseslint.configs.stylisticTypeChecked,
1375
1382
  {
1383
+ ...js.configs.recommended,
1384
+ files: [JS_TS_FILE_PATTERNS]
1385
+ },
1386
+ ...scopeToJsTs(tseslint.configs.strictTypeChecked),
1387
+ ...scopeToJsTs(tseslint.configs.stylisticTypeChecked),
1388
+ {
1389
+ files: [JS_TS_FILE_PATTERNS],
1376
1390
  plugins: { exadev: plugin },
1377
1391
  linterOptions: { noInlineConfig: true },
1378
1392
  rules: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "exadev-eslint-config",
3
- "version": "2.12.2",
3
+ "version": "2.12.3",
4
4
  "description": "Shared custom ESLint rules and plugin for ExaDev projects",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -63,6 +63,7 @@
63
63
  "@arethetypeswrong/cli": "^0.18.5",
64
64
  "@commitlint/cli": "^21.2.1",
65
65
  "@commitlint/config-conventional": "^21.2.0",
66
+ "@eslint/json": "2.1.0",
66
67
  "@next/eslint-plugin-next": "^16.3.2",
67
68
  "@semantic-release/changelog": "^7.0.0",
68
69
  "@semantic-release/git": "^11.0.1",
@@ -85,7 +86,7 @@
85
86
  },
86
87
  "dependencies": {
87
88
  "@eslint/js": "^10.0.1",
88
- "@typescript-eslint/utils": "^8.67.0",
89
+ "@typescript-eslint/utils": "8.67.0",
89
90
  "eslint-plugin-jsdoc": "64.3.6",
90
91
  "eslint-plugin-tsdoc": "^0.5.2",
91
92
  "ts-api-utils": "^2.5.0"