@jsse/eslint-config 0.1.21 → 0.1.22
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/LICENSE +21 -21
- package/dist/cli.cjs +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.cjs +79 -68
- package/dist/index.d.cts +530 -330
- package/dist/index.d.ts +530 -330
- package/dist/index.js +79 -68
- package/package.json +24 -25
package/dist/index.js
CHANGED
|
@@ -24,9 +24,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
24
|
mod
|
|
25
25
|
));
|
|
26
26
|
|
|
27
|
-
// node_modules/.pnpm/globals@15.
|
|
27
|
+
// node_modules/.pnpm/globals@15.9.0/node_modules/globals/globals.json
|
|
28
28
|
var require_globals = __commonJS({
|
|
29
|
-
"node_modules/.pnpm/globals@15.
|
|
29
|
+
"node_modules/.pnpm/globals@15.9.0/node_modules/globals/globals.json"(exports, module) {
|
|
30
30
|
module.exports = {
|
|
31
31
|
amd: {
|
|
32
32
|
define: false,
|
|
@@ -62,6 +62,9 @@ var require_globals = __commonJS({
|
|
|
62
62
|
AbstractRange: false,
|
|
63
63
|
Accelerometer: false,
|
|
64
64
|
addEventListener: false,
|
|
65
|
+
ai: false,
|
|
66
|
+
AI: false,
|
|
67
|
+
AITextSession: false,
|
|
65
68
|
alert: false,
|
|
66
69
|
AnalyserNode: false,
|
|
67
70
|
Animation: false,
|
|
@@ -131,6 +134,7 @@ var require_globals = __commonJS({
|
|
|
131
134
|
CDATASection: false,
|
|
132
135
|
ChannelMergerNode: false,
|
|
133
136
|
ChannelSplitterNode: false,
|
|
137
|
+
ChapterInformation: false,
|
|
134
138
|
CharacterBoundsUpdateEvent: false,
|
|
135
139
|
CharacterData: false,
|
|
136
140
|
clearInterval: false,
|
|
@@ -195,6 +199,7 @@ var require_globals = __commonJS({
|
|
|
195
199
|
CSSNamespaceRule: false,
|
|
196
200
|
CSSNumericArray: false,
|
|
197
201
|
CSSNumericValue: false,
|
|
202
|
+
CSSPageDescriptors: false,
|
|
198
203
|
CSSPageRule: false,
|
|
199
204
|
CSSPerspective: false,
|
|
200
205
|
CSSPositionTryDescriptors: false,
|
|
@@ -2647,6 +2652,7 @@ var require_globals = __commonJS({
|
|
|
2647
2652
|
AbortController: false,
|
|
2648
2653
|
AbortSignal: false,
|
|
2649
2654
|
addEventListener: false,
|
|
2655
|
+
ai: false,
|
|
2650
2656
|
atob: false,
|
|
2651
2657
|
AudioData: false,
|
|
2652
2658
|
AudioDecoder: false,
|
|
@@ -2957,9 +2963,9 @@ var require_globals = __commonJS({
|
|
|
2957
2963
|
}
|
|
2958
2964
|
});
|
|
2959
2965
|
|
|
2960
|
-
// node_modules/.pnpm/globals@15.
|
|
2966
|
+
// node_modules/.pnpm/globals@15.9.0/node_modules/globals/index.js
|
|
2961
2967
|
var require_globals2 = __commonJS({
|
|
2962
|
-
"node_modules/.pnpm/globals@15.
|
|
2968
|
+
"node_modules/.pnpm/globals@15.9.0/node_modules/globals/index.js"(exports, module) {
|
|
2963
2969
|
"use strict";
|
|
2964
2970
|
module.exports = require_globals();
|
|
2965
2971
|
}
|
|
@@ -9813,10 +9819,10 @@ function isLagerLevel(level) {
|
|
|
9813
9819
|
return level === "trace" || level === "debug" || level === "info" || level === "warn" || level === "error" || level === "fatal";
|
|
9814
9820
|
}
|
|
9815
9821
|
var Lager = class {
|
|
9822
|
+
_level = "info";
|
|
9823
|
+
id = "lager";
|
|
9824
|
+
levelNo = levels[this._level];
|
|
9816
9825
|
constructor(options) {
|
|
9817
|
-
this._level = "info";
|
|
9818
|
-
this.id = "lager";
|
|
9819
|
-
this.levelNo = levels[this._level];
|
|
9820
9826
|
const { level, id } = {
|
|
9821
9827
|
level: "info",
|
|
9822
9828
|
id: "lager",
|
|
@@ -9928,6 +9934,8 @@ var GLOB_EXCLUDE = [
|
|
|
9928
9934
|
"**/.vitepress/cache",
|
|
9929
9935
|
"**/*.bak",
|
|
9930
9936
|
"**/*.min.*",
|
|
9937
|
+
"**/.yarn",
|
|
9938
|
+
"**/.pnp.*",
|
|
9931
9939
|
"**/auto-import?(s).d.ts",
|
|
9932
9940
|
"**/bun.lockb",
|
|
9933
9941
|
"**/CHANGELOG*.md",
|
|
@@ -10462,23 +10470,6 @@ var jsdoc = async () => {
|
|
|
10462
10470
|
];
|
|
10463
10471
|
};
|
|
10464
10472
|
|
|
10465
|
-
// src/configs/tsdoc.ts
|
|
10466
|
-
var tsdoc = async () => {
|
|
10467
|
-
const { pluginTsdoc } = await importPluginTsdoc();
|
|
10468
|
-
return [
|
|
10469
|
-
{
|
|
10470
|
-
files: ["*.ts", "*.tsx"],
|
|
10471
|
-
name: "jsse/tsdoc",
|
|
10472
|
-
plugins: {
|
|
10473
|
-
tsdoc: pluginTsdoc
|
|
10474
|
-
},
|
|
10475
|
-
rules: {
|
|
10476
|
-
"tsdoc/syntax": "warn"
|
|
10477
|
-
}
|
|
10478
|
-
}
|
|
10479
|
-
];
|
|
10480
|
-
};
|
|
10481
|
-
|
|
10482
10473
|
// src/configs/jsonc.ts
|
|
10483
10474
|
var jsonc = async (options) => {
|
|
10484
10475
|
const { overrides = {}, stylistic: stylistic2 = true } = options ?? {};
|
|
@@ -11099,6 +11090,33 @@ var n = async () => {
|
|
|
11099
11090
|
];
|
|
11100
11091
|
};
|
|
11101
11092
|
|
|
11093
|
+
// src/configs/no-only-tests.ts
|
|
11094
|
+
var noOnlyTests = async (options = {}) => {
|
|
11095
|
+
const { isInEditor: isInEditor2 = false, overrides = {} } = options;
|
|
11096
|
+
const pluginNoOnlyTests = await interopDefault2(
|
|
11097
|
+
// @ts-expect-error - types are incorrect/missing
|
|
11098
|
+
import("eslint-plugin-no-only-tests")
|
|
11099
|
+
);
|
|
11100
|
+
return [
|
|
11101
|
+
{
|
|
11102
|
+
name: "jsse/no-only-tests/setup",
|
|
11103
|
+
plugins: {
|
|
11104
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
11105
|
+
"no-only-tests": pluginNoOnlyTests
|
|
11106
|
+
}
|
|
11107
|
+
},
|
|
11108
|
+
{
|
|
11109
|
+
files: GLOB_TESTS,
|
|
11110
|
+
name: "jsse/no-only-tests/rules",
|
|
11111
|
+
rules: {
|
|
11112
|
+
"no-only-tests/no-only-tests": isInEditor2 ? "off" : isCI() ? "error" : "warn",
|
|
11113
|
+
"unicorn/no-null": "off",
|
|
11114
|
+
...overrides
|
|
11115
|
+
}
|
|
11116
|
+
}
|
|
11117
|
+
];
|
|
11118
|
+
};
|
|
11119
|
+
|
|
11102
11120
|
// src/configs/perfectionist.ts
|
|
11103
11121
|
var perfectionist = async () => {
|
|
11104
11122
|
return [
|
|
@@ -11829,33 +11847,6 @@ var tailwind = async (options) => {
|
|
|
11829
11847
|
];
|
|
11830
11848
|
};
|
|
11831
11849
|
|
|
11832
|
-
// src/configs/no-only-tests.ts
|
|
11833
|
-
var noOnlyTests = async (options = {}) => {
|
|
11834
|
-
const { isInEditor: isInEditor2 = false, overrides = {} } = options;
|
|
11835
|
-
const pluginNoOnlyTests = await interopDefault2(
|
|
11836
|
-
// @ts-expect-error - types are incorrect/missing
|
|
11837
|
-
import("eslint-plugin-no-only-tests")
|
|
11838
|
-
);
|
|
11839
|
-
return [
|
|
11840
|
-
{
|
|
11841
|
-
name: "jsse/no-only-tests/setup",
|
|
11842
|
-
plugins: {
|
|
11843
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
11844
|
-
"no-only-tests": pluginNoOnlyTests
|
|
11845
|
-
}
|
|
11846
|
-
},
|
|
11847
|
-
{
|
|
11848
|
-
files: GLOB_TESTS,
|
|
11849
|
-
name: "jsse/no-only-tests/rules",
|
|
11850
|
-
rules: {
|
|
11851
|
-
"no-only-tests/no-only-tests": isInEditor2 ? "off" : isCI() ? "error" : "warn",
|
|
11852
|
-
"unicorn/no-null": "off",
|
|
11853
|
-
...overrides
|
|
11854
|
-
}
|
|
11855
|
-
}
|
|
11856
|
-
];
|
|
11857
|
-
};
|
|
11858
|
-
|
|
11859
11850
|
// src/configs/ts/typescript.ts
|
|
11860
11851
|
var typescript = async (options) => {
|
|
11861
11852
|
const {
|
|
@@ -11871,9 +11862,9 @@ var typescript = async (options) => {
|
|
|
11871
11862
|
const tsPrefixTo = prefix?.to ?? "@typescript-eslint";
|
|
11872
11863
|
const tsrules = {
|
|
11873
11864
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
11874
|
-
...default8.configs["eslint-recommended"]
|
|
11865
|
+
...(default8.configs["eslint-recommended"]?.overrides ?? [])[0]?.rules,
|
|
11875
11866
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
11876
|
-
...default8.configs.strict
|
|
11867
|
+
...default8.configs.strict?.rules,
|
|
11877
11868
|
"no-invalid-this": "off",
|
|
11878
11869
|
...typescriptRules(
|
|
11879
11870
|
typeAware !== false && tsconfigPath ? { typeAware: true } : { typeAware: false }
|
|
@@ -11935,12 +11926,29 @@ var typescript = async (options) => {
|
|
|
11935
11926
|
];
|
|
11936
11927
|
};
|
|
11937
11928
|
|
|
11929
|
+
// src/configs/tsdoc.ts
|
|
11930
|
+
var tsdoc = async () => {
|
|
11931
|
+
const { pluginTsdoc } = await importPluginTsdoc();
|
|
11932
|
+
return [
|
|
11933
|
+
{
|
|
11934
|
+
files: ["*.ts", "*.tsx"],
|
|
11935
|
+
name: "jsse/tsdoc",
|
|
11936
|
+
plugins: {
|
|
11937
|
+
tsdoc: pluginTsdoc
|
|
11938
|
+
},
|
|
11939
|
+
rules: {
|
|
11940
|
+
"tsdoc/syntax": "warn"
|
|
11941
|
+
}
|
|
11942
|
+
}
|
|
11943
|
+
];
|
|
11944
|
+
};
|
|
11945
|
+
|
|
11938
11946
|
// src/configs/unicorn.ts
|
|
11939
11947
|
function unicornOff() {
|
|
11940
11948
|
return {
|
|
11941
11949
|
"unicorn/catch-error-name": "off",
|
|
11942
11950
|
"unicorn/consistent-destructuring": "off",
|
|
11943
|
-
"unicorn/no-array-for-each": "off",
|
|
11951
|
+
// "unicorn/no-array-for-each": "off",
|
|
11944
11952
|
"unicorn/no-array-reduce": "off",
|
|
11945
11953
|
"unicorn/no-nested-ternary": "off",
|
|
11946
11954
|
// conflicts with prettier
|
|
@@ -11953,7 +11961,11 @@ function unicornOff() {
|
|
|
11953
11961
|
};
|
|
11954
11962
|
}
|
|
11955
11963
|
function unicornRecommended() {
|
|
11956
|
-
|
|
11964
|
+
const rules = default6.configs.recommended.rules;
|
|
11965
|
+
if (rules === void 0) {
|
|
11966
|
+
throw new Error("Expected rules to be defined in unicorn plugin");
|
|
11967
|
+
}
|
|
11968
|
+
return rules;
|
|
11957
11969
|
}
|
|
11958
11970
|
var unicorn = async () => {
|
|
11959
11971
|
return [
|
|
@@ -12337,35 +12349,34 @@ async function jsse(options = {}, ...userConfigs) {
|
|
|
12337
12349
|
if (off && off.length > 0) {
|
|
12338
12350
|
log.debug("Turning off rules", off);
|
|
12339
12351
|
const currentlyActiveRules = /* @__PURE__ */ new Set();
|
|
12340
|
-
|
|
12341
|
-
Object.keys(config.rules ?? {})
|
|
12342
|
-
|
|
12343
|
-
|
|
12344
|
-
|
|
12345
|
-
off.forEach((rule) => {
|
|
12352
|
+
for (const config of combinedConfigs) {
|
|
12353
|
+
for (const rule of Object.keys(config.rules ?? {}))
|
|
12354
|
+
currentlyActiveRules.add(rule);
|
|
12355
|
+
}
|
|
12356
|
+
for (const rule of off) {
|
|
12346
12357
|
if (!currentlyActiveRules.has(rule)) {
|
|
12347
12358
|
log.info(
|
|
12348
12359
|
`Rule \`${rule}\` is not active in the current config, you can remove it from the off list`
|
|
12349
12360
|
);
|
|
12350
12361
|
}
|
|
12351
|
-
}
|
|
12352
|
-
|
|
12353
|
-
Object.keys(config.rules ?? {})
|
|
12362
|
+
}
|
|
12363
|
+
for (const config of combinedConfigs) {
|
|
12364
|
+
for (const rule of Object.keys(config.rules ?? {})) {
|
|
12354
12365
|
if (off.includes(rule) && config.rules) {
|
|
12355
12366
|
config.rules[rule] = "off";
|
|
12356
12367
|
}
|
|
12357
|
-
}
|
|
12358
|
-
}
|
|
12368
|
+
}
|
|
12369
|
+
}
|
|
12359
12370
|
}
|
|
12360
12371
|
if (normalizedOptions.rootId !== "jsse") {
|
|
12361
|
-
|
|
12372
|
+
for (const config of combinedConfigs) {
|
|
12362
12373
|
if (config.name && config.name.startsWith("jsse/")) {
|
|
12363
12374
|
config.name = config.name.replace(
|
|
12364
12375
|
"jsse/",
|
|
12365
12376
|
`${normalizedOptions.rootId}:`
|
|
12366
12377
|
);
|
|
12367
12378
|
}
|
|
12368
|
-
}
|
|
12379
|
+
}
|
|
12369
12380
|
}
|
|
12370
12381
|
if (normalizedOptions.preReturn) {
|
|
12371
12382
|
log.debug("Running preReturn");
|
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsse/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
5
|
-
"
|
|
6
|
-
"description": "jsse eslint config",
|
|
4
|
+
"version": "0.1.22",
|
|
5
|
+
"description": "@jsse/eslint-config ~ WYSIWYG",
|
|
7
6
|
"author": "jessekrubin <jessekrubin@gmail.com> (https://github.com/jessekrubin/)",
|
|
8
7
|
"license": "MIT",
|
|
9
8
|
"homepage": "https://github.com/jessekrubin/eslint-config",
|
|
@@ -12,7 +11,7 @@
|
|
|
12
11
|
"eslint",
|
|
13
12
|
"eslint-config",
|
|
14
13
|
"eslint-flat-config",
|
|
15
|
-
"
|
|
14
|
+
"jawascript",
|
|
16
15
|
"interface-script"
|
|
17
16
|
],
|
|
18
17
|
"exports": {
|
|
@@ -25,8 +24,7 @@
|
|
|
25
24
|
"main": "./dist/index.js",
|
|
26
25
|
"types": "./dist/index.d.ts",
|
|
27
26
|
"bin": {
|
|
28
|
-
"jsselint": "dist/cli.cjs"
|
|
29
|
-
"jsseslint": "dist/cli.cjs"
|
|
27
|
+
"jsselint": "dist/cli.cjs"
|
|
30
28
|
},
|
|
31
29
|
"files": [
|
|
32
30
|
"dist"
|
|
@@ -61,46 +59,47 @@
|
|
|
61
59
|
},
|
|
62
60
|
"dependencies": {
|
|
63
61
|
"@eslint/js": "~8.57.0",
|
|
64
|
-
"@stylistic/eslint-plugin": "2.
|
|
65
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
66
|
-
"@typescript-eslint/parser": "^7.
|
|
62
|
+
"@stylistic/eslint-plugin": "2.6.1",
|
|
63
|
+
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
64
|
+
"@typescript-eslint/parser": "^7.18.0",
|
|
67
65
|
"eslint-config-flat-gitignore": "^0.1.8",
|
|
68
66
|
"eslint-define-config": "^2.1.0",
|
|
69
67
|
"eslint-plugin-antfu": "^2.3.4",
|
|
70
68
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
71
|
-
"eslint-plugin-import-x": "^
|
|
72
|
-
"eslint-plugin-jsdoc": "^48.
|
|
69
|
+
"eslint-plugin-import-x": "^3.1.0",
|
|
70
|
+
"eslint-plugin-jsdoc": "^48.10.2",
|
|
73
71
|
"eslint-plugin-jsonc": "^2.16.0",
|
|
74
72
|
"eslint-plugin-markdown": "^5.1.0",
|
|
75
|
-
"eslint-plugin-n": "^17.
|
|
73
|
+
"eslint-plugin-n": "^17.10.1",
|
|
76
74
|
"eslint-plugin-no-only-tests": "^3.1.0",
|
|
77
|
-
"eslint-plugin-perfectionist": "^
|
|
78
|
-
"eslint-plugin-react": "~7.
|
|
75
|
+
"eslint-plugin-perfectionist": "^3.0.0",
|
|
76
|
+
"eslint-plugin-react": "~7.35.0",
|
|
79
77
|
"eslint-plugin-react-hooks": "~4.6.2",
|
|
80
|
-
"eslint-plugin-react-refresh": "~0.4.
|
|
78
|
+
"eslint-plugin-react-refresh": "~0.4.9",
|
|
81
79
|
"eslint-plugin-toml": "^0.11.1",
|
|
82
80
|
"eslint-plugin-tsdoc": "^0.3.0",
|
|
83
|
-
"eslint-plugin-unicorn": "^
|
|
81
|
+
"eslint-plugin-unicorn": "^55.0.0",
|
|
84
82
|
"eslint-plugin-unused-imports": "^3.2.0",
|
|
85
83
|
"eslint-plugin-vitest": "0.5.4",
|
|
86
84
|
"eslint-plugin-yml": "^1.14.0",
|
|
87
85
|
"jsonc-eslint-parser": "^2.4.0",
|
|
88
86
|
"toml-eslint-parser": "^0.10.0",
|
|
89
|
-
"typescript-eslint": "^7.
|
|
87
|
+
"typescript-eslint": "^7.18.0",
|
|
90
88
|
"yaml-eslint-parser": "^1.2.3"
|
|
91
89
|
},
|
|
92
90
|
"optionalDependencies": {
|
|
93
91
|
"eslint-plugin-tailwindcss": "^3.17.4",
|
|
94
|
-
"tailwindcss": "^3.4.
|
|
92
|
+
"tailwindcss": "^3.4.7"
|
|
95
93
|
},
|
|
96
94
|
"devDependencies": {
|
|
97
95
|
"@antfu/ni": "^0.22.0",
|
|
96
|
+
"@biomejs/biome": "1.8.3",
|
|
98
97
|
"@changesets/cli": "^2.27.7",
|
|
99
98
|
"@jsse/prettier-config": "^0.1.0",
|
|
100
|
-
"@types/eslint": "^8.56.
|
|
99
|
+
"@types/eslint": "^8.56.11",
|
|
101
100
|
"@types/eslint__js": "~8.42.3",
|
|
102
101
|
"@types/fs-extra": "^11.0.4",
|
|
103
|
-
"@types/node": "^20.14.
|
|
102
|
+
"@types/node": "^20.14.13",
|
|
104
103
|
"cac": "^6.7.14",
|
|
105
104
|
"eslint": "^8.57.0",
|
|
106
105
|
"eslint-flat-config-utils": "^0.2.5",
|
|
@@ -108,15 +107,15 @@
|
|
|
108
107
|
"execa": "~9.3.0",
|
|
109
108
|
"fast-glob": "^3.3.2",
|
|
110
109
|
"fs-extra": "^11.2.0",
|
|
111
|
-
"globals": "^15.
|
|
110
|
+
"globals": "^15.9.0",
|
|
112
111
|
"local-pkg": "^0.5.0",
|
|
113
112
|
"prettier": "^3.3.3",
|
|
114
113
|
"react": "~18.3.1",
|
|
115
114
|
"rimraf": "^6.0.1",
|
|
116
|
-
"tsup": "^8.
|
|
117
|
-
"tsx": "^4.16.
|
|
118
|
-
"typescript": "~5.5.
|
|
119
|
-
"vitest": "^2.0.
|
|
115
|
+
"tsup": "^8.2.3",
|
|
116
|
+
"tsx": "^4.16.5",
|
|
117
|
+
"typescript": "~5.5.4",
|
|
118
|
+
"vitest": "^2.0.5"
|
|
120
119
|
},
|
|
121
120
|
"prettier": "@jsse/prettier-config",
|
|
122
121
|
"scripts": {
|