@plugjs/eslint-plugin 0.2.25 → 0.2.26

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.
@@ -30,7 +30,7 @@ var require_package = __commonJS({
30
30
  "node_modules/eslint-plugin-import-x/package.json"(exports2, module2) {
31
31
  module2.exports = {
32
32
  name: "eslint-plugin-import-x",
33
- version: "4.4.0",
33
+ version: "4.4.2",
34
34
  description: "Import with sanity.",
35
35
  repository: "git+https://github.com/un-ts/eslint-plugin-import-x",
36
36
  author: "JounQin <admin@1stg.me> (https://www.1stG.me)",
@@ -2923,18 +2923,19 @@ var require_extensions = __commonJS({
2923
2923
  var tslib_12 = require("tslib");
2924
2924
  var node_path_1 = tslib_12.__importDefault(require("node:path"));
2925
2925
  var utils_1 = require_utils();
2926
- var enumValues = {
2926
+ var modifierValues = ["always", "ignorePackages", "never"];
2927
+ var modifierSchema = {
2927
2928
  type: "string",
2928
- enum: ["always", "ignorePackages", "never"]
2929
+ enum: [...modifierValues]
2929
2930
  };
2930
- var patternProperties = {
2931
+ var modifierByFileExtensionSchema = {
2931
2932
  type: "object",
2932
- patternProperties: { ".*": enumValues }
2933
+ patternProperties: { ".*": modifierSchema }
2933
2934
  };
2934
2935
  var properties = {
2935
2936
  type: "object",
2936
2937
  properties: {
2937
- pattern: patternProperties,
2938
+ pattern: modifierByFileExtensionSchema,
2938
2939
  ignorePackages: {
2939
2940
  type: "boolean"
2940
2941
  },
@@ -2955,17 +2956,20 @@ var require_extensions = __commonJS({
2955
2956
  result.defaultConfig = obj;
2956
2957
  continue;
2957
2958
  }
2958
- if (obj.pattern === void 0 && obj.ignorePackages === void 0 && obj.checkTypeImports === void 0) {
2959
+ if (typeof obj !== "object" || !obj) {
2960
+ continue;
2961
+ }
2962
+ if ((!("pattern" in obj) || obj.pattern === void 0) && obj.ignorePackages === void 0 && obj.checkTypeImports === void 0) {
2959
2963
  Object.assign(result.pattern, obj);
2960
2964
  continue;
2961
2965
  }
2962
- if (obj.pattern !== void 0) {
2966
+ if ("pattern" in obj && obj.pattern !== void 0) {
2963
2967
  Object.assign(result.pattern, obj.pattern);
2964
2968
  }
2965
- if (obj.ignorePackages !== void 0) {
2969
+ if (typeof obj.ignorePackages === "boolean") {
2966
2970
  result.ignorePackages = obj.ignorePackages;
2967
2971
  }
2968
- if (obj.checkTypeImports !== void 0) {
2972
+ if (typeof obj.checkTypeImports === "boolean") {
2969
2973
  result.checkTypeImports = obj.checkTypeImports;
2970
2974
  }
2971
2975
  }
@@ -3000,12 +3004,12 @@ var require_extensions = __commonJS({
3000
3004
  anyOf: [
3001
3005
  {
3002
3006
  type: "array",
3003
- items: [enumValues],
3007
+ items: [modifierSchema],
3004
3008
  additionalItems: false
3005
3009
  },
3006
3010
  {
3007
3011
  type: "array",
3008
- items: [enumValues, properties],
3012
+ items: [modifierSchema, properties],
3009
3013
  additionalItems: false
3010
3014
  },
3011
3015
  {
@@ -3015,12 +3019,12 @@ var require_extensions = __commonJS({
3015
3019
  },
3016
3020
  {
3017
3021
  type: "array",
3018
- items: [patternProperties],
3022
+ items: [modifierSchema, modifierByFileExtensionSchema],
3019
3023
  additionalItems: false
3020
3024
  },
3021
3025
  {
3022
3026
  type: "array",
3023
- items: [enumValues, patternProperties],
3027
+ items: [modifierByFileExtensionSchema],
3024
3028
  additionalItems: false
3025
3029
  }
3026
3030
  ]
@@ -4500,11 +4504,30 @@ var require_no_cycle = __commonJS({
4500
4504
  }
4501
4505
  });
4502
4506
 
4507
+ // node_modules/eslint-plugin-import-x/lib/utils/source-type.js
4508
+ var require_source_type = __commonJS({
4509
+ "node_modules/eslint-plugin-import-x/lib/utils/source-type.js"(exports2) {
4510
+ "use strict";
4511
+ Object.defineProperty(exports2, "__esModule", { value: true });
4512
+ exports2.default = sourceType;
4513
+ function sourceType(context) {
4514
+ if ("sourceType" in context.parserOptions) {
4515
+ return context.parserOptions.sourceType;
4516
+ }
4517
+ if ("languageOptions" in context && context.languageOptions) {
4518
+ return context.languageOptions.sourceType;
4519
+ }
4520
+ }
4521
+ }
4522
+ });
4523
+
4503
4524
  // node_modules/eslint-plugin-import-x/lib/rules/no-default-export.js
4504
4525
  var require_no_default_export = __commonJS({
4505
4526
  "node_modules/eslint-plugin-import-x/lib/rules/no-default-export.js"(exports2, module2) {
4506
4527
  "use strict";
4528
+ var tslib_12 = require("tslib");
4507
4529
  var utils_1 = require_utils();
4530
+ var source_type_1 = tslib_12.__importDefault(require_source_type());
4508
4531
  module2.exports = (0, utils_1.createRule)({
4509
4532
  name: "no-default-export",
4510
4533
  meta: {
@@ -4521,7 +4544,7 @@ var require_no_default_export = __commonJS({
4521
4544
  },
4522
4545
  defaultOptions: [],
4523
4546
  create(context) {
4524
- if (context.parserOptions.sourceType !== "module") {
4547
+ if ((0, source_type_1.default)(context) !== "module") {
4525
4548
  return {};
4526
4549
  }
4527
4550
  const { sourceCode } = context;
@@ -5910,7 +5933,9 @@ var require_no_named_default = __commonJS({
5910
5933
  var require_no_named_export = __commonJS({
5911
5934
  "node_modules/eslint-plugin-import-x/lib/rules/no-named-export.js"(exports2, module2) {
5912
5935
  "use strict";
5936
+ var tslib_12 = require("tslib");
5913
5937
  var utils_1 = require_utils();
5938
+ var source_type_1 = tslib_12.__importDefault(require_source_type());
5914
5939
  module2.exports = (0, utils_1.createRule)({
5915
5940
  name: "no-named-export",
5916
5941
  meta: {
@@ -5926,7 +5951,7 @@ var require_no_named_export = __commonJS({
5926
5951
  },
5927
5952
  defaultOptions: [],
5928
5953
  create(context) {
5929
- if (context.parserOptions.sourceType !== "module") {
5954
+ if ((0, source_type_1.default)(context) !== "module") {
5930
5955
  return {};
5931
5956
  }
5932
5957
  return {
@@ -8489,7 +8514,9 @@ var require_prefer_default_export = __commonJS({
8489
8514
  var require_unambiguous2 = __commonJS({
8490
8515
  "node_modules/eslint-plugin-import-x/lib/rules/unambiguous.js"(exports2, module2) {
8491
8516
  "use strict";
8517
+ var tslib_12 = require("tslib");
8492
8518
  var utils_1 = require_utils();
8519
+ var source_type_1 = tslib_12.__importDefault(require_source_type());
8493
8520
  module2.exports = (0, utils_1.createRule)({
8494
8521
  name: "unambiguous",
8495
8522
  meta: {
@@ -8505,7 +8532,7 @@ var require_unambiguous2 = __commonJS({
8505
8532
  },
8506
8533
  defaultOptions: [],
8507
8534
  create(context) {
8508
- if (context.parserOptions.sourceType !== "module") {
8535
+ if ((0, source_type_1.default)(context) !== "module") {
8509
8536
  return {};
8510
8537
  }
8511
8538
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plugjs/eslint-plugin",
3
- "version": "0.2.25",
3
+ "version": "0.2.26",
4
4
  "description": "Shared ESLint configurations and extras",
5
5
  "main": "./index.mjs",
6
6
  "type": "module",
@@ -37,7 +37,7 @@
37
37
  "dependencies": {
38
38
  "@eslint/js": "9.14.0",
39
39
  "@nolyfill/is-core-module": "1.0.39",
40
- "@typescript-eslint/utils": "8.13.0",
40
+ "@typescript-eslint/utils": "8.14.0",
41
41
  "debug": "4.3.7",
42
42
  "doctrine": "3.0.0",
43
43
  "enhanced-resolve": "5.17.1",
@@ -60,6 +60,6 @@
60
60
  "stable-hash": "0.0.4",
61
61
  "tslib": "2.8.1",
62
62
  "typescript": "5.6.3",
63
- "typescript-eslint": "8.13.0"
63
+ "typescript-eslint": "8.14.0"
64
64
  }
65
65
  }