@curev/eslint-config 0.3.1 → 0.3.2
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/{dist-QAUNCL3U.js → dist-LIAOFFCU.js} +32 -44
- package/dist/index.cjs +42 -52
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +9 -7
- package/package.json +5 -5
|
@@ -8043,9 +8043,9 @@ var require_ms = __commonJS({
|
|
|
8043
8043
|
}
|
|
8044
8044
|
});
|
|
8045
8045
|
|
|
8046
|
-
// node_modules/.pnpm/debug@4.3.
|
|
8046
|
+
// node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js
|
|
8047
8047
|
var require_common = __commonJS({
|
|
8048
|
-
"node_modules/.pnpm/debug@4.3.
|
|
8048
|
+
"node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js"(exports, module) {
|
|
8049
8049
|
"use strict";
|
|
8050
8050
|
init_esm_shims();
|
|
8051
8051
|
function setup(env) {
|
|
@@ -8208,9 +8208,9 @@ var require_common = __commonJS({
|
|
|
8208
8208
|
}
|
|
8209
8209
|
});
|
|
8210
8210
|
|
|
8211
|
-
// node_modules/.pnpm/debug@4.3.
|
|
8211
|
+
// node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/browser.js
|
|
8212
8212
|
var require_browser = __commonJS({
|
|
8213
|
-
"node_modules/.pnpm/debug@4.3.
|
|
8213
|
+
"node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/browser.js"(exports, module) {
|
|
8214
8214
|
"use strict";
|
|
8215
8215
|
init_esm_shims();
|
|
8216
8216
|
exports.formatArgs = formatArgs;
|
|
@@ -8393,30 +8393,28 @@ var require_has_flag = __commonJS({
|
|
|
8393
8393
|
}
|
|
8394
8394
|
});
|
|
8395
8395
|
|
|
8396
|
-
// node_modules/.pnpm/supports-color@
|
|
8396
|
+
// node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js
|
|
8397
8397
|
var require_supports_color = __commonJS({
|
|
8398
|
-
"node_modules/.pnpm/supports-color@
|
|
8398
|
+
"node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(exports, module) {
|
|
8399
8399
|
"use strict";
|
|
8400
8400
|
init_esm_shims();
|
|
8401
8401
|
var os = __require("os");
|
|
8402
8402
|
var tty = __require("tty");
|
|
8403
8403
|
var hasFlag = require_has_flag();
|
|
8404
8404
|
var { env } = process;
|
|
8405
|
-
var
|
|
8405
|
+
var forceColor;
|
|
8406
8406
|
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
8407
|
-
|
|
8407
|
+
forceColor = 0;
|
|
8408
8408
|
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
8409
|
-
|
|
8409
|
+
forceColor = 1;
|
|
8410
8410
|
}
|
|
8411
|
-
|
|
8412
|
-
if (
|
|
8413
|
-
|
|
8414
|
-
|
|
8415
|
-
|
|
8416
|
-
|
|
8417
|
-
|
|
8418
|
-
}
|
|
8419
|
-
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
8411
|
+
if ("FORCE_COLOR" in env) {
|
|
8412
|
+
if (env.FORCE_COLOR === "true") {
|
|
8413
|
+
forceColor = 1;
|
|
8414
|
+
} else if (env.FORCE_COLOR === "false") {
|
|
8415
|
+
forceColor = 0;
|
|
8416
|
+
} else {
|
|
8417
|
+
forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
|
|
8420
8418
|
}
|
|
8421
8419
|
}
|
|
8422
8420
|
function translateLevel(level) {
|
|
@@ -8430,22 +8428,15 @@ var require_supports_color = __commonJS({
|
|
|
8430
8428
|
has16m: level >= 3
|
|
8431
8429
|
};
|
|
8432
8430
|
}
|
|
8433
|
-
function supportsColor(haveStream,
|
|
8434
|
-
const noFlagForceColor = envForceColor();
|
|
8435
|
-
if (noFlagForceColor !== void 0) {
|
|
8436
|
-
flagForceColor = noFlagForceColor;
|
|
8437
|
-
}
|
|
8438
|
-
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
8431
|
+
function supportsColor(haveStream, streamIsTTY) {
|
|
8439
8432
|
if (forceColor === 0) {
|
|
8440
8433
|
return 0;
|
|
8441
8434
|
}
|
|
8442
|
-
if (
|
|
8443
|
-
|
|
8444
|
-
|
|
8445
|
-
|
|
8446
|
-
|
|
8447
|
-
return 2;
|
|
8448
|
-
}
|
|
8435
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
8436
|
+
return 3;
|
|
8437
|
+
}
|
|
8438
|
+
if (hasFlag("color=256")) {
|
|
8439
|
+
return 2;
|
|
8449
8440
|
}
|
|
8450
8441
|
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
|
8451
8442
|
return 0;
|
|
@@ -8462,7 +8453,7 @@ var require_supports_color = __commonJS({
|
|
|
8462
8453
|
return 1;
|
|
8463
8454
|
}
|
|
8464
8455
|
if ("CI" in env) {
|
|
8465
|
-
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"
|
|
8456
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
8466
8457
|
return 1;
|
|
8467
8458
|
}
|
|
8468
8459
|
return min;
|
|
@@ -8474,7 +8465,7 @@ var require_supports_color = __commonJS({
|
|
|
8474
8465
|
return 3;
|
|
8475
8466
|
}
|
|
8476
8467
|
if ("TERM_PROGRAM" in env) {
|
|
8477
|
-
const version =
|
|
8468
|
+
const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
8478
8469
|
switch (env.TERM_PROGRAM) {
|
|
8479
8470
|
case "iTerm.app":
|
|
8480
8471
|
return version >= 3 ? 3 : 2;
|
|
@@ -8493,24 +8484,21 @@ var require_supports_color = __commonJS({
|
|
|
8493
8484
|
}
|
|
8494
8485
|
return min;
|
|
8495
8486
|
}
|
|
8496
|
-
function getSupportLevel(stream
|
|
8497
|
-
const level = supportsColor(stream,
|
|
8498
|
-
streamIsTTY: stream && stream.isTTY,
|
|
8499
|
-
...options
|
|
8500
|
-
});
|
|
8487
|
+
function getSupportLevel(stream) {
|
|
8488
|
+
const level = supportsColor(stream, stream && stream.isTTY);
|
|
8501
8489
|
return translateLevel(level);
|
|
8502
8490
|
}
|
|
8503
8491
|
module.exports = {
|
|
8504
8492
|
supportsColor: getSupportLevel,
|
|
8505
|
-
stdout:
|
|
8506
|
-
stderr:
|
|
8493
|
+
stdout: translateLevel(supportsColor(true, tty.isatty(1))),
|
|
8494
|
+
stderr: translateLevel(supportsColor(true, tty.isatty(2)))
|
|
8507
8495
|
};
|
|
8508
8496
|
}
|
|
8509
8497
|
});
|
|
8510
8498
|
|
|
8511
|
-
// node_modules/.pnpm/debug@4.3.
|
|
8499
|
+
// node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js
|
|
8512
8500
|
var require_node = __commonJS({
|
|
8513
|
-
"node_modules/.pnpm/debug@4.3.
|
|
8501
|
+
"node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js"(exports, module) {
|
|
8514
8502
|
"use strict";
|
|
8515
8503
|
init_esm_shims();
|
|
8516
8504
|
var tty = __require("tty");
|
|
@@ -8684,9 +8672,9 @@ var require_node = __commonJS({
|
|
|
8684
8672
|
}
|
|
8685
8673
|
});
|
|
8686
8674
|
|
|
8687
|
-
// node_modules/.pnpm/debug@4.3.
|
|
8675
|
+
// node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/index.js
|
|
8688
8676
|
var require_src = __commonJS({
|
|
8689
|
-
"node_modules/.pnpm/debug@4.3.
|
|
8677
|
+
"node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/index.js"(exports, module) {
|
|
8690
8678
|
"use strict";
|
|
8691
8679
|
init_esm_shims();
|
|
8692
8680
|
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
package/dist/index.cjs
CHANGED
|
@@ -8099,9 +8099,9 @@ var require_ms = __commonJS({
|
|
|
8099
8099
|
}
|
|
8100
8100
|
});
|
|
8101
8101
|
|
|
8102
|
-
// node_modules/.pnpm/debug@4.3.
|
|
8102
|
+
// node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js
|
|
8103
8103
|
var require_common = __commonJS({
|
|
8104
|
-
"node_modules/.pnpm/debug@4.3.
|
|
8104
|
+
"node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/common.js"(exports2, module2) {
|
|
8105
8105
|
"use strict";
|
|
8106
8106
|
init_cjs_shims();
|
|
8107
8107
|
function setup(env) {
|
|
@@ -8264,9 +8264,9 @@ var require_common = __commonJS({
|
|
|
8264
8264
|
}
|
|
8265
8265
|
});
|
|
8266
8266
|
|
|
8267
|
-
// node_modules/.pnpm/debug@4.3.
|
|
8267
|
+
// node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/browser.js
|
|
8268
8268
|
var require_browser = __commonJS({
|
|
8269
|
-
"node_modules/.pnpm/debug@4.3.
|
|
8269
|
+
"node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/browser.js"(exports2, module2) {
|
|
8270
8270
|
"use strict";
|
|
8271
8271
|
init_cjs_shims();
|
|
8272
8272
|
exports2.formatArgs = formatArgs;
|
|
@@ -8449,30 +8449,28 @@ var require_has_flag = __commonJS({
|
|
|
8449
8449
|
}
|
|
8450
8450
|
});
|
|
8451
8451
|
|
|
8452
|
-
// node_modules/.pnpm/supports-color@
|
|
8452
|
+
// node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js
|
|
8453
8453
|
var require_supports_color = __commonJS({
|
|
8454
|
-
"node_modules/.pnpm/supports-color@
|
|
8454
|
+
"node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js"(exports2, module2) {
|
|
8455
8455
|
"use strict";
|
|
8456
8456
|
init_cjs_shims();
|
|
8457
8457
|
var os = require("os");
|
|
8458
8458
|
var tty = require("tty");
|
|
8459
8459
|
var hasFlag = require_has_flag();
|
|
8460
8460
|
var { env } = process;
|
|
8461
|
-
var
|
|
8461
|
+
var forceColor;
|
|
8462
8462
|
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
8463
|
-
|
|
8463
|
+
forceColor = 0;
|
|
8464
8464
|
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
8465
|
-
|
|
8465
|
+
forceColor = 1;
|
|
8466
8466
|
}
|
|
8467
|
-
|
|
8468
|
-
if (
|
|
8469
|
-
|
|
8470
|
-
|
|
8471
|
-
|
|
8472
|
-
|
|
8473
|
-
|
|
8474
|
-
}
|
|
8475
|
-
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
8467
|
+
if ("FORCE_COLOR" in env) {
|
|
8468
|
+
if (env.FORCE_COLOR === "true") {
|
|
8469
|
+
forceColor = 1;
|
|
8470
|
+
} else if (env.FORCE_COLOR === "false") {
|
|
8471
|
+
forceColor = 0;
|
|
8472
|
+
} else {
|
|
8473
|
+
forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
|
|
8476
8474
|
}
|
|
8477
8475
|
}
|
|
8478
8476
|
function translateLevel(level) {
|
|
@@ -8486,22 +8484,15 @@ var require_supports_color = __commonJS({
|
|
|
8486
8484
|
has16m: level >= 3
|
|
8487
8485
|
};
|
|
8488
8486
|
}
|
|
8489
|
-
function supportsColor(haveStream,
|
|
8490
|
-
const noFlagForceColor = envForceColor();
|
|
8491
|
-
if (noFlagForceColor !== void 0) {
|
|
8492
|
-
flagForceColor = noFlagForceColor;
|
|
8493
|
-
}
|
|
8494
|
-
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
8487
|
+
function supportsColor(haveStream, streamIsTTY) {
|
|
8495
8488
|
if (forceColor === 0) {
|
|
8496
8489
|
return 0;
|
|
8497
8490
|
}
|
|
8498
|
-
if (
|
|
8499
|
-
|
|
8500
|
-
|
|
8501
|
-
|
|
8502
|
-
|
|
8503
|
-
return 2;
|
|
8504
|
-
}
|
|
8491
|
+
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
8492
|
+
return 3;
|
|
8493
|
+
}
|
|
8494
|
+
if (hasFlag("color=256")) {
|
|
8495
|
+
return 2;
|
|
8505
8496
|
}
|
|
8506
8497
|
if (haveStream && !streamIsTTY && forceColor === void 0) {
|
|
8507
8498
|
return 0;
|
|
@@ -8518,7 +8509,7 @@ var require_supports_color = __commonJS({
|
|
|
8518
8509
|
return 1;
|
|
8519
8510
|
}
|
|
8520
8511
|
if ("CI" in env) {
|
|
8521
|
-
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"
|
|
8512
|
+
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI", "GITHUB_ACTIONS", "BUILDKITE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
|
|
8522
8513
|
return 1;
|
|
8523
8514
|
}
|
|
8524
8515
|
return min;
|
|
@@ -8530,7 +8521,7 @@ var require_supports_color = __commonJS({
|
|
|
8530
8521
|
return 3;
|
|
8531
8522
|
}
|
|
8532
8523
|
if ("TERM_PROGRAM" in env) {
|
|
8533
|
-
const version =
|
|
8524
|
+
const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
8534
8525
|
switch (env.TERM_PROGRAM) {
|
|
8535
8526
|
case "iTerm.app":
|
|
8536
8527
|
return version >= 3 ? 3 : 2;
|
|
@@ -8549,24 +8540,21 @@ var require_supports_color = __commonJS({
|
|
|
8549
8540
|
}
|
|
8550
8541
|
return min;
|
|
8551
8542
|
}
|
|
8552
|
-
function getSupportLevel(stream
|
|
8553
|
-
const level = supportsColor(stream,
|
|
8554
|
-
streamIsTTY: stream && stream.isTTY,
|
|
8555
|
-
...options
|
|
8556
|
-
});
|
|
8543
|
+
function getSupportLevel(stream) {
|
|
8544
|
+
const level = supportsColor(stream, stream && stream.isTTY);
|
|
8557
8545
|
return translateLevel(level);
|
|
8558
8546
|
}
|
|
8559
8547
|
module2.exports = {
|
|
8560
8548
|
supportsColor: getSupportLevel,
|
|
8561
|
-
stdout:
|
|
8562
|
-
stderr:
|
|
8549
|
+
stdout: translateLevel(supportsColor(true, tty.isatty(1))),
|
|
8550
|
+
stderr: translateLevel(supportsColor(true, tty.isatty(2)))
|
|
8563
8551
|
};
|
|
8564
8552
|
}
|
|
8565
8553
|
});
|
|
8566
8554
|
|
|
8567
|
-
// node_modules/.pnpm/debug@4.3.
|
|
8555
|
+
// node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js
|
|
8568
8556
|
var require_node = __commonJS({
|
|
8569
|
-
"node_modules/.pnpm/debug@4.3.
|
|
8557
|
+
"node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/node.js"(exports2, module2) {
|
|
8570
8558
|
"use strict";
|
|
8571
8559
|
init_cjs_shims();
|
|
8572
8560
|
var tty = require("tty");
|
|
@@ -8740,9 +8728,9 @@ var require_node = __commonJS({
|
|
|
8740
8728
|
}
|
|
8741
8729
|
});
|
|
8742
8730
|
|
|
8743
|
-
// node_modules/.pnpm/debug@4.3.
|
|
8731
|
+
// node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/index.js
|
|
8744
8732
|
var require_src = __commonJS({
|
|
8745
|
-
"node_modules/.pnpm/debug@4.3.
|
|
8733
|
+
"node_modules/.pnpm/debug@4.3.4/node_modules/debug/src/index.js"(exports2, module2) {
|
|
8746
8734
|
"use strict";
|
|
8747
8735
|
init_cjs_shims();
|
|
8748
8736
|
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
@@ -226762,7 +226750,7 @@ init_cjs_shims();
|
|
|
226762
226750
|
|
|
226763
226751
|
// src/plugins.ts
|
|
226764
226752
|
init_cjs_shims();
|
|
226765
|
-
var
|
|
226753
|
+
var import_eslint_plugin = __toESM(require("@curev/eslint-plugin"), 1);
|
|
226766
226754
|
var import_eslint_plugin_eslint_comments = __toESM(require("eslint-plugin-eslint-comments"), 1);
|
|
226767
226755
|
var pluginImport = __toESM(require("eslint-plugin-i"), 1);
|
|
226768
226756
|
var import_eslint_plugin_n = __toESM(require("eslint-plugin-n"), 1);
|
|
@@ -226883,7 +226871,7 @@ async function imports(options = {}) {
|
|
|
226883
226871
|
{
|
|
226884
226872
|
name: "curev:imports",
|
|
226885
226873
|
plugins: {
|
|
226886
|
-
curev:
|
|
226874
|
+
curev: import_eslint_plugin.default,
|
|
226887
226875
|
import: pluginImport
|
|
226888
226876
|
},
|
|
226889
226877
|
rules: {
|
|
@@ -226947,7 +226935,7 @@ async function javascript(options = {}) {
|
|
|
226947
226935
|
},
|
|
226948
226936
|
name: "curev:javascript",
|
|
226949
226937
|
plugins: {
|
|
226950
|
-
"antfu":
|
|
226938
|
+
"antfu": import_eslint_plugin.default,
|
|
226951
226939
|
"unused-imports": import_eslint_plugin_unused_imports.default
|
|
226952
226940
|
},
|
|
226953
226941
|
rules: {
|
|
@@ -227526,17 +227514,19 @@ async function stylistic(options = {}) {
|
|
|
227526
227514
|
{
|
|
227527
227515
|
name: "curev:stylistic",
|
|
227528
227516
|
plugins: {
|
|
227529
|
-
curev:
|
|
227517
|
+
curev: import_eslint_plugin.default,
|
|
227530
227518
|
style: pluginStylistic
|
|
227531
227519
|
},
|
|
227532
227520
|
rules: {
|
|
227533
227521
|
...config.rules,
|
|
227534
|
-
"
|
|
227535
|
-
"
|
|
227536
|
-
"
|
|
227522
|
+
"curev/consistent-list-newline": "error",
|
|
227523
|
+
"curev/if-newline": "off",
|
|
227524
|
+
"curev/top-level-function": "error",
|
|
227537
227525
|
"semi-spacing": ["error", { before: false, after: true }],
|
|
227538
227526
|
"style/brace-style": ["error", "1tbs", { allowSingleLine: true }],
|
|
227539
227527
|
"curly": ["error", "all"],
|
|
227528
|
+
"style/max-statements-per-line": ["off"],
|
|
227529
|
+
"curev/max-statements-per-line": ["error", { max: 1 }],
|
|
227540
227530
|
...overrides
|
|
227541
227531
|
}
|
|
227542
227532
|
}
|
|
@@ -228225,7 +228215,7 @@ async function typescript(options = {}) {
|
|
|
228225
228215
|
// Install the plugins without globs, so they can be configured separately.
|
|
228226
228216
|
name: "curev:typescript:setup",
|
|
228227
228217
|
plugins: {
|
|
228228
|
-
curev:
|
|
228218
|
+
curev: import_eslint_plugin.default,
|
|
228229
228219
|
ts: pluginTs
|
|
228230
228220
|
}
|
|
228231
228221
|
},
|
package/dist/index.d.cts
CHANGED
|
@@ -6,7 +6,7 @@ import { RuleConfig, MergeIntersection, RenamePrefix, VitestRules, YmlRules, NRu
|
|
|
6
6
|
import { RuleOptions as RuleOptions$1 } from '@eslint-types/jsdoc/types';
|
|
7
7
|
import { RuleOptions } from '@eslint-types/typescript-eslint/types';
|
|
8
8
|
import { RuleOptions as RuleOptions$2 } from '@eslint-types/unicorn/types';
|
|
9
|
-
import { Rules as Rules$1 } from 'eslint-plugin
|
|
9
|
+
import { Rules as Rules$1 } from '@curev/eslint-plugin';
|
|
10
10
|
import { UnprefixedRuleOptions, StylisticCustomizeOptions } from '@stylistic/eslint-plugin';
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -114,7 +114,7 @@ type WrapRuleConfig<T extends {
|
|
|
114
114
|
[K in keyof T]: T[K] extends RuleConfig ? T[K] : RuleConfig<T[K]>;
|
|
115
115
|
};
|
|
116
116
|
type Awaitable<T> = T | Promise<T>;
|
|
117
|
-
type Rules = WrapRuleConfig<MergeIntersection<RenamePrefix<RuleOptions, "@typescript-eslint/", "ts/"> & RenamePrefix<VitestRules, "vitest/", "test/"> & RenamePrefix<YmlRules, "yml/", "yaml/"> & RenamePrefix<NRules, "n/", "node/"> & Prefix<UnprefixedRuleOptions, "style/"> & Prefix<Rules$1, "
|
|
117
|
+
type Rules = WrapRuleConfig<MergeIntersection<RenamePrefix<RuleOptions, "@typescript-eslint/", "ts/"> & RenamePrefix<VitestRules, "vitest/", "test/"> & RenamePrefix<YmlRules, "yml/", "yaml/"> & RenamePrefix<NRules, "n/", "node/"> & Prefix<UnprefixedRuleOptions, "style/"> & Prefix<Rules$1, "curev/"> & ReactHooksRules & ReactRules & RuleOptions$1 & ImportRules & EslintRules & JsoncRules & VueRules & RuleOptions$2 & EslintCommentsRules & {
|
|
118
118
|
"test/no-only-tests": RuleConfig<[]>;
|
|
119
119
|
}>>;
|
|
120
120
|
type FlatConfigItem = Omit<FlatESLintConfigItem<Rules, false>, "plugins"> & {
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { RuleConfig, MergeIntersection, RenamePrefix, VitestRules, YmlRules, NRu
|
|
|
6
6
|
import { RuleOptions as RuleOptions$1 } from '@eslint-types/jsdoc/types';
|
|
7
7
|
import { RuleOptions } from '@eslint-types/typescript-eslint/types';
|
|
8
8
|
import { RuleOptions as RuleOptions$2 } from '@eslint-types/unicorn/types';
|
|
9
|
-
import { Rules as Rules$1 } from 'eslint-plugin
|
|
9
|
+
import { Rules as Rules$1 } from '@curev/eslint-plugin';
|
|
10
10
|
import { UnprefixedRuleOptions, StylisticCustomizeOptions } from '@stylistic/eslint-plugin';
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -114,7 +114,7 @@ type WrapRuleConfig<T extends {
|
|
|
114
114
|
[K in keyof T]: T[K] extends RuleConfig ? T[K] : RuleConfig<T[K]>;
|
|
115
115
|
};
|
|
116
116
|
type Awaitable<T> = T | Promise<T>;
|
|
117
|
-
type Rules = WrapRuleConfig<MergeIntersection<RenamePrefix<RuleOptions, "@typescript-eslint/", "ts/"> & RenamePrefix<VitestRules, "vitest/", "test/"> & RenamePrefix<YmlRules, "yml/", "yaml/"> & RenamePrefix<NRules, "n/", "node/"> & Prefix<UnprefixedRuleOptions, "style/"> & Prefix<Rules$1, "
|
|
117
|
+
type Rules = WrapRuleConfig<MergeIntersection<RenamePrefix<RuleOptions, "@typescript-eslint/", "ts/"> & RenamePrefix<VitestRules, "vitest/", "test/"> & RenamePrefix<YmlRules, "yml/", "yaml/"> & RenamePrefix<NRules, "n/", "node/"> & Prefix<UnprefixedRuleOptions, "style/"> & Prefix<Rules$1, "curev/"> & ReactHooksRules & ReactRules & RuleOptions$1 & ImportRules & EslintRules & JsoncRules & VueRules & RuleOptions$2 & EslintCommentsRules & {
|
|
118
118
|
"test/no-only-tests": RuleConfig<[]>;
|
|
119
119
|
}>>;
|
|
120
120
|
type FlatConfigItem = Omit<FlatESLintConfigItem<Rules, false>, "plugins"> & {
|
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ init_esm_shims();
|
|
|
19
19
|
|
|
20
20
|
// src/plugins.ts
|
|
21
21
|
init_esm_shims();
|
|
22
|
-
import { default as default2 } from "eslint-plugin
|
|
22
|
+
import { default as default2 } from "@curev/eslint-plugin";
|
|
23
23
|
import { default as default3 } from "eslint-plugin-eslint-comments";
|
|
24
24
|
import * as pluginImport from "eslint-plugin-i";
|
|
25
25
|
import { default as default4 } from "eslint-plugin-n";
|
|
@@ -788,12 +788,14 @@ async function stylistic(options = {}) {
|
|
|
788
788
|
},
|
|
789
789
|
rules: {
|
|
790
790
|
...config.rules,
|
|
791
|
-
"
|
|
792
|
-
"
|
|
793
|
-
"
|
|
791
|
+
"curev/consistent-list-newline": "error",
|
|
792
|
+
"curev/if-newline": "off",
|
|
793
|
+
"curev/top-level-function": "error",
|
|
794
794
|
"semi-spacing": ["error", { before: false, after: true }],
|
|
795
795
|
"style/brace-style": ["error", "1tbs", { allowSingleLine: true }],
|
|
796
796
|
"curly": ["error", "all"],
|
|
797
|
+
"style/max-statements-per-line": ["off"],
|
|
798
|
+
"curev/max-statements-per-line": ["error", { max: 1 }],
|
|
797
799
|
...overrides
|
|
798
800
|
}
|
|
799
801
|
}
|
|
@@ -1308,7 +1310,7 @@ async function svelte(options = {}) {
|
|
|
1308
1310
|
parser: parserSvelte,
|
|
1309
1311
|
parserOptions: {
|
|
1310
1312
|
extraFileExtensions: [".svelte"],
|
|
1311
|
-
parser: options.typescript ? await interopDefault(import("./dist-
|
|
1313
|
+
parser: options.typescript ? await interopDefault(import("./dist-LIAOFFCU.js")) : null
|
|
1312
1314
|
}
|
|
1313
1315
|
},
|
|
1314
1316
|
name: "curev:svelte:rules",
|
|
@@ -1456,7 +1458,7 @@ async function typescript(options = {}) {
|
|
|
1456
1458
|
parserTs
|
|
1457
1459
|
] = await Promise.all([
|
|
1458
1460
|
interopDefault(import("@typescript-eslint/eslint-plugin")),
|
|
1459
|
-
interopDefault(import("./dist-
|
|
1461
|
+
interopDefault(import("./dist-LIAOFFCU.js"))
|
|
1460
1462
|
]);
|
|
1461
1463
|
function makeParser(typeAware, files2, ignores2) {
|
|
1462
1464
|
return {
|
|
@@ -1684,7 +1686,7 @@ async function vue(options = {}) {
|
|
|
1684
1686
|
jsx: true
|
|
1685
1687
|
},
|
|
1686
1688
|
extraFileExtensions: [".vue"],
|
|
1687
|
-
parser: options.typescript ? await interopDefault(import("./dist-
|
|
1689
|
+
parser: options.typescript ? await interopDefault(import("./dist-LIAOFFCU.js")) : null,
|
|
1688
1690
|
sourceType: "module"
|
|
1689
1691
|
}
|
|
1690
1692
|
},
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@curev/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.2",
|
|
5
5
|
"packageManager": "pnpm@8.6.9",
|
|
6
6
|
"author": "Chizuki<chizukicn@outlook.com> (https://github.com/chizukicn/)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
"require": "./dist/index.cjs"
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
|
-
"main": "./dist/index.
|
|
16
|
+
"main": "./dist/index.cjs",
|
|
17
|
+
"module": "./dist/index.js",
|
|
17
18
|
"types": "./dist/index.d.ts",
|
|
18
19
|
"files": [
|
|
19
20
|
"dist"
|
|
@@ -54,6 +55,7 @@
|
|
|
54
55
|
"dependencies": {
|
|
55
56
|
"@antfu/eslint-define-config": "^1.23.0-2",
|
|
56
57
|
"@antfu/install-pkg": "^0.3.1",
|
|
58
|
+
"@curev/eslint-plugin": "^0.3.2",
|
|
57
59
|
"@eslint-types/jsdoc": "46.8.2-1",
|
|
58
60
|
"@eslint-types/typescript-eslint": "^6.18.1",
|
|
59
61
|
"@eslint-types/unicorn": "^50.0.1",
|
|
@@ -62,7 +64,6 @@
|
|
|
62
64
|
"eslint-config-flat-gitignore": "^0.1.2",
|
|
63
65
|
"eslint-define-config": "^2.1.0",
|
|
64
66
|
"eslint-merge-processors": "^0.1.0",
|
|
65
|
-
"eslint-plugin-antfu": "^2.1.1",
|
|
66
67
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
67
68
|
"eslint-plugin-i": "^2.29.1",
|
|
68
69
|
"eslint-plugin-jsdoc": "^48.0.2",
|
|
@@ -121,8 +122,7 @@
|
|
|
121
122
|
"tsup": "^8.0.1",
|
|
122
123
|
"typescript": "^5.3.3",
|
|
123
124
|
"vitest": "^1.2.0",
|
|
124
|
-
"vue": "^3.4.14"
|
|
125
|
-
"@curev/eslint-config": "0.3.1"
|
|
125
|
+
"vue": "^3.4.14"
|
|
126
126
|
},
|
|
127
127
|
"simple-git-hooks": {
|
|
128
128
|
"pre-commit": "npx lint-staged"
|