@plugjs/eslint-plugin 0.2.24 → 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.
|
|
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
|
|
2926
|
+
var modifierValues = ["always", "ignorePackages", "never"];
|
|
2927
|
+
var modifierSchema = {
|
|
2927
2928
|
type: "string",
|
|
2928
|
-
enum: [
|
|
2929
|
+
enum: [...modifierValues]
|
|
2929
2930
|
};
|
|
2930
|
-
var
|
|
2931
|
+
var modifierByFileExtensionSchema = {
|
|
2931
2932
|
type: "object",
|
|
2932
|
-
patternProperties: { ".*":
|
|
2933
|
+
patternProperties: { ".*": modifierSchema }
|
|
2933
2934
|
};
|
|
2934
2935
|
var properties = {
|
|
2935
2936
|
type: "object",
|
|
2936
2937
|
properties: {
|
|
2937
|
-
pattern:
|
|
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 (
|
|
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
|
|
2969
|
+
if (typeof obj.ignorePackages === "boolean") {
|
|
2966
2970
|
result.ignorePackages = obj.ignorePackages;
|
|
2967
2971
|
}
|
|
2968
|
-
if (obj.checkTypeImports
|
|
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: [
|
|
3007
|
+
items: [modifierSchema],
|
|
3004
3008
|
additionalItems: false
|
|
3005
3009
|
},
|
|
3006
3010
|
{
|
|
3007
3011
|
type: "array",
|
|
3008
|
-
items: [
|
|
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: [
|
|
3022
|
+
items: [modifierSchema, modifierByFileExtensionSchema],
|
|
3019
3023
|
additionalItems: false
|
|
3020
3024
|
},
|
|
3021
3025
|
{
|
|
3022
3026
|
type: "array",
|
|
3023
|
-
items: [
|
|
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
|
|
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
|
|
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
|
|
8535
|
+
if ((0, source_type_1.default)(context) !== "module") {
|
|
8509
8536
|
return {};
|
|
8510
8537
|
}
|
|
8511
8538
|
return {
|
|
@@ -5801,9 +5801,6 @@ var require_indent_binary_ops = __commonJS({
|
|
|
5801
5801
|
}
|
|
5802
5802
|
return openBracketCount < closeBracketCount;
|
|
5803
5803
|
}
|
|
5804
|
-
function hasExclusivelyCloseBracketOfLine(line) {
|
|
5805
|
-
return !sourceCode.tokensAndComments.some((token) => token.loc.start.line === line && ![")", "}", "]"].includes(token.value));
|
|
5806
|
-
}
|
|
5807
5804
|
function handler(node, right) {
|
|
5808
5805
|
if (node.loc.start.line === node.loc.end.line)
|
|
5809
5806
|
return;
|
|
@@ -5823,7 +5820,7 @@ var require_indent_binary_ops = __commonJS({
|
|
|
5823
5820
|
const firstTokenOfLineLeft = firstTokenOfLine(tokenLeft.loc.start.line);
|
|
5824
5821
|
const lastTokenOfLineLeft = lastTokenOfLine(tokenLeft.loc.start.line);
|
|
5825
5822
|
const needAdditionIndent = firstTokenOfLineLeft?.type === "Keyword" && !["typeof", "instanceof", "this"].includes(firstTokenOfLineLeft.value) || firstTokenOfLineLeft?.type === "Identifier" && firstTokenOfLineLeft.value === "type" && node.parent?.type === "TSTypeAliasDeclaration" || [":", "[", "(", "<", "="].includes(lastTokenOfLineLeft?.value || "") || ["[", "(", "=>", ":"].includes(tokenBeforeAll?.value || "") && firstTokenOfLineLeft?.loc.start.line === tokenBeforeAll?.loc.start.line || ["||", "&&"].includes(lastTokenOfLineLeft?.value || "") && node.loc.start.line === tokenLeft.loc.start.line && node.loc.start.column !== getIndentOfLine(node.loc.start.line).length;
|
|
5826
|
-
const needSubtractionIndent = lastTokenOfLineLeft?.value === ")" && isGreaterThanCloseBracketOfLine(tokenLeft.loc.start.line) && !
|
|
5823
|
+
const needSubtractionIndent = lastTokenOfLineLeft?.value === ")" && isGreaterThanCloseBracketOfLine(tokenLeft.loc.start.line) && !["]", ")", "}"].includes(firstTokenOfLineLeft?.value || "");
|
|
5827
5824
|
const indentLeft = getIndentOfLine(tokenLeft.loc.start.line);
|
|
5828
5825
|
const indentRight = getIndentOfLine(tokenRight.loc.start.line);
|
|
5829
5826
|
const indentTarget = getTargetIndent(indentLeft, needAdditionIndent, needSubtractionIndent);
|
|
@@ -9916,6 +9913,8 @@ var require_key_spacing = __commonJS({
|
|
|
9916
9913
|
function verifyImportAttributes(node) {
|
|
9917
9914
|
if (!node.attributes)
|
|
9918
9915
|
return;
|
|
9916
|
+
if (!node.attributes.length)
|
|
9917
|
+
return;
|
|
9919
9918
|
if (isSingleLineImportAttributes(node, sourceCode))
|
|
9920
9919
|
verifyListSpacing(node.attributes, singleLineOptions);
|
|
9921
9920
|
else
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@plugjs/eslint-plugin",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.26",
|
|
4
4
|
"description": "Shared ESLint configurations and extras",
|
|
5
5
|
"main": "./index.mjs",
|
|
6
6
|
"type": "module",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"build": "eslint"
|
|
11
11
|
},
|
|
12
12
|
"peerDependencies": {
|
|
13
|
-
"eslint": "^9.
|
|
13
|
+
"eslint": "^9.14.0"
|
|
14
14
|
},
|
|
15
15
|
"files": [
|
|
16
16
|
"*.md",
|
|
@@ -35,13 +35,13 @@
|
|
|
35
35
|
},
|
|
36
36
|
"homepage": "https://github.com/plugjs/eslint-plugin#readme",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@eslint/js": "9.
|
|
38
|
+
"@eslint/js": "9.14.0",
|
|
39
39
|
"@nolyfill/is-core-module": "1.0.39",
|
|
40
|
-
"@typescript-eslint/utils": "8.
|
|
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",
|
|
44
|
-
"eslint": "9.
|
|
44
|
+
"eslint": "9.14.0",
|
|
45
45
|
"eslint-module-utils": "2.12.0",
|
|
46
46
|
"eslint-plugin-unicorn": "56.0.0",
|
|
47
47
|
"eslint-visitor-keys": "4.2.0",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"estraverse": "5.3.0",
|
|
50
50
|
"fast-glob": "3.3.2",
|
|
51
51
|
"get-tsconfig": "4.8.1",
|
|
52
|
-
"globals": "15.
|
|
52
|
+
"globals": "15.12.0",
|
|
53
53
|
"is-bun-module": "1.2.1",
|
|
54
54
|
"is-core-module": "2.15.1",
|
|
55
55
|
"is-glob": "4.0.3",
|
|
@@ -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.
|
|
63
|
+
"typescript-eslint": "8.14.0"
|
|
64
64
|
}
|
|
65
65
|
}
|