@jsse/eslint-config 0.7.7 → 0.7.9
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/CHANGELOG.md +12 -0
- package/dist/cli.js +1 -1
- package/dist/{const-BkkD6aSp.js → const-DcPxulJ0.js} +1 -1
- package/dist/index.d.ts +840 -193
- package/dist/index.js +92 -67
- package/package.json +23 -23
- /package/dist/{chunk-DJK8HYOj.js → rolldown-runtime-DJK8HYOj.js} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as __exportAll, r as __toESM, t as __commonJSMin } from "./
|
|
2
|
-
import { n as SLOW_RULES, r as VERSION, t as DEBUG } from "./const-
|
|
1
|
+
import { n as __exportAll, r as __toESM, t as __commonJSMin } from "./rolldown-runtime-DJK8HYOj.js";
|
|
2
|
+
import { n as SLOW_RULES, r as VERSION, t as DEBUG } from "./const-DcPxulJ0.js";
|
|
3
3
|
import { builtinModules, createRequire } from "node:module";
|
|
4
4
|
import process$1 from "node:process";
|
|
5
5
|
import fs, { realpathSync, statSync } from "node:fs";
|
|
@@ -25,7 +25,7 @@ import createCommand from "eslint-plugin-command/config";
|
|
|
25
25
|
import eslintjs from "@eslint/js";
|
|
26
26
|
import { mergeProcessors, processorPassThrough } from "eslint-merge-processors";
|
|
27
27
|
import tseslint from "typescript-eslint";
|
|
28
|
-
//#region node_modules/.pnpm/acorn@8.
|
|
28
|
+
//#region node_modules/.pnpm/acorn@8.17.0/node_modules/acorn/dist/acorn.mjs
|
|
29
29
|
var astralIdentifierCodes = [
|
|
30
30
|
509,
|
|
31
31
|
0,
|
|
@@ -1243,6 +1243,7 @@ function getLineInfo(input, offset) {
|
|
|
1243
1243
|
var defaultOptions$1 = {
|
|
1244
1244
|
ecmaVersion: null,
|
|
1245
1245
|
sourceType: "script",
|
|
1246
|
+
strict: false,
|
|
1246
1247
|
onInsertedSemicolon: null,
|
|
1247
1248
|
onTrailingComma: null,
|
|
1248
1249
|
allowReserved: null,
|
|
@@ -1335,7 +1336,7 @@ var Parser = function Parser(options, input, startPos) {
|
|
|
1335
1336
|
this.context = this.initialContext();
|
|
1336
1337
|
this.exprAllowed = true;
|
|
1337
1338
|
this.inModule = options.sourceType === "module";
|
|
1338
|
-
this.strict = this.inModule || this.strictDirective(this.pos);
|
|
1339
|
+
this.strict = this.inModule || options.strict === true || this.strictDirective(this.pos);
|
|
1339
1340
|
this.potentialArrowAt = -1;
|
|
1340
1341
|
this.potentialArrowInForAwait = false;
|
|
1341
1342
|
this.yieldPos = this.awaitPos = this.awaitIdentPos = 0;
|
|
@@ -1361,9 +1362,12 @@ var prototypeAccessors = {
|
|
|
1361
1362
|
inClassStaticBlock: { configurable: true }
|
|
1362
1363
|
};
|
|
1363
1364
|
Parser.prototype.parse = function parse() {
|
|
1365
|
+
var this$1$1 = this;
|
|
1364
1366
|
var node = this.options.program || this.startNode();
|
|
1365
1367
|
this.nextToken();
|
|
1366
|
-
return this.
|
|
1368
|
+
return this.catchStackOverflow(function() {
|
|
1369
|
+
return this$1$1.parseTopLevel(node);
|
|
1370
|
+
});
|
|
1367
1371
|
};
|
|
1368
1372
|
prototypeAccessors.inFunction.get = function() {
|
|
1369
1373
|
return (this.currentVarScope().flags & SCOPE_FUNCTION) > 0;
|
|
@@ -1466,6 +1470,14 @@ pp$9.eatContextual = function(name) {
|
|
|
1466
1470
|
this.next();
|
|
1467
1471
|
return true;
|
|
1468
1472
|
};
|
|
1473
|
+
pp$9.catchStackOverflow = function(f) {
|
|
1474
|
+
try {
|
|
1475
|
+
return f();
|
|
1476
|
+
} catch (e) {
|
|
1477
|
+
if (e instanceof Error && (/\bstack\b.*\b(exceeded|overflow)\b/i.test(e.message) || /\btoo much recursion\b/i.test(e.message))) this.raise(this.start, "Not enough stack space to parse input");
|
|
1478
|
+
else throw e;
|
|
1479
|
+
}
|
|
1480
|
+
};
|
|
1469
1481
|
pp$9.expectContextual = function(name) {
|
|
1470
1482
|
if (!this.eatContextual(name)) this.unexpected();
|
|
1471
1483
|
};
|
|
@@ -1521,10 +1533,10 @@ pp$9.isSimpleAssignTarget = function(expr) {
|
|
|
1521
1533
|
};
|
|
1522
1534
|
var pp$8 = Parser.prototype;
|
|
1523
1535
|
pp$8.parseTopLevel = function(node) {
|
|
1524
|
-
var exports = Object.create(null);
|
|
1536
|
+
var exports$1 = Object.create(null);
|
|
1525
1537
|
if (!node.body) node.body = [];
|
|
1526
1538
|
while (this.type !== types$1.eof) {
|
|
1527
|
-
var stmt = this.parseStatement(null, true, exports);
|
|
1539
|
+
var stmt = this.parseStatement(null, true, exports$1);
|
|
1528
1540
|
node.body.push(stmt);
|
|
1529
1541
|
}
|
|
1530
1542
|
if (this.inModule) for (var i = 0, list = Object.keys(this.undefinedExports); i < list.length; i += 1) {
|
|
@@ -1585,7 +1597,13 @@ pp$8.isUsingKeyword = function(isAwaitUsing, isFor) {
|
|
|
1585
1597
|
while (isIdentifierChar(ch = this.fullCharCodeAt(next)));
|
|
1586
1598
|
if (ch === 92) return true;
|
|
1587
1599
|
var id = this.input.slice(idStart, next);
|
|
1588
|
-
if (keywordRelationalOperator.test(id)
|
|
1600
|
+
if (keywordRelationalOperator.test(id)) return false;
|
|
1601
|
+
if (isFor && !isAwaitUsing && id === "of") {
|
|
1602
|
+
skipWhiteSpace.lastIndex = next;
|
|
1603
|
+
var skipAfterOf = skipWhiteSpace.exec(this.input);
|
|
1604
|
+
next = next + skipAfterOf[0].length;
|
|
1605
|
+
if (this.input.charCodeAt(next) !== 61 || (ch = this.input.charCodeAt(next + 1)) === 61 || ch === 62) return false;
|
|
1606
|
+
}
|
|
1589
1607
|
return true;
|
|
1590
1608
|
};
|
|
1591
1609
|
pp$8.isAwaitUsing = function(isFor) {
|
|
@@ -1594,7 +1612,7 @@ pp$8.isAwaitUsing = function(isFor) {
|
|
|
1594
1612
|
pp$8.isUsing = function(isFor) {
|
|
1595
1613
|
return this.isUsingKeyword(false, isFor);
|
|
1596
1614
|
};
|
|
1597
|
-
pp$8.parseStatement = function(context, topLevel, exports) {
|
|
1615
|
+
pp$8.parseStatement = function(context, topLevel, exports$1) {
|
|
1598
1616
|
var starttype = this.type, node = this.startNode(), kind;
|
|
1599
1617
|
if (this.isLet(context)) {
|
|
1600
1618
|
starttype = types$1._var;
|
|
@@ -1638,7 +1656,7 @@ pp$8.parseStatement = function(context, topLevel, exports) {
|
|
|
1638
1656
|
if (!topLevel) this.raise(this.start, "'import' and 'export' may only appear at the top level");
|
|
1639
1657
|
if (!this.inModule) this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'");
|
|
1640
1658
|
}
|
|
1641
|
-
return starttype === types$1._import ? this.parseImport(node) : this.parseExport(node, exports);
|
|
1659
|
+
return starttype === types$1._import ? this.parseImport(node) : this.parseExport(node, exports$1);
|
|
1642
1660
|
default:
|
|
1643
1661
|
if (this.isAsyncFunction()) {
|
|
1644
1662
|
if (context) this.unexpected();
|
|
@@ -1648,6 +1666,7 @@ pp$8.parseStatement = function(context, topLevel, exports) {
|
|
|
1648
1666
|
var usingKind = this.isAwaitUsing(false) ? "await using" : this.isUsing(false) ? "using" : null;
|
|
1649
1667
|
if (usingKind) {
|
|
1650
1668
|
if (!this.allowUsing) this.raise(this.start, "Using declaration cannot appear in the top level when source type is `script` or in the bare case statement");
|
|
1669
|
+
if (context) this.raise(this.start, "Using declaration is not allowed in single-statement positions");
|
|
1651
1670
|
if (usingKind === "await using") {
|
|
1652
1671
|
if (!this.canAwait) this.raise(this.start, "Await using cannot appear outside of async function");
|
|
1653
1672
|
this.next();
|
|
@@ -1751,9 +1770,10 @@ pp$8.parseForStatement = function(node) {
|
|
|
1751
1770
|
};
|
|
1752
1771
|
pp$8.parseForAfterInit = function(node, init, awaitAt) {
|
|
1753
1772
|
if ((this.type === types$1._in || this.options.ecmaVersion >= 6 && this.isContextual("of")) && init.declarations.length === 1) {
|
|
1754
|
-
if (this.
|
|
1755
|
-
if (
|
|
1756
|
-
|
|
1773
|
+
if (this.type === types$1._in) {
|
|
1774
|
+
if ((init.kind === "using" || init.kind === "await using") && !init.declarations[0].init) this.raise(this.start, "Using declaration is not allowed in for-in loops");
|
|
1775
|
+
if (this.options.ecmaVersion >= 9 && awaitAt > -1) this.unexpected(awaitAt);
|
|
1776
|
+
} else if (this.options.ecmaVersion >= 9) node.await = awaitAt > -1;
|
|
1757
1777
|
return this.parseForIn(node, init);
|
|
1758
1778
|
}
|
|
1759
1779
|
if (awaitAt > -1) this.unexpected(awaitAt);
|
|
@@ -2153,10 +2173,10 @@ function checkKeyName(node, name) {
|
|
|
2153
2173
|
var key = node.key;
|
|
2154
2174
|
return !computed && (key.type === "Identifier" && key.name === name || key.type === "Literal" && key.value === name);
|
|
2155
2175
|
}
|
|
2156
|
-
pp$8.parseExportAllDeclaration = function(node, exports) {
|
|
2176
|
+
pp$8.parseExportAllDeclaration = function(node, exports$1) {
|
|
2157
2177
|
if (this.options.ecmaVersion >= 11) if (this.eatContextual("as")) {
|
|
2158
2178
|
node.exported = this.parseModuleExportName();
|
|
2159
|
-
this.checkExport(exports, node.exported, this.lastTokStart);
|
|
2179
|
+
this.checkExport(exports$1, node.exported, this.lastTokStart);
|
|
2160
2180
|
} else node.exported = null;
|
|
2161
2181
|
this.expectContextual("from");
|
|
2162
2182
|
if (this.type !== types$1.string) this.unexpected();
|
|
@@ -2165,24 +2185,24 @@ pp$8.parseExportAllDeclaration = function(node, exports) {
|
|
|
2165
2185
|
this.semicolon();
|
|
2166
2186
|
return this.finishNode(node, "ExportAllDeclaration");
|
|
2167
2187
|
};
|
|
2168
|
-
pp$8.parseExport = function(node, exports) {
|
|
2188
|
+
pp$8.parseExport = function(node, exports$1) {
|
|
2169
2189
|
this.next();
|
|
2170
|
-
if (this.eat(types$1.star)) return this.parseExportAllDeclaration(node, exports);
|
|
2190
|
+
if (this.eat(types$1.star)) return this.parseExportAllDeclaration(node, exports$1);
|
|
2171
2191
|
if (this.eat(types$1._default)) {
|
|
2172
|
-
this.checkExport(exports, "default", this.lastTokStart);
|
|
2192
|
+
this.checkExport(exports$1, "default", this.lastTokStart);
|
|
2173
2193
|
node.declaration = this.parseExportDefaultDeclaration();
|
|
2174
2194
|
return this.finishNode(node, "ExportDefaultDeclaration");
|
|
2175
2195
|
}
|
|
2176
2196
|
if (this.shouldParseExportStatement()) {
|
|
2177
2197
|
node.declaration = this.parseExportDeclaration(node);
|
|
2178
|
-
if (node.declaration.type === "VariableDeclaration") this.checkVariableExport(exports, node.declaration.declarations);
|
|
2179
|
-
else this.checkExport(exports, node.declaration.id, node.declaration.id.start);
|
|
2198
|
+
if (node.declaration.type === "VariableDeclaration") this.checkVariableExport(exports$1, node.declaration.declarations);
|
|
2199
|
+
else this.checkExport(exports$1, node.declaration.id, node.declaration.id.start);
|
|
2180
2200
|
node.specifiers = [];
|
|
2181
2201
|
node.source = null;
|
|
2182
2202
|
if (this.options.ecmaVersion >= 16) node.attributes = [];
|
|
2183
2203
|
} else {
|
|
2184
2204
|
node.declaration = null;
|
|
2185
|
-
node.specifiers = this.parseExportSpecifiers(exports);
|
|
2205
|
+
node.specifiers = this.parseExportSpecifiers(exports$1);
|
|
2186
2206
|
if (this.eatContextual("from")) {
|
|
2187
2207
|
if (this.type !== types$1.string) this.unexpected();
|
|
2188
2208
|
node.source = this.parseExprAtom();
|
|
@@ -2220,45 +2240,45 @@ pp$8.parseExportDefaultDeclaration = function() {
|
|
|
2220
2240
|
return declaration;
|
|
2221
2241
|
}
|
|
2222
2242
|
};
|
|
2223
|
-
pp$8.checkExport = function(exports, name, pos) {
|
|
2224
|
-
if (!exports) return;
|
|
2243
|
+
pp$8.checkExport = function(exports$1, name, pos) {
|
|
2244
|
+
if (!exports$1) return;
|
|
2225
2245
|
if (typeof name !== "string") name = name.type === "Identifier" ? name.name : name.value;
|
|
2226
|
-
if (hasOwn(exports, name)) this.raiseRecoverable(pos, "Duplicate export '" + name + "'");
|
|
2227
|
-
exports[name] = true;
|
|
2246
|
+
if (hasOwn(exports$1, name)) this.raiseRecoverable(pos, "Duplicate export '" + name + "'");
|
|
2247
|
+
exports$1[name] = true;
|
|
2228
2248
|
};
|
|
2229
|
-
pp$8.checkPatternExport = function(exports, pat) {
|
|
2249
|
+
pp$8.checkPatternExport = function(exports$1, pat) {
|
|
2230
2250
|
var type = pat.type;
|
|
2231
|
-
if (type === "Identifier") this.checkExport(exports, pat, pat.start);
|
|
2251
|
+
if (type === "Identifier") this.checkExport(exports$1, pat, pat.start);
|
|
2232
2252
|
else if (type === "ObjectPattern") for (var i = 0, list = pat.properties; i < list.length; i += 1) {
|
|
2233
2253
|
var prop = list[i];
|
|
2234
|
-
this.checkPatternExport(exports, prop);
|
|
2254
|
+
this.checkPatternExport(exports$1, prop);
|
|
2235
2255
|
}
|
|
2236
2256
|
else if (type === "ArrayPattern") for (var i$1 = 0, list$1 = pat.elements; i$1 < list$1.length; i$1 += 1) {
|
|
2237
2257
|
var elt = list$1[i$1];
|
|
2238
|
-
if (elt) this.checkPatternExport(exports, elt);
|
|
2258
|
+
if (elt) this.checkPatternExport(exports$1, elt);
|
|
2239
2259
|
}
|
|
2240
|
-
else if (type === "Property") this.checkPatternExport(exports, pat.value);
|
|
2241
|
-
else if (type === "AssignmentPattern") this.checkPatternExport(exports, pat.left);
|
|
2242
|
-
else if (type === "RestElement") this.checkPatternExport(exports, pat.argument);
|
|
2260
|
+
else if (type === "Property") this.checkPatternExport(exports$1, pat.value);
|
|
2261
|
+
else if (type === "AssignmentPattern") this.checkPatternExport(exports$1, pat.left);
|
|
2262
|
+
else if (type === "RestElement") this.checkPatternExport(exports$1, pat.argument);
|
|
2243
2263
|
};
|
|
2244
|
-
pp$8.checkVariableExport = function(exports, decls) {
|
|
2245
|
-
if (!exports) return;
|
|
2264
|
+
pp$8.checkVariableExport = function(exports$1, decls) {
|
|
2265
|
+
if (!exports$1) return;
|
|
2246
2266
|
for (var i = 0, list = decls; i < list.length; i += 1) {
|
|
2247
2267
|
var decl = list[i];
|
|
2248
|
-
this.checkPatternExport(exports, decl.id);
|
|
2268
|
+
this.checkPatternExport(exports$1, decl.id);
|
|
2249
2269
|
}
|
|
2250
2270
|
};
|
|
2251
2271
|
pp$8.shouldParseExportStatement = function() {
|
|
2252
2272
|
return this.type.keyword === "var" || this.type.keyword === "const" || this.type.keyword === "class" || this.type.keyword === "function" || this.isLet() || this.isAsyncFunction();
|
|
2253
2273
|
};
|
|
2254
|
-
pp$8.parseExportSpecifier = function(exports) {
|
|
2274
|
+
pp$8.parseExportSpecifier = function(exports$1) {
|
|
2255
2275
|
var node = this.startNode();
|
|
2256
2276
|
node.local = this.parseModuleExportName();
|
|
2257
2277
|
node.exported = this.eatContextual("as") ? this.parseModuleExportName() : node.local;
|
|
2258
|
-
this.checkExport(exports, node.exported, node.exported.start);
|
|
2278
|
+
this.checkExport(exports$1, node.exported, node.exported.start);
|
|
2259
2279
|
return this.finishNode(node, "ExportSpecifier");
|
|
2260
2280
|
};
|
|
2261
|
-
pp$8.parseExportSpecifiers = function(exports) {
|
|
2281
|
+
pp$8.parseExportSpecifiers = function(exports$1) {
|
|
2262
2282
|
var nodes = [], first = true;
|
|
2263
2283
|
this.expect(types$1.braceL);
|
|
2264
2284
|
while (!this.eat(types$1.braceR)) {
|
|
@@ -2266,7 +2286,7 @@ pp$8.parseExportSpecifiers = function(exports) {
|
|
|
2266
2286
|
this.expect(types$1.comma);
|
|
2267
2287
|
if (this.afterTrailingComma(types$1.braceR)) break;
|
|
2268
2288
|
} else first = false;
|
|
2269
|
-
nodes.push(this.parseExportSpecifier(exports));
|
|
2289
|
+
nodes.push(this.parseExportSpecifier(exports$1));
|
|
2270
2290
|
}
|
|
2271
2291
|
return nodes;
|
|
2272
2292
|
};
|
|
@@ -2697,15 +2717,18 @@ pp$5.checkPropClash = function(prop, propHash, refDestructuringErrors) {
|
|
|
2697
2717
|
other[kind] = true;
|
|
2698
2718
|
};
|
|
2699
2719
|
pp$5.parseExpression = function(forInit, refDestructuringErrors) {
|
|
2700
|
-
var
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
var
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2720
|
+
var this$1$1 = this;
|
|
2721
|
+
return this.catchStackOverflow(function() {
|
|
2722
|
+
var startPos = this$1$1.start, startLoc = this$1$1.startLoc;
|
|
2723
|
+
var expr = this$1$1.parseMaybeAssign(forInit, refDestructuringErrors);
|
|
2724
|
+
if (this$1$1.type === types$1.comma) {
|
|
2725
|
+
var node = this$1$1.startNodeAt(startPos, startLoc);
|
|
2726
|
+
node.expressions = [expr];
|
|
2727
|
+
while (this$1$1.eat(types$1.comma)) node.expressions.push(this$1$1.parseMaybeAssign(forInit, refDestructuringErrors));
|
|
2728
|
+
return this$1$1.finishNode(node, "SequenceExpression");
|
|
2729
|
+
}
|
|
2730
|
+
return expr;
|
|
2731
|
+
});
|
|
2709
2732
|
};
|
|
2710
2733
|
pp$5.parseMaybeAssign = function(forInit, refDestructuringErrors, afterLeftParse) {
|
|
2711
2734
|
if (this.isContextual("yield")) if (this.inGenerator) return this.parseYield(forInit);
|
|
@@ -2749,7 +2772,7 @@ pp$5.parseMaybeConditional = function(forInit, refDestructuringErrors) {
|
|
|
2749
2772
|
var startPos = this.start, startLoc = this.startLoc;
|
|
2750
2773
|
var expr = this.parseExprOps(forInit, refDestructuringErrors);
|
|
2751
2774
|
if (this.checkExpressionErrors(refDestructuringErrors)) return expr;
|
|
2752
|
-
if (this.eat(types$1.question)) {
|
|
2775
|
+
if (!(expr.type === "ArrowFunctionExpression" && expr.start === startPos) && this.eat(types$1.question)) {
|
|
2753
2776
|
var node = this.startNodeAt(startPos, startLoc);
|
|
2754
2777
|
node.test = expr;
|
|
2755
2778
|
node.consequent = this.parseMaybeAssign();
|
|
@@ -3128,6 +3151,7 @@ pp$5.parseNew = function() {
|
|
|
3128
3151
|
}
|
|
3129
3152
|
var startPos = this.start, startLoc = this.startLoc;
|
|
3130
3153
|
node.callee = this.parseSubscripts(this.parseExprAtom(null, false, true), startPos, startLoc, true, false);
|
|
3154
|
+
if (node.callee.type === "Super") this.raiseRecoverable(startPos, "Invalid use of 'super'");
|
|
3131
3155
|
if (this.eat(types$1.parenL)) node.arguments = this.parseExprList(types$1.parenR, this.options.ecmaVersion >= 8, false);
|
|
3132
3156
|
else node.arguments = empty;
|
|
3133
3157
|
return this.finishNode(node, "NewExpression");
|
|
@@ -5084,7 +5108,7 @@ pp.readWord = function() {
|
|
|
5084
5108
|
};
|
|
5085
5109
|
Parser.acorn = {
|
|
5086
5110
|
Parser,
|
|
5087
|
-
version: "8.
|
|
5111
|
+
version: "8.17.0",
|
|
5088
5112
|
defaultOptions: defaultOptions$1,
|
|
5089
5113
|
Position,
|
|
5090
5114
|
SourceLocation,
|
|
@@ -6845,10 +6869,10 @@ const imports = async (options) => {
|
|
|
6845
6869
|
"import/no-mutable-exports": "error",
|
|
6846
6870
|
"import/no-named-default": "error",
|
|
6847
6871
|
"import/order": "off",
|
|
6848
|
-
...stylistic
|
|
6872
|
+
...stylistic && { "import/newline-after-import": ["error", {
|
|
6849
6873
|
considerComments: false,
|
|
6850
6874
|
count: 1
|
|
6851
|
-
}] }
|
|
6875
|
+
}] }
|
|
6852
6876
|
}
|
|
6853
6877
|
}];
|
|
6854
6878
|
};
|
|
@@ -11249,7 +11273,7 @@ const jsonc = async (options) => {
|
|
|
11249
11273
|
"jsonc/space-unary-ops": "error",
|
|
11250
11274
|
"jsonc/valid-json-number": "error",
|
|
11251
11275
|
"jsonc/vue-custom-block/no-parsing-error": "error",
|
|
11252
|
-
...stylistic
|
|
11276
|
+
...stylistic && {
|
|
11253
11277
|
"jsonc/array-bracket-spacing": ["error", "never"],
|
|
11254
11278
|
"jsonc/comma-dangle": ["error", "never"],
|
|
11255
11279
|
"jsonc/comma-style": ["error", "last"],
|
|
@@ -11266,7 +11290,7 @@ const jsonc = async (options) => {
|
|
|
11266
11290
|
"jsonc/object-property-newline": ["error", { allowMultiplePropertiesPerLine: true }],
|
|
11267
11291
|
"jsonc/quote-props": "error",
|
|
11268
11292
|
"jsonc/quotes": "error"
|
|
11269
|
-
}
|
|
11293
|
+
},
|
|
11270
11294
|
...overrides
|
|
11271
11295
|
}
|
|
11272
11296
|
}];
|
|
@@ -11424,7 +11448,7 @@ function typescriptRules(props) {
|
|
|
11424
11448
|
return {
|
|
11425
11449
|
...rulesFromPreset,
|
|
11426
11450
|
...typescriptRulesTypeOblivious(),
|
|
11427
|
-
...normalized.typeAware
|
|
11451
|
+
...normalized.typeAware && typescriptRulesTypeAware()
|
|
11428
11452
|
};
|
|
11429
11453
|
}
|
|
11430
11454
|
//#endregion
|
|
@@ -12239,7 +12263,7 @@ const stylistic = async (options) => {
|
|
|
12239
12263
|
avoidEscape: true
|
|
12240
12264
|
}
|
|
12241
12265
|
],
|
|
12242
|
-
...jsx
|
|
12266
|
+
...jsx && jsxStylistic()
|
|
12243
12267
|
}
|
|
12244
12268
|
}];
|
|
12245
12269
|
};
|
|
@@ -12256,20 +12280,20 @@ function typescriptParser(options) {
|
|
|
12256
12280
|
dbg("ts parser-options using `projectService`project service");
|
|
12257
12281
|
return {
|
|
12258
12282
|
files,
|
|
12259
|
-
...ignores.length > 0
|
|
12283
|
+
...ignores.length > 0 && { ignores },
|
|
12260
12284
|
languageOptions: {
|
|
12261
12285
|
parser: parserTs,
|
|
12262
12286
|
parserOptions: {
|
|
12263
12287
|
extraFileExtensions: componentExts.map((ext) => `.${ext}`),
|
|
12264
12288
|
jsxPragma: react ? "React" : void 0,
|
|
12265
12289
|
sourceType: "module",
|
|
12266
|
-
...typeAware
|
|
12290
|
+
...typeAware && {
|
|
12267
12291
|
projectService: {
|
|
12268
12292
|
allowDefaultProject: ["./*.js"],
|
|
12269
12293
|
defaultProject: (typeof tsconfig === "string" ? tsconfig : tsconfig?.[0]) ?? "tsconfig.json"
|
|
12270
12294
|
},
|
|
12271
12295
|
tsconfigRootDir: process$1.cwd()
|
|
12272
|
-
}
|
|
12296
|
+
},
|
|
12273
12297
|
...parserOptionsOverride
|
|
12274
12298
|
}
|
|
12275
12299
|
},
|
|
@@ -12279,17 +12303,17 @@ function typescriptParser(options) {
|
|
|
12279
12303
|
dbg("ts parser-options NOT using `projectService`project service - using `project`");
|
|
12280
12304
|
return {
|
|
12281
12305
|
files,
|
|
12282
|
-
...ignores.length > 0
|
|
12306
|
+
...ignores.length > 0 && { ignores },
|
|
12283
12307
|
languageOptions: {
|
|
12284
12308
|
parser: parserTs,
|
|
12285
12309
|
parserOptions: {
|
|
12286
12310
|
extraFileExtensions: componentExts.map((ext) => `.${ext}`),
|
|
12287
12311
|
jsxPragma: react ? "React" : void 0,
|
|
12288
12312
|
sourceType: "module",
|
|
12289
|
-
...typeAware
|
|
12313
|
+
...typeAware && {
|
|
12290
12314
|
project: Array.isArray(tsconfig) ? tsconfig : [tsconfig],
|
|
12291
12315
|
tsconfigRootDir: process$1.cwd().replaceAll("\\", "/")
|
|
12292
|
-
}
|
|
12316
|
+
},
|
|
12293
12317
|
...parserOptionsOverride
|
|
12294
12318
|
}
|
|
12295
12319
|
},
|
|
@@ -12395,6 +12419,7 @@ const typescript = async (options) => {
|
|
|
12395
12419
|
function unicornOff() {
|
|
12396
12420
|
return {
|
|
12397
12421
|
"unicorn/catch-error-name": "off",
|
|
12422
|
+
"unicorn/comment-content": "off",
|
|
12398
12423
|
"unicorn/consistent-destructuring": "off",
|
|
12399
12424
|
"unicorn/no-array-reduce": "off",
|
|
12400
12425
|
"unicorn/no-nested-ternary": "off",
|
|
@@ -12526,7 +12551,7 @@ const yml = async (options) => {
|
|
|
12526
12551
|
"yaml/no-irregular-whitespace": "error",
|
|
12527
12552
|
"yaml/plain-scalar": "error",
|
|
12528
12553
|
"yaml/vue-custom-block/no-parsing-error": "error",
|
|
12529
|
-
...stylistic
|
|
12554
|
+
...stylistic && {
|
|
12530
12555
|
"yaml/block-mapping-question-indicator-newline": "error",
|
|
12531
12556
|
"yaml/block-sequence-hyphen-indicator-newline": "error",
|
|
12532
12557
|
"yaml/flow-mapping-curly-newline": "error",
|
|
@@ -12541,7 +12566,7 @@ const yml = async (options) => {
|
|
|
12541
12566
|
prefer: quotes
|
|
12542
12567
|
}],
|
|
12543
12568
|
"yaml/spaced-comment": "error"
|
|
12544
|
-
}
|
|
12569
|
+
},
|
|
12545
12570
|
...overrides
|
|
12546
12571
|
}
|
|
12547
12572
|
}];
|
|
@@ -12620,7 +12645,7 @@ function normalizeOptions(options = {}) {
|
|
|
12620
12645
|
/**
|
|
12621
12646
|
* Construct an array of ESLint flat config items.
|
|
12622
12647
|
* @param options Configuration options `@jsse/eslint-config` & ESLint Flat Config
|
|
12623
|
-
* @param userConfigs Additional user
|
|
12648
|
+
* @param userConfigs Additional user ESLint configs to merge in
|
|
12624
12649
|
* @returns Array of ESLint flat config items
|
|
12625
12650
|
*/
|
|
12626
12651
|
async function jsse(options = {}, ...userConfigs) {
|
|
@@ -12671,7 +12696,7 @@ async function jsse(options = {}, ...userConfigs) {
|
|
|
12671
12696
|
const tsconfigProvided = typeof typescriptOptions === "object" && !!typescriptOptions.tsconfig;
|
|
12672
12697
|
const effectiveTypeAware = options.typeAware === void 0 ? tsconfigProvided : typeAware;
|
|
12673
12698
|
const tscfg = typescript({
|
|
12674
|
-
...typeof typescriptOptions
|
|
12699
|
+
...typeof typescriptOptions !== "boolean" && typescriptOptions,
|
|
12675
12700
|
componentExts,
|
|
12676
12701
|
overrides: overrides.typescript,
|
|
12677
12702
|
prefix: {
|
|
@@ -12711,7 +12736,7 @@ async function jsse(options = {}, ...userConfigs) {
|
|
|
12711
12736
|
}
|
|
12712
12737
|
if (tailwindOptions) console.error("Tailwind configuration is deprecated...");
|
|
12713
12738
|
const fusedConfig = flatConfigProps.reduce((acc, key) => {
|
|
12714
|
-
if (key
|
|
12739
|
+
if (Object.hasOwn(options, key)) acc[key] = options[key];
|
|
12715
12740
|
return acc;
|
|
12716
12741
|
}, {});
|
|
12717
12742
|
if (Object.keys(fusedConfig).length > 0) configs.push([fusedConfig]);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsse/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.9",
|
|
5
5
|
"description": "@jsse/eslint-config ~ WYSIWYG",
|
|
6
6
|
"author": "jessekrubin <jessekrubin@gmail.com> (https://github.com/jessekrubin/)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -65,10 +65,10 @@
|
|
|
65
65
|
"@eslint/js": "^9.39.4",
|
|
66
66
|
"@eslint/markdown": "^8.0.2",
|
|
67
67
|
"@stylistic/eslint-plugin": "5.10.0",
|
|
68
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
69
|
-
"@typescript-eslint/parser": "^8.
|
|
70
|
-
"@typescript-eslint/rule-tester": "^8.
|
|
71
|
-
"@vitest/eslint-plugin": "^1.6.
|
|
68
|
+
"@typescript-eslint/eslint-plugin": "^8.61.0",
|
|
69
|
+
"@typescript-eslint/parser": "^8.61.0",
|
|
70
|
+
"@typescript-eslint/rule-tester": "^8.61.0",
|
|
71
|
+
"@vitest/eslint-plugin": "^1.6.20",
|
|
72
72
|
"debug": "^4.4.3",
|
|
73
73
|
"eslint-config-flat-gitignore": "^2.3.0",
|
|
74
74
|
"eslint-merge-processors": "^2.0.0",
|
|
@@ -76,33 +76,33 @@
|
|
|
76
76
|
"eslint-plugin-command": "^3.5.2",
|
|
77
77
|
"eslint-plugin-de-morgan": "^2.1.2",
|
|
78
78
|
"eslint-plugin-import-lite": "^0.6.0",
|
|
79
|
-
"eslint-plugin-jsdoc": "^
|
|
80
|
-
"eslint-plugin-jsonc": "^3.
|
|
81
|
-
"eslint-plugin-n": "^18.0
|
|
79
|
+
"eslint-plugin-jsdoc": "^63.0.2",
|
|
80
|
+
"eslint-plugin-jsonc": "^3.2.0",
|
|
81
|
+
"eslint-plugin-n": "^18.1.0",
|
|
82
82
|
"eslint-plugin-no-only-tests": "^3.4.0",
|
|
83
83
|
"eslint-plugin-perfectionist": "^5.9.0",
|
|
84
84
|
"eslint-plugin-pnpm": "^1.6.1",
|
|
85
85
|
"eslint-plugin-react": "^7.37.5",
|
|
86
86
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
87
|
-
"eslint-plugin-react-refresh": "^0.5.
|
|
88
|
-
"eslint-plugin-toml": "^1.
|
|
89
|
-
"eslint-plugin-unicorn": "^
|
|
87
|
+
"eslint-plugin-react-refresh": "^0.5.3",
|
|
88
|
+
"eslint-plugin-toml": "^1.4.0",
|
|
89
|
+
"eslint-plugin-unicorn": "^66.0.0",
|
|
90
90
|
"eslint-plugin-unused-imports": "^4.4.1",
|
|
91
|
-
"eslint-plugin-yml": "^3.
|
|
91
|
+
"eslint-plugin-yml": "^3.4.0",
|
|
92
92
|
"jsonc-eslint-parser": "^3.1.0",
|
|
93
93
|
"toml-eslint-parser": "^1.0.3",
|
|
94
|
-
"typescript-eslint": "^8.
|
|
94
|
+
"typescript-eslint": "^8.61.0",
|
|
95
95
|
"yaml-eslint-parser": "^2.0.0"
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|
|
98
98
|
"@changesets/cli": "^2.31.0",
|
|
99
|
-
"@emnapi/core": "^1.
|
|
100
|
-
"@emnapi/runtime": "^1.
|
|
99
|
+
"@emnapi/core": "^1.11.1",
|
|
100
|
+
"@emnapi/runtime": "^1.11.1",
|
|
101
101
|
"@jsse/prettier-config": "^1.0.2",
|
|
102
102
|
"@jsse/tsconfig": "^0.5.1",
|
|
103
103
|
"@types/debug": "^4.1.13",
|
|
104
104
|
"@types/fs-extra": "^11.0.4",
|
|
105
|
-
"@types/node": "^25.9.
|
|
105
|
+
"@types/node": "^25.9.3",
|
|
106
106
|
"cac": "^7.0.0",
|
|
107
107
|
"eslint": "^9.39.4",
|
|
108
108
|
"eslint-flat-config-utils": "^3.2.0",
|
|
@@ -113,16 +113,16 @@
|
|
|
113
113
|
"fs-extra": "^11.3.5",
|
|
114
114
|
"globals": "^17.6.0",
|
|
115
115
|
"local-pkg": "^1.2.1",
|
|
116
|
-
"oxfmt": "^0.
|
|
117
|
-
"oxlint": "^1.
|
|
116
|
+
"oxfmt": "^0.54.0",
|
|
117
|
+
"oxlint": "^1.69.0",
|
|
118
118
|
"picocolors": "^1.1.1",
|
|
119
|
-
"prettier": "^3.8.
|
|
120
|
-
"react": "~19.2.
|
|
119
|
+
"prettier": "^3.8.4",
|
|
120
|
+
"react": "~19.2.7",
|
|
121
121
|
"rimraf": "^6.1.3",
|
|
122
|
-
"tsdown": "^0.22.
|
|
123
|
-
"tsx": "^4.22.
|
|
122
|
+
"tsdown": "^0.22.2",
|
|
123
|
+
"tsx": "^4.22.4",
|
|
124
124
|
"typescript": "~6.0.3",
|
|
125
|
-
"vitest": "^4.1.
|
|
125
|
+
"vitest": "^4.1.8"
|
|
126
126
|
},
|
|
127
127
|
"prettier": "@jsse/prettier-config",
|
|
128
128
|
"scripts": {
|
|
File without changes
|