@antfu/eslint-config 2.22.0-beta.1 → 2.22.0-beta.3
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/cli.cjs +6 -6
- package/dist/cli.js +6 -6
- package/dist/index.cjs +10 -5
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +10 -5
- package/package.json +7 -7
package/dist/cli.cjs
CHANGED
|
@@ -48,7 +48,7 @@ var import_picocolors = __toESM(require("picocolors"), 1);
|
|
|
48
48
|
var package_default = {
|
|
49
49
|
name: "@antfu/eslint-config",
|
|
50
50
|
type: "module",
|
|
51
|
-
version: "2.22.0-beta.
|
|
51
|
+
version: "2.22.0-beta.3",
|
|
52
52
|
packageManager: "pnpm@9.4.0",
|
|
53
53
|
description: "Anthony's ESLint config",
|
|
54
54
|
author: "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
|
@@ -146,9 +146,9 @@ var package_default = {
|
|
|
146
146
|
"@antfu/install-pkg": "^0.3.3",
|
|
147
147
|
"@clack/prompts": "^0.7.0",
|
|
148
148
|
"@stylistic/eslint-plugin": "^2.6.0-beta.0",
|
|
149
|
-
"@typescript-eslint/eslint-plugin": "8.0.0-alpha.
|
|
150
|
-
"@typescript-eslint/parser": "8.0.0-alpha.
|
|
151
|
-
"eslint-config-flat-gitignore": "^0.1.
|
|
149
|
+
"@typescript-eslint/eslint-plugin": "8.0.0-alpha.40",
|
|
150
|
+
"@typescript-eslint/parser": "8.0.0-alpha.40",
|
|
151
|
+
"eslint-config-flat-gitignore": "^0.1.6",
|
|
152
152
|
"eslint-flat-config-utils": "^0.2.5",
|
|
153
153
|
"eslint-merge-processors": "^0.1.0",
|
|
154
154
|
"eslint-plugin-antfu": "^2.3.4",
|
|
@@ -182,7 +182,7 @@ var package_default = {
|
|
|
182
182
|
devDependencies: {
|
|
183
183
|
"@antfu/eslint-config": "workspace:*",
|
|
184
184
|
"@antfu/ni": "^0.21.12",
|
|
185
|
-
"@eslint-react/eslint-plugin": "^1.5.
|
|
185
|
+
"@eslint-react/eslint-plugin": "^1.5.23",
|
|
186
186
|
"@eslint/config-inspector": "^0.5.1",
|
|
187
187
|
"@prettier/plugin-xml": "^3.4.1",
|
|
188
188
|
"@stylistic/eslint-plugin-migrate": "^2.3.0",
|
|
@@ -210,7 +210,7 @@ var package_default = {
|
|
|
210
210
|
"lint-staged": "^15.2.7",
|
|
211
211
|
"prettier-plugin-astro": "^0.14.0",
|
|
212
212
|
"prettier-plugin-slidev": "^1.0.5",
|
|
213
|
-
rimraf: "^5.0.
|
|
213
|
+
rimraf: "^5.0.8",
|
|
214
214
|
"simple-git-hooks": "^2.11.1",
|
|
215
215
|
svelte: "^4.2.18",
|
|
216
216
|
"svelte-eslint-parser": "^0.39.2",
|
package/dist/cli.js
CHANGED
|
@@ -19,7 +19,7 @@ import c from "picocolors";
|
|
|
19
19
|
var package_default = {
|
|
20
20
|
name: "@antfu/eslint-config",
|
|
21
21
|
type: "module",
|
|
22
|
-
version: "2.22.0-beta.
|
|
22
|
+
version: "2.22.0-beta.3",
|
|
23
23
|
packageManager: "pnpm@9.4.0",
|
|
24
24
|
description: "Anthony's ESLint config",
|
|
25
25
|
author: "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
|
@@ -117,9 +117,9 @@ var package_default = {
|
|
|
117
117
|
"@antfu/install-pkg": "^0.3.3",
|
|
118
118
|
"@clack/prompts": "^0.7.0",
|
|
119
119
|
"@stylistic/eslint-plugin": "^2.6.0-beta.0",
|
|
120
|
-
"@typescript-eslint/eslint-plugin": "8.0.0-alpha.
|
|
121
|
-
"@typescript-eslint/parser": "8.0.0-alpha.
|
|
122
|
-
"eslint-config-flat-gitignore": "^0.1.
|
|
120
|
+
"@typescript-eslint/eslint-plugin": "8.0.0-alpha.40",
|
|
121
|
+
"@typescript-eslint/parser": "8.0.0-alpha.40",
|
|
122
|
+
"eslint-config-flat-gitignore": "^0.1.6",
|
|
123
123
|
"eslint-flat-config-utils": "^0.2.5",
|
|
124
124
|
"eslint-merge-processors": "^0.1.0",
|
|
125
125
|
"eslint-plugin-antfu": "^2.3.4",
|
|
@@ -153,7 +153,7 @@ var package_default = {
|
|
|
153
153
|
devDependencies: {
|
|
154
154
|
"@antfu/eslint-config": "workspace:*",
|
|
155
155
|
"@antfu/ni": "^0.21.12",
|
|
156
|
-
"@eslint-react/eslint-plugin": "^1.5.
|
|
156
|
+
"@eslint-react/eslint-plugin": "^1.5.23",
|
|
157
157
|
"@eslint/config-inspector": "^0.5.1",
|
|
158
158
|
"@prettier/plugin-xml": "^3.4.1",
|
|
159
159
|
"@stylistic/eslint-plugin-migrate": "^2.3.0",
|
|
@@ -181,7 +181,7 @@ var package_default = {
|
|
|
181
181
|
"lint-staged": "^15.2.7",
|
|
182
182
|
"prettier-plugin-astro": "^0.14.0",
|
|
183
183
|
"prettier-plugin-slidev": "^1.0.5",
|
|
184
|
-
rimraf: "^5.0.
|
|
184
|
+
rimraf: "^5.0.8",
|
|
185
185
|
"simple-git-hooks": "^2.11.1",
|
|
186
186
|
svelte: "^4.2.18",
|
|
187
187
|
"svelte-eslint-parser": "^0.39.2",
|
package/dist/index.cjs
CHANGED
|
@@ -679,9 +679,8 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
679
679
|
async function ignores() {
|
|
680
680
|
return [
|
|
681
681
|
{
|
|
682
|
-
ignores: GLOB_EXCLUDE
|
|
683
|
-
|
|
684
|
-
// name: 'antfu/ignores',
|
|
682
|
+
ignores: GLOB_EXCLUDE,
|
|
683
|
+
name: "antfu/ignores"
|
|
685
684
|
}
|
|
686
685
|
];
|
|
687
686
|
}
|
|
@@ -1144,6 +1143,7 @@ async function markdown(options = {}) {
|
|
|
1144
1143
|
"ts/no-namespace": "off",
|
|
1145
1144
|
"ts/no-redeclare": "off",
|
|
1146
1145
|
"ts/no-require-imports": "off",
|
|
1146
|
+
"ts/no-unused-expressions": "off",
|
|
1147
1147
|
"ts/no-unused-vars": "off",
|
|
1148
1148
|
"ts/no-use-before-define": "off",
|
|
1149
1149
|
"ts/no-var-requires": "off",
|
|
@@ -1721,7 +1721,12 @@ async function svelte(options = {}) {
|
|
|
1721
1721
|
"svelte/valid-each-key": "error",
|
|
1722
1722
|
"unused-imports/no-unused-vars": [
|
|
1723
1723
|
"error",
|
|
1724
|
-
{
|
|
1724
|
+
{
|
|
1725
|
+
args: "after-used",
|
|
1726
|
+
argsIgnorePattern: "^_",
|
|
1727
|
+
vars: "all",
|
|
1728
|
+
varsIgnorePattern: "^(_|\\$\\$Props$|\\$\\$Events$|\\$\\$Slots$)"
|
|
1729
|
+
}
|
|
1725
1730
|
],
|
|
1726
1731
|
...stylistic2 ? {
|
|
1727
1732
|
"style/indent": "off",
|
|
@@ -1962,7 +1967,7 @@ async function typescript(options = {}) {
|
|
|
1962
1967
|
// https://www.totaltypescript.com/method-shorthand-syntax-considered-harmful
|
|
1963
1968
|
"ts/no-dupe-class-members": "error",
|
|
1964
1969
|
"ts/no-dynamic-delete": "off",
|
|
1965
|
-
"ts/no-empty-object-type": "error",
|
|
1970
|
+
"ts/no-empty-object-type": ["error", { allowInterfaces: "always" }],
|
|
1966
1971
|
"ts/no-explicit-any": "off",
|
|
1967
1972
|
"ts/no-extraneous-class": "off",
|
|
1968
1973
|
"ts/no-import-type-side-effects": "error",
|
package/dist/index.d.cts
CHANGED
|
@@ -2911,7 +2911,7 @@ interface RuleOptions {
|
|
|
2911
2911
|
*/
|
|
2912
2912
|
'react-dom/no-unsafe-iframe-sandbox'?: Linter.RuleEntry<[]>
|
|
2913
2913
|
/**
|
|
2914
|
-
* disallow 'target="_blank"' on an external link without 'rel="noreferrer noopener"'
|
|
2914
|
+
* disallow 'target="_blank"' on an external link without 'rel="noreferrer noopener"'
|
|
2915
2915
|
* @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-target-blank
|
|
2916
2916
|
*/
|
|
2917
2917
|
'react-dom/no-unsafe-target-blank'?: Linter.RuleEntry<[]>
|
|
@@ -3154,7 +3154,7 @@ interface RuleOptions {
|
|
|
3154
3154
|
*/
|
|
3155
3155
|
'react/no-unused-class-component-members'?: Linter.RuleEntry<[]>
|
|
3156
3156
|
/**
|
|
3157
|
-
* Prevents unused state of class component
|
|
3157
|
+
* Prevents unused state of class component
|
|
3158
3158
|
* @see https://eslint-react.xyz/docs/rules/no-unused-state
|
|
3159
3159
|
*/
|
|
3160
3160
|
'react/no-unused-state'?: Linter.RuleEntry<[]>
|
|
@@ -3169,6 +3169,7 @@ interface RuleOptions {
|
|
|
3169
3169
|
*/
|
|
3170
3170
|
'react/prefer-destructuring-assignment'?: Linter.RuleEntry<[]>
|
|
3171
3171
|
/**
|
|
3172
|
+
* enforce that component props are read-only
|
|
3172
3173
|
* @see https://eslint-react.xyz/docs/rules/prefer-read-only-props
|
|
3173
3174
|
*/
|
|
3174
3175
|
'react/prefer-read-only-props'?: Linter.RuleEntry<[]>
|
package/dist/index.d.ts
CHANGED
|
@@ -2911,7 +2911,7 @@ interface RuleOptions {
|
|
|
2911
2911
|
*/
|
|
2912
2912
|
'react-dom/no-unsafe-iframe-sandbox'?: Linter.RuleEntry<[]>
|
|
2913
2913
|
/**
|
|
2914
|
-
* disallow 'target="_blank"' on an external link without 'rel="noreferrer noopener"'
|
|
2914
|
+
* disallow 'target="_blank"' on an external link without 'rel="noreferrer noopener"'
|
|
2915
2915
|
* @see https://eslint-react.xyz/docs/rules/dom-no-unsafe-target-blank
|
|
2916
2916
|
*/
|
|
2917
2917
|
'react-dom/no-unsafe-target-blank'?: Linter.RuleEntry<[]>
|
|
@@ -3154,7 +3154,7 @@ interface RuleOptions {
|
|
|
3154
3154
|
*/
|
|
3155
3155
|
'react/no-unused-class-component-members'?: Linter.RuleEntry<[]>
|
|
3156
3156
|
/**
|
|
3157
|
-
* Prevents unused state of class component
|
|
3157
|
+
* Prevents unused state of class component
|
|
3158
3158
|
* @see https://eslint-react.xyz/docs/rules/no-unused-state
|
|
3159
3159
|
*/
|
|
3160
3160
|
'react/no-unused-state'?: Linter.RuleEntry<[]>
|
|
@@ -3169,6 +3169,7 @@ interface RuleOptions {
|
|
|
3169
3169
|
*/
|
|
3170
3170
|
'react/prefer-destructuring-assignment'?: Linter.RuleEntry<[]>
|
|
3171
3171
|
/**
|
|
3172
|
+
* enforce that component props are read-only
|
|
3172
3173
|
* @see https://eslint-react.xyz/docs/rules/prefer-read-only-props
|
|
3173
3174
|
*/
|
|
3174
3175
|
'react/prefer-read-only-props'?: Linter.RuleEntry<[]>
|
package/dist/index.js
CHANGED
|
@@ -575,9 +575,8 @@ async function formatters(options = {}, stylistic2 = {}) {
|
|
|
575
575
|
async function ignores() {
|
|
576
576
|
return [
|
|
577
577
|
{
|
|
578
|
-
ignores: GLOB_EXCLUDE
|
|
579
|
-
|
|
580
|
-
// name: 'antfu/ignores',
|
|
578
|
+
ignores: GLOB_EXCLUDE,
|
|
579
|
+
name: "antfu/ignores"
|
|
581
580
|
}
|
|
582
581
|
];
|
|
583
582
|
}
|
|
@@ -1040,6 +1039,7 @@ async function markdown(options = {}) {
|
|
|
1040
1039
|
"ts/no-namespace": "off",
|
|
1041
1040
|
"ts/no-redeclare": "off",
|
|
1042
1041
|
"ts/no-require-imports": "off",
|
|
1042
|
+
"ts/no-unused-expressions": "off",
|
|
1043
1043
|
"ts/no-unused-vars": "off",
|
|
1044
1044
|
"ts/no-use-before-define": "off",
|
|
1045
1045
|
"ts/no-var-requires": "off",
|
|
@@ -1617,7 +1617,12 @@ async function svelte(options = {}) {
|
|
|
1617
1617
|
"svelte/valid-each-key": "error",
|
|
1618
1618
|
"unused-imports/no-unused-vars": [
|
|
1619
1619
|
"error",
|
|
1620
|
-
{
|
|
1620
|
+
{
|
|
1621
|
+
args: "after-used",
|
|
1622
|
+
argsIgnorePattern: "^_",
|
|
1623
|
+
vars: "all",
|
|
1624
|
+
varsIgnorePattern: "^(_|\\$\\$Props$|\\$\\$Events$|\\$\\$Slots$)"
|
|
1625
|
+
}
|
|
1621
1626
|
],
|
|
1622
1627
|
...stylistic2 ? {
|
|
1623
1628
|
"style/indent": "off",
|
|
@@ -1858,7 +1863,7 @@ async function typescript(options = {}) {
|
|
|
1858
1863
|
// https://www.totaltypescript.com/method-shorthand-syntax-considered-harmful
|
|
1859
1864
|
"ts/no-dupe-class-members": "error",
|
|
1860
1865
|
"ts/no-dynamic-delete": "off",
|
|
1861
|
-
"ts/no-empty-object-type": "error",
|
|
1866
|
+
"ts/no-empty-object-type": ["error", { allowInterfaces: "always" }],
|
|
1862
1867
|
"ts/no-explicit-any": "off",
|
|
1863
1868
|
"ts/no-extraneous-class": "off",
|
|
1864
1869
|
"ts/no-import-type-side-effects": "error",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antfu/eslint-config",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.22.0-beta.
|
|
4
|
+
"version": "2.22.0-beta.3",
|
|
5
5
|
"description": "Anthony's ESLint config",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com> (https://github.com/antfu/)",
|
|
7
7
|
"license": "MIT",
|
|
@@ -84,9 +84,9 @@
|
|
|
84
84
|
"@antfu/install-pkg": "^0.3.3",
|
|
85
85
|
"@clack/prompts": "^0.7.0",
|
|
86
86
|
"@stylistic/eslint-plugin": "^2.6.0-beta.0",
|
|
87
|
-
"@typescript-eslint/eslint-plugin": "8.0.0-alpha.
|
|
88
|
-
"@typescript-eslint/parser": "8.0.0-alpha.
|
|
89
|
-
"eslint-config-flat-gitignore": "^0.1.
|
|
87
|
+
"@typescript-eslint/eslint-plugin": "8.0.0-alpha.40",
|
|
88
|
+
"@typescript-eslint/parser": "8.0.0-alpha.40",
|
|
89
|
+
"eslint-config-flat-gitignore": "^0.1.6",
|
|
90
90
|
"eslint-flat-config-utils": "^0.2.5",
|
|
91
91
|
"eslint-merge-processors": "^0.1.0",
|
|
92
92
|
"eslint-plugin-antfu": "^2.3.4",
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
},
|
|
120
120
|
"devDependencies": {
|
|
121
121
|
"@antfu/ni": "^0.21.12",
|
|
122
|
-
"@eslint-react/eslint-plugin": "^1.5.
|
|
122
|
+
"@eslint-react/eslint-plugin": "^1.5.23",
|
|
123
123
|
"@eslint/config-inspector": "^0.5.1",
|
|
124
124
|
"@prettier/plugin-xml": "^3.4.1",
|
|
125
125
|
"@stylistic/eslint-plugin-migrate": "^2.3.0",
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
"lint-staged": "^15.2.7",
|
|
148
148
|
"prettier-plugin-astro": "^0.14.0",
|
|
149
149
|
"prettier-plugin-slidev": "^1.0.5",
|
|
150
|
-
"rimraf": "^5.0.
|
|
150
|
+
"rimraf": "^5.0.8",
|
|
151
151
|
"simple-git-hooks": "^2.11.1",
|
|
152
152
|
"svelte": "^4.2.18",
|
|
153
153
|
"svelte-eslint-parser": "^0.39.2",
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
"typescript": "^5.5.3",
|
|
157
157
|
"vitest": "^1.6.0",
|
|
158
158
|
"vue": "^3.4.31",
|
|
159
|
-
"@antfu/eslint-config": "2.22.0-beta.
|
|
159
|
+
"@antfu/eslint-config": "2.22.0-beta.3"
|
|
160
160
|
},
|
|
161
161
|
"resolutions": {
|
|
162
162
|
"tsx": "~4.16.2"
|