@lincy/eslint-config 5.2.3 → 5.2.4
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/index.cjs +18 -2
- package/dist/index.d.cts +13 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +18 -2
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1776,12 +1776,24 @@ async function typescript(options = {}) {
|
|
|
1776
1776
|
// allowTernary 设置为 true 将使你能够在表达式中使用三元运算符,类似于短路计算(默认值:false)
|
|
1777
1777
|
allowTernary: true
|
|
1778
1778
|
}],
|
|
1779
|
-
"ts/no-unused-vars":
|
|
1779
|
+
"ts/no-unused-vars": [
|
|
1780
|
+
"error",
|
|
1781
|
+
{
|
|
1782
|
+
args: "all",
|
|
1783
|
+
argsIgnorePattern: "^_",
|
|
1784
|
+
caughtErrors: "all",
|
|
1785
|
+
caughtErrorsIgnorePattern: "^_",
|
|
1786
|
+
destructuredArrayIgnorePattern: "^_",
|
|
1787
|
+
ignoreRestSiblings: true,
|
|
1788
|
+
varsIgnorePattern: "^_"
|
|
1789
|
+
}
|
|
1790
|
+
],
|
|
1780
1791
|
"ts/no-use-before-define": ["error", { classes: false, functions: false, variables: true }],
|
|
1781
1792
|
"ts/no-useless-constructor": "off",
|
|
1782
1793
|
"ts/no-wrapper-object-types": "error",
|
|
1783
1794
|
"ts/triple-slash-reference": "off",
|
|
1784
1795
|
"ts/unified-signatures": "off",
|
|
1796
|
+
"unused-imports/no-unused-vars": "off",
|
|
1785
1797
|
...type === "lib" ? {
|
|
1786
1798
|
"ts/explicit-function-return-type": ["error", {
|
|
1787
1799
|
allowExpressions: true,
|
|
@@ -2142,6 +2154,7 @@ function lincy(options = {}, ...userConfigs) {
|
|
|
2142
2154
|
autoRenamePlugins = true,
|
|
2143
2155
|
componentExts = [],
|
|
2144
2156
|
gitignore: enableGitignore = true,
|
|
2157
|
+
ignores: ignoresList = [],
|
|
2145
2158
|
jsx: enableJsx = true,
|
|
2146
2159
|
overrides = {},
|
|
2147
2160
|
react: enableReact = ReactPackages.some((i) => (0, import_local_pkg4.isPackageExists)(i)),
|
|
@@ -2180,7 +2193,10 @@ function lincy(options = {}, ...userConfigs) {
|
|
|
2180
2193
|
}
|
|
2181
2194
|
configs2.push(
|
|
2182
2195
|
ignores({
|
|
2183
|
-
ignores:
|
|
2196
|
+
ignores: [
|
|
2197
|
+
...overrides.ignores || [],
|
|
2198
|
+
...ignoresList
|
|
2199
|
+
]
|
|
2184
2200
|
}),
|
|
2185
2201
|
javascript({
|
|
2186
2202
|
isInEditor,
|
package/dist/index.d.cts
CHANGED
|
@@ -12598,6 +12598,19 @@ type TsRestrictTemplateExpressions = []|[{
|
|
|
12598
12598
|
allowRegExp?: boolean
|
|
12599
12599
|
|
|
12600
12600
|
allowNever?: boolean
|
|
12601
|
+
|
|
12602
|
+
allow?: (string | {
|
|
12603
|
+
from: "file"
|
|
12604
|
+
name: (string | [string, ...(string)[]])
|
|
12605
|
+
path?: string
|
|
12606
|
+
} | {
|
|
12607
|
+
from: "lib"
|
|
12608
|
+
name: (string | [string, ...(string)[]])
|
|
12609
|
+
} | {
|
|
12610
|
+
from: "package"
|
|
12611
|
+
name: (string | [string, ...(string)[]])
|
|
12612
|
+
package: string
|
|
12613
|
+
})[]
|
|
12601
12614
|
}]
|
|
12602
12615
|
// ----- ts/return-await -----
|
|
12603
12616
|
type TsReturnAwait = []|[(("always" | "error-handling-correctness-only" | "in-try-catch" | "never") & string)]
|
package/dist/index.d.ts
CHANGED
|
@@ -12598,6 +12598,19 @@ type TsRestrictTemplateExpressions = []|[{
|
|
|
12598
12598
|
allowRegExp?: boolean
|
|
12599
12599
|
|
|
12600
12600
|
allowNever?: boolean
|
|
12601
|
+
|
|
12602
|
+
allow?: (string | {
|
|
12603
|
+
from: "file"
|
|
12604
|
+
name: (string | [string, ...(string)[]])
|
|
12605
|
+
path?: string
|
|
12606
|
+
} | {
|
|
12607
|
+
from: "lib"
|
|
12608
|
+
name: (string | [string, ...(string)[]])
|
|
12609
|
+
} | {
|
|
12610
|
+
from: "package"
|
|
12611
|
+
name: (string | [string, ...(string)[]])
|
|
12612
|
+
package: string
|
|
12613
|
+
})[]
|
|
12601
12614
|
}]
|
|
12602
12615
|
// ----- ts/return-await -----
|
|
12603
12616
|
type TsReturnAwait = []|[(("always" | "error-handling-correctness-only" | "in-try-catch" | "never") & string)]
|
package/dist/index.js
CHANGED
|
@@ -1671,12 +1671,24 @@ async function typescript(options = {}) {
|
|
|
1671
1671
|
// allowTernary 设置为 true 将使你能够在表达式中使用三元运算符,类似于短路计算(默认值:false)
|
|
1672
1672
|
allowTernary: true
|
|
1673
1673
|
}],
|
|
1674
|
-
"ts/no-unused-vars":
|
|
1674
|
+
"ts/no-unused-vars": [
|
|
1675
|
+
"error",
|
|
1676
|
+
{
|
|
1677
|
+
args: "all",
|
|
1678
|
+
argsIgnorePattern: "^_",
|
|
1679
|
+
caughtErrors: "all",
|
|
1680
|
+
caughtErrorsIgnorePattern: "^_",
|
|
1681
|
+
destructuredArrayIgnorePattern: "^_",
|
|
1682
|
+
ignoreRestSiblings: true,
|
|
1683
|
+
varsIgnorePattern: "^_"
|
|
1684
|
+
}
|
|
1685
|
+
],
|
|
1675
1686
|
"ts/no-use-before-define": ["error", { classes: false, functions: false, variables: true }],
|
|
1676
1687
|
"ts/no-useless-constructor": "off",
|
|
1677
1688
|
"ts/no-wrapper-object-types": "error",
|
|
1678
1689
|
"ts/triple-slash-reference": "off",
|
|
1679
1690
|
"ts/unified-signatures": "off",
|
|
1691
|
+
"unused-imports/no-unused-vars": "off",
|
|
1680
1692
|
...type === "lib" ? {
|
|
1681
1693
|
"ts/explicit-function-return-type": ["error", {
|
|
1682
1694
|
allowExpressions: true,
|
|
@@ -2037,6 +2049,7 @@ function lincy(options = {}, ...userConfigs) {
|
|
|
2037
2049
|
autoRenamePlugins = true,
|
|
2038
2050
|
componentExts = [],
|
|
2039
2051
|
gitignore: enableGitignore = true,
|
|
2052
|
+
ignores: ignoresList = [],
|
|
2040
2053
|
jsx: enableJsx = true,
|
|
2041
2054
|
overrides = {},
|
|
2042
2055
|
react: enableReact = ReactPackages.some((i) => isPackageExists3(i)),
|
|
@@ -2075,7 +2088,10 @@ function lincy(options = {}, ...userConfigs) {
|
|
|
2075
2088
|
}
|
|
2076
2089
|
configs2.push(
|
|
2077
2090
|
ignores({
|
|
2078
|
-
ignores:
|
|
2091
|
+
ignores: [
|
|
2092
|
+
...overrides.ignores || [],
|
|
2093
|
+
...ignoresList
|
|
2094
|
+
]
|
|
2079
2095
|
}),
|
|
2080
2096
|
javascript({
|
|
2081
2097
|
isInEditor,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lincy/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.2.
|
|
4
|
+
"version": "5.2.4",
|
|
5
5
|
"packageManager": "pnpm@9.1.0",
|
|
6
6
|
"description": "LinCenYing's ESLint config",
|
|
7
7
|
"author": "LinCenYing <lincenying@gmail.com> (https://github.com/lincenying/)",
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
|
|
73
73
|
"@eslint/markdown": "^6.1.0",
|
|
74
74
|
"@stylistic/eslint-plugin": "2.8.0",
|
|
75
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
76
|
-
"@typescript-eslint/parser": "8.
|
|
75
|
+
"@typescript-eslint/eslint-plugin": "8.6.0",
|
|
76
|
+
"@typescript-eslint/parser": "8.6.0",
|
|
77
77
|
"@vitest/eslint-plugin": "^1.1.4",
|
|
78
78
|
"eslint-config-flat-gitignore": "^0.3.0",
|
|
79
79
|
"eslint-flat-config-utils": "^0.4.0",
|