@ntnyq/eslint-config 3.0.0-beta.10 → 3.0.0-beta.12
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/README.md +105 -6
- package/dist/index.cjs +16 -11
- package/dist/index.d.cts +6204 -2981
- package/dist/index.d.ts +6204 -2981
- package/dist/index.js +20 -15
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -196,7 +196,7 @@ var typescript = (options = {}) => [
|
|
|
196
196
|
...typescriptCore(options),
|
|
197
197
|
{
|
|
198
198
|
name: "ntnyq/ts/dts",
|
|
199
|
-
files: [GLOB_DTS],
|
|
199
|
+
files: [GLOB_DTS, "**/types/**/*.ts"],
|
|
200
200
|
rules: {
|
|
201
201
|
"no-use-before-define": "off",
|
|
202
202
|
"no-restricted-syntax": "off",
|
|
@@ -948,10 +948,10 @@ var vitest = (options = {}) => [
|
|
|
948
948
|
];
|
|
949
949
|
|
|
950
950
|
// src/configs/command.ts
|
|
951
|
-
import
|
|
951
|
+
import createCommandConfig from "eslint-plugin-command/config";
|
|
952
952
|
var command = (options = {}) => [
|
|
953
953
|
{
|
|
954
|
-
...
|
|
954
|
+
...createCommandConfig(options),
|
|
955
955
|
name: "ntnyq/command"
|
|
956
956
|
}
|
|
957
957
|
];
|
|
@@ -1199,10 +1199,10 @@ var prettier = (options = {}) => [
|
|
|
1199
1199
|
];
|
|
1200
1200
|
|
|
1201
1201
|
// src/configs/gitignore.ts
|
|
1202
|
-
import
|
|
1202
|
+
import createGitIgnoreConfig from "eslint-config-flat-gitignore";
|
|
1203
1203
|
var gitignore = (options = {}) => [
|
|
1204
1204
|
{
|
|
1205
|
-
...
|
|
1205
|
+
...createGitIgnoreConfig(options),
|
|
1206
1206
|
name: "ntnyq/gitignore"
|
|
1207
1207
|
}
|
|
1208
1208
|
];
|
|
@@ -1501,8 +1501,8 @@ var perfectionist = (options = {}) => [
|
|
|
1501
1501
|
*/
|
|
1502
1502
|
"unknown"
|
|
1503
1503
|
],
|
|
1504
|
-
order: "asc",
|
|
1505
|
-
type: "natural",
|
|
1504
|
+
order: options.imports?.order || "asc",
|
|
1505
|
+
type: options.imports?.type || "natural",
|
|
1506
1506
|
ignoreCase: true,
|
|
1507
1507
|
internalPattern: ["~/**", "@/**", "#**"],
|
|
1508
1508
|
newlinesBetween: "ignore"
|
|
@@ -1511,15 +1511,15 @@ var perfectionist = (options = {}) => [
|
|
|
1511
1511
|
"perfectionist/sort-exports": [
|
|
1512
1512
|
"error",
|
|
1513
1513
|
{
|
|
1514
|
-
order: "asc",
|
|
1515
|
-
type: "line-length"
|
|
1514
|
+
order: options.exports?.order || "asc",
|
|
1515
|
+
type: options.exports?.type || "line-length"
|
|
1516
1516
|
}
|
|
1517
1517
|
],
|
|
1518
1518
|
"perfectionist/sort-named-exports": [
|
|
1519
1519
|
"error",
|
|
1520
1520
|
{
|
|
1521
|
-
type: "alphabetical",
|
|
1522
|
-
order: "asc",
|
|
1521
|
+
type: options.namedExports?.type || "alphabetical",
|
|
1522
|
+
order: options.namedExports?.order || "asc",
|
|
1523
1523
|
ignoreCase: true,
|
|
1524
1524
|
groupKind: "values-first"
|
|
1525
1525
|
}
|
|
@@ -1527,8 +1527,8 @@ var perfectionist = (options = {}) => [
|
|
|
1527
1527
|
"perfectionist/sort-named-imports": [
|
|
1528
1528
|
"error",
|
|
1529
1529
|
{
|
|
1530
|
-
type: "alphabetical",
|
|
1531
|
-
order: "asc",
|
|
1530
|
+
type: options.namedImports?.type || "alphabetical",
|
|
1531
|
+
order: options.namedImports?.order || "asc",
|
|
1532
1532
|
ignoreCase: true,
|
|
1533
1533
|
ignoreAlias: false,
|
|
1534
1534
|
groupKind: "values-first"
|
|
@@ -1551,12 +1551,16 @@ var unusedImports = (options = {}) => [
|
|
|
1551
1551
|
"@typescript-eslint/no-unused-vars": "off",
|
|
1552
1552
|
"unused-imports/no-unused-imports": "error",
|
|
1553
1553
|
"unused-imports/no-unused-vars": [
|
|
1554
|
-
"
|
|
1554
|
+
"error",
|
|
1555
1555
|
{
|
|
1556
1556
|
vars: "all",
|
|
1557
1557
|
varsIgnorePattern: "^_",
|
|
1558
1558
|
args: "after-used",
|
|
1559
|
-
argsIgnorePattern: "^_"
|
|
1559
|
+
argsIgnorePattern: "^_",
|
|
1560
|
+
ignoreRestSiblings: true,
|
|
1561
|
+
destructuredArrayIgnorePattern: "^_",
|
|
1562
|
+
caughtErrors: "all",
|
|
1563
|
+
caughtErrorsIgnorePattern: "^_"
|
|
1560
1564
|
}
|
|
1561
1565
|
],
|
|
1562
1566
|
// Overrides built-in rules
|
|
@@ -1635,6 +1639,7 @@ function ntnyq(options = {}, userConfigs = []) {
|
|
|
1635
1639
|
if (options.perfectionist ?? true) {
|
|
1636
1640
|
configs.push(
|
|
1637
1641
|
...perfectionist({
|
|
1642
|
+
...resolveSubOptions(options, "perfectionist"),
|
|
1638
1643
|
overrides: getOverrides(options, "perfectionist")
|
|
1639
1644
|
})
|
|
1640
1645
|
);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ntnyq/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.0.0-beta.
|
|
4
|
+
"version": "3.0.0-beta.12",
|
|
5
5
|
"packageManager": "pnpm@9.10.0",
|
|
6
6
|
"description": "An opinionated ESLint config preset of ntnyq",
|
|
7
7
|
"keywords": [
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
|
|
59
59
|
"@eslint/js": "^9.10.0",
|
|
60
60
|
"@eslint/markdown": "^6.1.0",
|
|
61
|
+
"@types/eslint__js": "^8.42.3",
|
|
61
62
|
"@unocss/eslint-plugin": "^0.62.3",
|
|
62
63
|
"@vitest/eslint-plugin": "^1.1.0",
|
|
63
64
|
"eslint-config-flat-gitignore": "^0.3.0",
|