@antfu/eslint-config 8.0.0 → 8.1.0
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.mjs +4 -4
- package/dist/index.d.mts +116 -0
- package/dist/index.mjs +3 -1
- package/dist/{lib-EoktVv6C.mjs → lib-UO5evvxw.mjs} +231 -231
- package/package.json +20 -20
package/dist/cli.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { cac } from "cac";
|
|
|
8
8
|
import parse from "parse-gitignore";
|
|
9
9
|
import { execSync } from "node:child_process";
|
|
10
10
|
//#region package.json
|
|
11
|
-
var version = "8.
|
|
11
|
+
var version = "8.1.0";
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region src/cli/constants.ts
|
|
14
14
|
const vscodeSettingsString = `
|
|
@@ -169,12 +169,12 @@ const versionsMap = {
|
|
|
169
169
|
"@next/eslint-plugin-next": "^16.2.2",
|
|
170
170
|
"@unocss/eslint-plugin": "^66.6.7",
|
|
171
171
|
"astro-eslint-parser": "^1.4.0",
|
|
172
|
-
"eslint": "^10.
|
|
173
|
-
"eslint-plugin-astro": "^1.
|
|
172
|
+
"eslint": "^10.2.0",
|
|
173
|
+
"eslint-plugin-astro": "^1.7.0",
|
|
174
174
|
"eslint-plugin-format": "^2.0.1",
|
|
175
175
|
"eslint-plugin-react-refresh": "^0.5.2",
|
|
176
176
|
"eslint-plugin-solid": "^0.14.5",
|
|
177
|
-
"eslint-plugin-svelte": "^3.
|
|
177
|
+
"eslint-plugin-svelte": "^3.17.0",
|
|
178
178
|
"prettier-plugin-astro": "^0.14.1",
|
|
179
179
|
"prettier-plugin-slidev": "^1.0.5",
|
|
180
180
|
"svelte-eslint-parser": "^1.6.0"
|
package/dist/index.d.mts
CHANGED
|
@@ -763,6 +763,11 @@ interface RuleOptions {
|
|
|
763
763
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-exports-from-components/
|
|
764
764
|
*/
|
|
765
765
|
'astro/no-exports-from-components'?: Linter.RuleEntry<[]>;
|
|
766
|
+
/**
|
|
767
|
+
* disallow `prerender` export outside of pages/ directory
|
|
768
|
+
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-prerender-export-outside-pages/
|
|
769
|
+
*/
|
|
770
|
+
'astro/no-prerender-export-outside-pages'?: Linter.RuleEntry<[]>;
|
|
766
771
|
/**
|
|
767
772
|
* disallow use of `set:html` to prevent XSS attack
|
|
768
773
|
* @see https://ota-meshi.github.io/eslint-plugin-astro/rules/no-set-html-directive/
|
|
@@ -3500,6 +3505,11 @@ interface RuleOptions {
|
|
|
3500
3505
|
* @see https://perfectionist.dev/rules/sort-array-includes
|
|
3501
3506
|
*/
|
|
3502
3507
|
'perfectionist/sort-array-includes'?: Linter.RuleEntry<PerfectionistSortArrayIncludes>;
|
|
3508
|
+
/**
|
|
3509
|
+
* Enforce sorted arrays.
|
|
3510
|
+
* @see https://perfectionist.dev/rules/sort-arrays
|
|
3511
|
+
*/
|
|
3512
|
+
'perfectionist/sort-arrays'?: Linter.RuleEntry<PerfectionistSortArrays>;
|
|
3503
3513
|
/**
|
|
3504
3514
|
* Enforce sorted classes.
|
|
3505
3515
|
* @see https://perfectionist.dev/rules/sort-classes
|
|
@@ -12088,6 +12098,112 @@ type PerfectionistSortArrayIncludes = {
|
|
|
12088
12098
|
} | string)));
|
|
12089
12099
|
});
|
|
12090
12100
|
partitionByNewLine?: boolean;
|
|
12101
|
+
}[]; // ----- perfectionist/sort-arrays -----
|
|
12102
|
+
type PerfectionistSortArrays = {
|
|
12103
|
+
fallbackSort?: {
|
|
12104
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
12105
|
+
order?: ("asc" | "desc");
|
|
12106
|
+
};
|
|
12107
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
12108
|
+
specialCharacters?: ("remove" | "trim" | "keep");
|
|
12109
|
+
ignoreCase?: boolean;
|
|
12110
|
+
alphabet?: string;
|
|
12111
|
+
locales?: (string | string[]);
|
|
12112
|
+
order?: ("asc" | "desc");
|
|
12113
|
+
customGroups?: ({
|
|
12114
|
+
fallbackSort?: {
|
|
12115
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
12116
|
+
order?: ("asc" | "desc");
|
|
12117
|
+
};
|
|
12118
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
12119
|
+
groupName: string;
|
|
12120
|
+
newlinesInside?: ("ignore" | number);
|
|
12121
|
+
order?: ("asc" | "desc");
|
|
12122
|
+
anyOf: [{
|
|
12123
|
+
elementNamePattern?: (({
|
|
12124
|
+
pattern: string;
|
|
12125
|
+
flags?: string;
|
|
12126
|
+
} | string)[] | ({
|
|
12127
|
+
pattern: string;
|
|
12128
|
+
flags?: string;
|
|
12129
|
+
} | string));
|
|
12130
|
+
selector?: "literal";
|
|
12131
|
+
}, ...({
|
|
12132
|
+
elementNamePattern?: (({
|
|
12133
|
+
pattern: string;
|
|
12134
|
+
flags?: string;
|
|
12135
|
+
} | string)[] | ({
|
|
12136
|
+
pattern: string;
|
|
12137
|
+
flags?: string;
|
|
12138
|
+
} | string));
|
|
12139
|
+
selector?: "literal";
|
|
12140
|
+
})[]];
|
|
12141
|
+
} | {
|
|
12142
|
+
fallbackSort?: {
|
|
12143
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
12144
|
+
order?: ("asc" | "desc");
|
|
12145
|
+
};
|
|
12146
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
12147
|
+
groupName: string;
|
|
12148
|
+
newlinesInside?: ("ignore" | number);
|
|
12149
|
+
order?: ("asc" | "desc");
|
|
12150
|
+
elementNamePattern?: (({
|
|
12151
|
+
pattern: string;
|
|
12152
|
+
flags?: string;
|
|
12153
|
+
} | string)[] | ({
|
|
12154
|
+
pattern: string;
|
|
12155
|
+
flags?: string;
|
|
12156
|
+
} | string));
|
|
12157
|
+
selector?: "literal";
|
|
12158
|
+
})[];
|
|
12159
|
+
newlinesInside?: (("ignore" | number) | "newlinesBetween");
|
|
12160
|
+
groups?: (string | [string, ...(string)[]] | {
|
|
12161
|
+
newlinesBetween: ("ignore" | number);
|
|
12162
|
+
} | {
|
|
12163
|
+
group: (string | [string, ...(string)[]]);
|
|
12164
|
+
fallbackSort?: {
|
|
12165
|
+
type: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
12166
|
+
order?: ("asc" | "desc");
|
|
12167
|
+
};
|
|
12168
|
+
commentAbove?: string;
|
|
12169
|
+
type?: ("alphabetical" | "natural" | "line-length" | "custom" | "unsorted" | "subgroup-order");
|
|
12170
|
+
newlinesInside?: ("ignore" | number);
|
|
12171
|
+
order?: ("asc" | "desc");
|
|
12172
|
+
})[];
|
|
12173
|
+
newlinesBetween?: ("ignore" | number);
|
|
12174
|
+
useConfigurationIf: {
|
|
12175
|
+
allNamesMatchPattern?: (({
|
|
12176
|
+
pattern: string;
|
|
12177
|
+
flags?: string;
|
|
12178
|
+
} | string)[] | ({
|
|
12179
|
+
pattern: string;
|
|
12180
|
+
flags?: string;
|
|
12181
|
+
} | string));
|
|
12182
|
+
matchesAstSelector?: string;
|
|
12183
|
+
};
|
|
12184
|
+
partitionByComment?: (boolean | (({
|
|
12185
|
+
pattern: string;
|
|
12186
|
+
flags?: string;
|
|
12187
|
+
} | string)[] | ({
|
|
12188
|
+
pattern: string;
|
|
12189
|
+
flags?: string;
|
|
12190
|
+
} | string)) | {
|
|
12191
|
+
block?: (boolean | (({
|
|
12192
|
+
pattern: string;
|
|
12193
|
+
flags?: string;
|
|
12194
|
+
} | string)[] | ({
|
|
12195
|
+
pattern: string;
|
|
12196
|
+
flags?: string;
|
|
12197
|
+
} | string)));
|
|
12198
|
+
line?: (boolean | (({
|
|
12199
|
+
pattern: string;
|
|
12200
|
+
flags?: string;
|
|
12201
|
+
} | string)[] | ({
|
|
12202
|
+
pattern: string;
|
|
12203
|
+
flags?: string;
|
|
12204
|
+
} | string)));
|
|
12205
|
+
});
|
|
12206
|
+
partitionByNewLine?: boolean;
|
|
12091
12207
|
}[]; // ----- perfectionist/sort-classes -----
|
|
12092
12208
|
type PerfectionistSortClasses = {
|
|
12093
12209
|
fallbackSort?: {
|
package/dist/index.mjs
CHANGED
|
@@ -2026,7 +2026,7 @@ async function typescript(options = {}) {
|
|
|
2026
2026
|
}] : [],
|
|
2027
2027
|
...erasableOnly ? [{
|
|
2028
2028
|
name: "antfu/typescript/erasable-syntax-only",
|
|
2029
|
-
plugins: { "erasable-syntax-only": await interopDefault(import("./lib-
|
|
2029
|
+
plugins: { "erasable-syntax-only": await interopDefault(import("./lib-UO5evvxw.mjs")) },
|
|
2030
2030
|
rules: {
|
|
2031
2031
|
"erasable-syntax-only/enums": "error",
|
|
2032
2032
|
"erasable-syntax-only/import-aliases": "error",
|
|
@@ -2340,6 +2340,8 @@ async function e18e(options = {}) {
|
|
|
2340
2340
|
...modernization ? { ...configs.modernization.rules } : {},
|
|
2341
2341
|
...moduleReplacements ? { ...configs.moduleReplacements.rules } : {},
|
|
2342
2342
|
...performanceImprovements ? { ...configs.performanceImprovements.rules } : {},
|
|
2343
|
+
"e18e/prefer-array-at": "off",
|
|
2344
|
+
"e18e/prefer-array-from-map": "off",
|
|
2343
2345
|
"e18e/prefer-array-to-reversed": "off",
|
|
2344
2346
|
"e18e/prefer-array-to-sorted": "off",
|
|
2345
2347
|
"e18e/prefer-array-to-spliced": "off",
|