@so1ve/eslint-config 3.9.1 → 3.10.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/index.d.ts +112 -53
- package/dist/index.js +22 -26
- package/package.json +20 -20
package/dist/index.d.ts
CHANGED
|
@@ -462,6 +462,11 @@ interface RuleOptions {
|
|
|
462
462
|
* @see https://html-eslint.org/docs/rules/no-restricted-attrs
|
|
463
463
|
*/
|
|
464
464
|
'html/no-restricted-attrs'?: Linter.RuleEntry<HtmlNoRestrictedAttrs>;
|
|
465
|
+
/**
|
|
466
|
+
* Disallow specified tags
|
|
467
|
+
* @see https://html-eslint.org/docs/rules/no-restricted-tags
|
|
468
|
+
*/
|
|
469
|
+
'html/no-restricted-tags'?: Linter.RuleEntry<HtmlNoRestrictedTags>;
|
|
465
470
|
/**
|
|
466
471
|
* Enforce to omit type attributes for style sheets and scripts
|
|
467
472
|
* @see https://html-eslint.org/docs/rules/no-script-style-type
|
|
@@ -2113,12 +2118,12 @@ interface RuleOptions {
|
|
|
2113
2118
|
*/
|
|
2114
2119
|
'node/no-hide-core-modules'?: Linter.RuleEntry<NodeNoHideCoreModules>;
|
|
2115
2120
|
/**
|
|
2116
|
-
* disallow `import` declarations which import
|
|
2121
|
+
* disallow `import` declarations which import missing modules
|
|
2117
2122
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-missing-import.md
|
|
2118
2123
|
*/
|
|
2119
2124
|
'node/no-missing-import'?: Linter.RuleEntry<NodeNoMissingImport>;
|
|
2120
2125
|
/**
|
|
2121
|
-
* disallow `require()` expressions which import
|
|
2126
|
+
* disallow `require()` expressions which import missing modules
|
|
2122
2127
|
* @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-missing-require.md
|
|
2123
2128
|
*/
|
|
2124
2129
|
'node/no-missing-require'?: Linter.RuleEntry<NodeNoMissingRequire>;
|
|
@@ -2988,6 +2993,11 @@ interface RuleOptions {
|
|
|
2988
2993
|
* @see pad-after-last-import
|
|
2989
2994
|
*/
|
|
2990
2995
|
'so1ve/pad-after-last-import'?: Linter.RuleEntry<[]>;
|
|
2996
|
+
/**
|
|
2997
|
+
* Enforce using `@ts-expect-error` over `@ts-ignore`
|
|
2998
|
+
* @see prefer-ts-expect-error
|
|
2999
|
+
*/
|
|
3000
|
+
'so1ve/prefer-ts-expect-error'?: Linter.RuleEntry<[]>;
|
|
2991
3001
|
/**
|
|
2992
3002
|
* Require using async keyword with await.
|
|
2993
3003
|
* @see require-async-with-await
|
|
@@ -4196,7 +4206,7 @@ interface RuleOptions {
|
|
|
4196
4206
|
* Disallow member access on a value with type `any`
|
|
4197
4207
|
* @see https://typescript-eslint.io/rules/no-unsafe-member-access
|
|
4198
4208
|
*/
|
|
4199
|
-
'ts/no-unsafe-member-access'?: Linter.RuleEntry<
|
|
4209
|
+
'ts/no-unsafe-member-access'?: Linter.RuleEntry<TsNoUnsafeMemberAccess>;
|
|
4200
4210
|
/**
|
|
4201
4211
|
* Disallow returning a value with type `any` from a function
|
|
4202
4212
|
* @see https://typescript-eslint.io/rules/no-unsafe-return
|
|
@@ -5355,6 +5365,11 @@ interface RuleOptions {
|
|
|
5355
5365
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/padding-around-test-blocks.md
|
|
5356
5366
|
*/
|
|
5357
5367
|
'vitest/padding-around-test-blocks'?: Linter.RuleEntry<[]>;
|
|
5368
|
+
/**
|
|
5369
|
+
* Prefer `toHaveBeenCalledExactlyOnceWith` over `toHaveBeenCalledOnce` and `toHaveBeenCalledWith`
|
|
5370
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-exactly-once-with.md
|
|
5371
|
+
*/
|
|
5372
|
+
'vitest/prefer-called-exactly-once-with'?: Linter.RuleEntry<[]>;
|
|
5358
5373
|
/**
|
|
5359
5374
|
* enforce using `toBeCalledOnce()` or `toHaveBeenCalledOnce()`
|
|
5360
5375
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-once.md
|
|
@@ -5415,6 +5430,11 @@ interface RuleOptions {
|
|
|
5415
5430
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-hooks-on-top.md
|
|
5416
5431
|
*/
|
|
5417
5432
|
'vitest/prefer-hooks-on-top'?: Linter.RuleEntry<[]>;
|
|
5433
|
+
/**
|
|
5434
|
+
* prefer dynamic import in mock
|
|
5435
|
+
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-import-in-mock.md
|
|
5436
|
+
*/
|
|
5437
|
+
'vitest/prefer-import-in-mock'?: Linter.RuleEntry<[]>;
|
|
5418
5438
|
/**
|
|
5419
5439
|
* enforce importing Vitest globals
|
|
5420
5440
|
* @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-importing-vitest-globals.md
|
|
@@ -5834,7 +5854,7 @@ interface RuleOptions {
|
|
|
5834
5854
|
* disallow asynchronous actions in computed properties
|
|
5835
5855
|
* @see https://eslint.vuejs.org/rules/no-async-in-computed-properties.html
|
|
5836
5856
|
*/
|
|
5837
|
-
'vue/no-async-in-computed-properties'?: Linter.RuleEntry<
|
|
5857
|
+
'vue/no-async-in-computed-properties'?: Linter.RuleEntry<VueNoAsyncInComputedProperties>;
|
|
5838
5858
|
/**
|
|
5839
5859
|
* disallow the use of bare strings in `<template>`
|
|
5840
5860
|
* @see https://eslint.vuejs.org/rules/no-bare-strings-in-template.html
|
|
@@ -6335,7 +6355,7 @@ interface RuleOptions {
|
|
|
6335
6355
|
* disallow use of v-html to prevent XSS attack
|
|
6336
6356
|
* @see https://eslint.vuejs.org/rules/no-v-html.html
|
|
6337
6357
|
*/
|
|
6338
|
-
'vue/no-v-html'?: Linter.RuleEntry<
|
|
6358
|
+
'vue/no-v-html'?: Linter.RuleEntry<VueNoVHtml>;
|
|
6339
6359
|
/**
|
|
6340
6360
|
* disallow adding an argument to `v-model` used in custom component
|
|
6341
6361
|
* @see https://eslint.vuejs.org/rules/no-v-model-argument.html
|
|
@@ -7211,6 +7231,11 @@ type HtmlNoRestrictedAttrs = {
|
|
|
7211
7231
|
attrPatterns: string[];
|
|
7212
7232
|
message?: string;
|
|
7213
7233
|
}[];
|
|
7234
|
+
// ----- html/no-restricted-tags -----
|
|
7235
|
+
type HtmlNoRestrictedTags = {
|
|
7236
|
+
tagPatterns: string[];
|
|
7237
|
+
message?: string;
|
|
7238
|
+
}[];
|
|
7214
7239
|
// ----- html/quotes -----
|
|
7215
7240
|
type HtmlQuotes = [] | [("single" | "double")] | [("single" | "double"), {
|
|
7216
7241
|
enforceTemplatedAttrValue?: boolean;
|
|
@@ -8599,12 +8624,14 @@ type NoRestrictedImports = ((string | {
|
|
|
8599
8624
|
message?: string;
|
|
8600
8625
|
importNames?: string[];
|
|
8601
8626
|
allowImportNames?: string[];
|
|
8627
|
+
allowTypeImports?: boolean;
|
|
8602
8628
|
})[] | [] | [{
|
|
8603
8629
|
paths?: (string | {
|
|
8604
8630
|
name: string;
|
|
8605
8631
|
message?: string;
|
|
8606
8632
|
importNames?: string[];
|
|
8607
8633
|
allowImportNames?: string[];
|
|
8634
|
+
allowTypeImports?: boolean;
|
|
8608
8635
|
})[];
|
|
8609
8636
|
patterns?: (string[] | ({
|
|
8610
8637
|
[k: string]: unknown | undefined;
|
|
@@ -9700,6 +9727,10 @@ type StyleGeneratorStarSpacing = [] | [(("before" | "after" | "both" | "neither"
|
|
|
9700
9727
|
before?: boolean;
|
|
9701
9728
|
after?: boolean;
|
|
9702
9729
|
});
|
|
9730
|
+
shorthand?: (("before" | "after" | "both" | "neither") | {
|
|
9731
|
+
before?: boolean;
|
|
9732
|
+
after?: boolean;
|
|
9733
|
+
});
|
|
9703
9734
|
})];
|
|
9704
9735
|
// ----- style/implicit-arrow-linebreak -----
|
|
9705
9736
|
type StyleImplicitArrowLinebreak = [] | [("beside" | "below")];
|
|
@@ -9945,22 +9976,6 @@ type StyleKeywordSpacing = [] | [{
|
|
|
9945
9976
|
before?: boolean;
|
|
9946
9977
|
after?: boolean;
|
|
9947
9978
|
};
|
|
9948
|
-
arguments?: {
|
|
9949
|
-
before?: boolean;
|
|
9950
|
-
after?: boolean;
|
|
9951
|
-
};
|
|
9952
|
-
as?: {
|
|
9953
|
-
before?: boolean;
|
|
9954
|
-
after?: boolean;
|
|
9955
|
-
};
|
|
9956
|
-
async?: {
|
|
9957
|
-
before?: boolean;
|
|
9958
|
-
after?: boolean;
|
|
9959
|
-
};
|
|
9960
|
-
await?: {
|
|
9961
|
-
before?: boolean;
|
|
9962
|
-
after?: boolean;
|
|
9963
|
-
};
|
|
9964
9979
|
boolean?: {
|
|
9965
9980
|
before?: boolean;
|
|
9966
9981
|
after?: boolean;
|
|
@@ -10025,10 +10040,6 @@ type StyleKeywordSpacing = [] | [{
|
|
|
10025
10040
|
before?: boolean;
|
|
10026
10041
|
after?: boolean;
|
|
10027
10042
|
};
|
|
10028
|
-
eval?: {
|
|
10029
|
-
before?: boolean;
|
|
10030
|
-
after?: boolean;
|
|
10031
|
-
};
|
|
10032
10043
|
export?: {
|
|
10033
10044
|
before?: boolean;
|
|
10034
10045
|
after?: boolean;
|
|
@@ -10057,18 +10068,10 @@ type StyleKeywordSpacing = [] | [{
|
|
|
10057
10068
|
before?: boolean;
|
|
10058
10069
|
after?: boolean;
|
|
10059
10070
|
};
|
|
10060
|
-
from?: {
|
|
10061
|
-
before?: boolean;
|
|
10062
|
-
after?: boolean;
|
|
10063
|
-
};
|
|
10064
10071
|
function?: {
|
|
10065
10072
|
before?: boolean;
|
|
10066
10073
|
after?: boolean;
|
|
10067
10074
|
};
|
|
10068
|
-
get?: {
|
|
10069
|
-
before?: boolean;
|
|
10070
|
-
after?: boolean;
|
|
10071
|
-
};
|
|
10072
10075
|
goto?: {
|
|
10073
10076
|
before?: boolean;
|
|
10074
10077
|
after?: boolean;
|
|
@@ -10101,10 +10104,6 @@ type StyleKeywordSpacing = [] | [{
|
|
|
10101
10104
|
before?: boolean;
|
|
10102
10105
|
after?: boolean;
|
|
10103
10106
|
};
|
|
10104
|
-
let?: {
|
|
10105
|
-
before?: boolean;
|
|
10106
|
-
after?: boolean;
|
|
10107
|
-
};
|
|
10108
10107
|
long?: {
|
|
10109
10108
|
before?: boolean;
|
|
10110
10109
|
after?: boolean;
|
|
@@ -10121,10 +10120,6 @@ type StyleKeywordSpacing = [] | [{
|
|
|
10121
10120
|
before?: boolean;
|
|
10122
10121
|
after?: boolean;
|
|
10123
10122
|
};
|
|
10124
|
-
of?: {
|
|
10125
|
-
before?: boolean;
|
|
10126
|
-
after?: boolean;
|
|
10127
|
-
};
|
|
10128
10123
|
package?: {
|
|
10129
10124
|
before?: boolean;
|
|
10130
10125
|
after?: boolean;
|
|
@@ -10145,10 +10140,6 @@ type StyleKeywordSpacing = [] | [{
|
|
|
10145
10140
|
before?: boolean;
|
|
10146
10141
|
after?: boolean;
|
|
10147
10142
|
};
|
|
10148
|
-
set?: {
|
|
10149
|
-
before?: boolean;
|
|
10150
|
-
after?: boolean;
|
|
10151
|
-
};
|
|
10152
10143
|
short?: {
|
|
10153
10144
|
before?: boolean;
|
|
10154
10145
|
after?: boolean;
|
|
@@ -10193,18 +10184,10 @@ type StyleKeywordSpacing = [] | [{
|
|
|
10193
10184
|
before?: boolean;
|
|
10194
10185
|
after?: boolean;
|
|
10195
10186
|
};
|
|
10196
|
-
type?: {
|
|
10197
|
-
before?: boolean;
|
|
10198
|
-
after?: boolean;
|
|
10199
|
-
};
|
|
10200
10187
|
typeof?: {
|
|
10201
10188
|
before?: boolean;
|
|
10202
10189
|
after?: boolean;
|
|
10203
10190
|
};
|
|
10204
|
-
using?: {
|
|
10205
|
-
before?: boolean;
|
|
10206
|
-
after?: boolean;
|
|
10207
|
-
};
|
|
10208
10191
|
var?: {
|
|
10209
10192
|
before?: boolean;
|
|
10210
10193
|
after?: boolean;
|
|
@@ -10225,6 +10208,54 @@ type StyleKeywordSpacing = [] | [{
|
|
|
10225
10208
|
before?: boolean;
|
|
10226
10209
|
after?: boolean;
|
|
10227
10210
|
};
|
|
10211
|
+
arguments?: {
|
|
10212
|
+
before?: boolean;
|
|
10213
|
+
after?: boolean;
|
|
10214
|
+
};
|
|
10215
|
+
as?: {
|
|
10216
|
+
before?: boolean;
|
|
10217
|
+
after?: boolean;
|
|
10218
|
+
};
|
|
10219
|
+
async?: {
|
|
10220
|
+
before?: boolean;
|
|
10221
|
+
after?: boolean;
|
|
10222
|
+
};
|
|
10223
|
+
await?: {
|
|
10224
|
+
before?: boolean;
|
|
10225
|
+
after?: boolean;
|
|
10226
|
+
};
|
|
10227
|
+
eval?: {
|
|
10228
|
+
before?: boolean;
|
|
10229
|
+
after?: boolean;
|
|
10230
|
+
};
|
|
10231
|
+
from?: {
|
|
10232
|
+
before?: boolean;
|
|
10233
|
+
after?: boolean;
|
|
10234
|
+
};
|
|
10235
|
+
get?: {
|
|
10236
|
+
before?: boolean;
|
|
10237
|
+
after?: boolean;
|
|
10238
|
+
};
|
|
10239
|
+
let?: {
|
|
10240
|
+
before?: boolean;
|
|
10241
|
+
after?: boolean;
|
|
10242
|
+
};
|
|
10243
|
+
of?: {
|
|
10244
|
+
before?: boolean;
|
|
10245
|
+
after?: boolean;
|
|
10246
|
+
};
|
|
10247
|
+
set?: {
|
|
10248
|
+
before?: boolean;
|
|
10249
|
+
after?: boolean;
|
|
10250
|
+
};
|
|
10251
|
+
type?: {
|
|
10252
|
+
before?: boolean;
|
|
10253
|
+
after?: boolean;
|
|
10254
|
+
};
|
|
10255
|
+
using?: {
|
|
10256
|
+
before?: boolean;
|
|
10257
|
+
after?: boolean;
|
|
10258
|
+
};
|
|
10228
10259
|
yield?: {
|
|
10229
10260
|
before?: boolean;
|
|
10230
10261
|
after?: boolean;
|
|
@@ -10524,6 +10555,18 @@ type StyleObjectCurlyNewline = [] | [((("always" | "never") | {
|
|
|
10524
10555
|
type StyleObjectCurlySpacing = [] | [("always" | "never")] | [("always" | "never"), {
|
|
10525
10556
|
arraysInObjects?: boolean;
|
|
10526
10557
|
objectsInObjects?: boolean;
|
|
10558
|
+
overrides?: {
|
|
10559
|
+
ObjectPattern?: ("always" | "never");
|
|
10560
|
+
ObjectExpression?: ("always" | "never");
|
|
10561
|
+
ImportDeclaration?: ("always" | "never");
|
|
10562
|
+
ImportAttributes?: ("always" | "never");
|
|
10563
|
+
ExportNamedDeclaration?: ("always" | "never");
|
|
10564
|
+
ExportAllDeclaration?: ("always" | "never");
|
|
10565
|
+
TSMappedType?: ("always" | "never");
|
|
10566
|
+
TSTypeLiteral?: ("always" | "never");
|
|
10567
|
+
TSInterfaceBody?: ("always" | "never");
|
|
10568
|
+
TSEnumBody?: ("always" | "never");
|
|
10569
|
+
};
|
|
10527
10570
|
}];
|
|
10528
10571
|
// ----- style/object-property-newline -----
|
|
10529
10572
|
type StyleObjectPropertyNewline = [] | [{
|
|
@@ -11496,6 +11539,10 @@ type TsNoUnnecessaryTypeAssertion = [] | [{
|
|
|
11496
11539
|
checkLiteralConstAssertions?: boolean;
|
|
11497
11540
|
typesToIgnore?: string[];
|
|
11498
11541
|
}];
|
|
11542
|
+
// ----- ts/no-unsafe-member-access -----
|
|
11543
|
+
type TsNoUnsafeMemberAccess = [] | [{
|
|
11544
|
+
allowOptionalChaining?: boolean;
|
|
11545
|
+
}];
|
|
11499
11546
|
// ----- ts/no-unused-expressions -----
|
|
11500
11547
|
type TsNoUnusedExpressions = [] | [{
|
|
11501
11548
|
allowShortCircuit?: boolean;
|
|
@@ -11513,6 +11560,7 @@ type TsNoUnusedVars = [] | [(("all" | "local") | {
|
|
|
11513
11560
|
destructuredArrayIgnorePattern?: string;
|
|
11514
11561
|
ignoreClassWithStaticInitBlock?: boolean;
|
|
11515
11562
|
ignoreRestSiblings?: boolean;
|
|
11563
|
+
ignoreUsingDeclarations?: boolean;
|
|
11516
11564
|
reportUsedIgnorePattern?: boolean;
|
|
11517
11565
|
vars?: ("all" | "local");
|
|
11518
11566
|
varsIgnorePattern?: string;
|
|
@@ -11972,6 +12020,7 @@ type UnusedImportsNoUnusedImports = [] | [(("all" | "local") | {
|
|
|
11972
12020
|
destructuredArrayIgnorePattern?: string;
|
|
11973
12021
|
ignoreClassWithStaticInitBlock?: boolean;
|
|
11974
12022
|
ignoreRestSiblings?: boolean;
|
|
12023
|
+
ignoreUsingDeclarations?: boolean;
|
|
11975
12024
|
reportUsedIgnorePattern?: boolean;
|
|
11976
12025
|
vars?: ("all" | "local");
|
|
11977
12026
|
varsIgnorePattern?: string;
|
|
@@ -11985,6 +12034,7 @@ type UnusedImportsNoUnusedVars = [] | [(("all" | "local") | {
|
|
|
11985
12034
|
destructuredArrayIgnorePattern?: string;
|
|
11986
12035
|
ignoreClassWithStaticInitBlock?: boolean;
|
|
11987
12036
|
ignoreRestSiblings?: boolean;
|
|
12037
|
+
ignoreUsingDeclarations?: boolean;
|
|
11988
12038
|
reportUsedIgnorePattern?: boolean;
|
|
11989
12039
|
vars?: ("all" | "local");
|
|
11990
12040
|
varsIgnorePattern?: string;
|
|
@@ -12134,6 +12184,7 @@ type VueAttributeHyphenation = [] | [("always" | "never")] | [("always" | "never
|
|
|
12134
12184
|
type VueAttributesOrder = [] | [{
|
|
12135
12185
|
order?: (("DEFINITION" | "LIST_RENDERING" | "CONDITIONALS" | "RENDER_MODIFIERS" | "GLOBAL" | "UNIQUE" | "SLOT" | "TWO_WAY_BINDING" | "OTHER_DIRECTIVES" | "OTHER_ATTR" | "ATTR_STATIC" | "ATTR_DYNAMIC" | "ATTR_SHORTHAND_BOOL" | "EVENTS" | "CONTENT") | ("DEFINITION" | "LIST_RENDERING" | "CONDITIONALS" | "RENDER_MODIFIERS" | "GLOBAL" | "UNIQUE" | "SLOT" | "TWO_WAY_BINDING" | "OTHER_DIRECTIVES" | "OTHER_ATTR" | "ATTR_STATIC" | "ATTR_DYNAMIC" | "ATTR_SHORTHAND_BOOL" | "EVENTS" | "CONTENT")[])[];
|
|
12136
12186
|
alphabetical?: boolean;
|
|
12187
|
+
sortLineLength?: boolean;
|
|
12137
12188
|
}];
|
|
12138
12189
|
// ----- vue/block-lang -----
|
|
12139
12190
|
type VueBlockLang = [] | [{
|
|
@@ -12780,6 +12831,10 @@ type VueNewLineBetweenMultiLineProperty = [] | [{
|
|
|
12780
12831
|
}];
|
|
12781
12832
|
// ----- vue/next-tick-style -----
|
|
12782
12833
|
type VueNextTickStyle = [] | [("promise" | "callback")];
|
|
12834
|
+
// ----- vue/no-async-in-computed-properties -----
|
|
12835
|
+
type VueNoAsyncInComputedProperties = [] | [{
|
|
12836
|
+
ignoredObjectNames?: string[];
|
|
12837
|
+
}];
|
|
12783
12838
|
// ----- vue/no-bare-strings-in-template -----
|
|
12784
12839
|
type VueNoBareStringsInTemplate = [] | [{
|
|
12785
12840
|
allowlist?: string[];
|
|
@@ -13064,6 +13119,10 @@ type VueNoUselessVBind = [] | [{
|
|
|
13064
13119
|
ignoreIncludesComment?: boolean;
|
|
13065
13120
|
ignoreStringEscape?: boolean;
|
|
13066
13121
|
}];
|
|
13122
|
+
// ----- vue/no-v-html -----
|
|
13123
|
+
type VueNoVHtml = [] | [{
|
|
13124
|
+
ignorePattern?: string;
|
|
13125
|
+
}];
|
|
13067
13126
|
// ----- vue/no-v-text-v-html-on-component -----
|
|
13068
13127
|
type VueNoVTextVHtmlOnComponent = [] | [{
|
|
13069
13128
|
allow?: string[];
|
package/dist/index.js
CHANGED
|
@@ -201,6 +201,7 @@ async function formatting(options) {
|
|
|
201
201
|
"so1ve/function-style": "error",
|
|
202
202
|
"style/quote-props": ["error", "consistent-as-needed"],
|
|
203
203
|
"style/curly-newline": ["error", { minElements: 1 }],
|
|
204
|
+
"style/no-extra-parens": ["error", "functions"],
|
|
204
205
|
"style/padding-line-between-statements": ["error", {
|
|
205
206
|
blankLine: "always",
|
|
206
207
|
prev: "*",
|
|
@@ -210,6 +211,21 @@ async function formatting(options) {
|
|
|
210
211
|
"error",
|
|
211
212
|
"always",
|
|
212
213
|
{ exceptAfterSingleLine: true }
|
|
214
|
+
],
|
|
215
|
+
"style/spaced-comment": [
|
|
216
|
+
"error",
|
|
217
|
+
"always",
|
|
218
|
+
{
|
|
219
|
+
line: {
|
|
220
|
+
markers: ["/"],
|
|
221
|
+
exceptions: ["/", "#"]
|
|
222
|
+
},
|
|
223
|
+
block: {
|
|
224
|
+
markers: ["!"],
|
|
225
|
+
exceptions: ["*"],
|
|
226
|
+
balanced: true
|
|
227
|
+
}
|
|
228
|
+
}
|
|
213
229
|
]
|
|
214
230
|
}
|
|
215
231
|
},
|
|
@@ -566,7 +582,6 @@ async function javascript({ overrides } = {}) {
|
|
|
566
582
|
"no-extend-native": "error",
|
|
567
583
|
"no-extra-bind": "error",
|
|
568
584
|
"no-extra-boolean-cast": "error",
|
|
569
|
-
"no-extra-parens": ["error", "functions"],
|
|
570
585
|
"no-fallthrough": "error",
|
|
571
586
|
"no-func-assign": "error",
|
|
572
587
|
"no-global-assign": "error",
|
|
@@ -583,8 +598,8 @@ async function javascript({ overrides } = {}) {
|
|
|
583
598
|
"no-loss-of-precision": "error",
|
|
584
599
|
"no-misleading-character-class": "error",
|
|
585
600
|
"no-new-func": "error",
|
|
586
|
-
"no-
|
|
587
|
-
"no-new-
|
|
601
|
+
"no-object-constructor": "error",
|
|
602
|
+
"no-new-native-nonconstructor": "error",
|
|
588
603
|
"no-new-wrappers": "error",
|
|
589
604
|
"no-prototype-builtins": "error",
|
|
590
605
|
"no-useless-catch": "error",
|
|
@@ -719,21 +734,6 @@ async function javascript({ overrides } = {}) {
|
|
|
719
734
|
"prefer-promise-reject-errors": "error",
|
|
720
735
|
"prefer-regex-literals": ["error", { disallowRedundantWrapping: true }],
|
|
721
736
|
"yoda": ["error", "never"],
|
|
722
|
-
"spaced-comment": [
|
|
723
|
-
"error",
|
|
724
|
-
"always",
|
|
725
|
-
{
|
|
726
|
-
line: {
|
|
727
|
-
markers: ["/"],
|
|
728
|
-
exceptions: ["/", "#"]
|
|
729
|
-
},
|
|
730
|
-
block: {
|
|
731
|
-
markers: ["!"],
|
|
732
|
-
exceptions: ["*"],
|
|
733
|
-
balanced: true
|
|
734
|
-
}
|
|
735
|
-
}
|
|
736
|
-
],
|
|
737
737
|
"array-callback-return": "error",
|
|
738
738
|
"block-scoped-var": "error",
|
|
739
739
|
"no-unused-expressions": ["error", {
|
|
@@ -1013,7 +1013,7 @@ async function toml({ overrides } = {}) {
|
|
|
1013
1013
|
rules: {
|
|
1014
1014
|
...pluginToml.configs.recommended.rules,
|
|
1015
1015
|
"no-irregular-whitespace": "off",
|
|
1016
|
-
"spaced-comment": "off",
|
|
1016
|
+
"style/spaced-comment": "off",
|
|
1017
1017
|
...overrides
|
|
1018
1018
|
}
|
|
1019
1019
|
}];
|
|
@@ -1069,6 +1069,7 @@ const typescript = async ({ componentExts = [], parserOptions, overrides } = {})
|
|
|
1069
1069
|
...b
|
|
1070
1070
|
}), {}), { "@typescript-eslint": "ts" }),
|
|
1071
1071
|
"import/named": "off",
|
|
1072
|
+
"so1ve/prefer-ts-expect-error": "error",
|
|
1072
1073
|
"ts/comma-dangle": "off",
|
|
1073
1074
|
"ts/brace-style": "off",
|
|
1074
1075
|
"ts/comma-spacing": "off",
|
|
@@ -1076,7 +1077,6 @@ const typescript = async ({ componentExts = [], parserOptions, overrides } = {})
|
|
|
1076
1077
|
"ts/indent": "off",
|
|
1077
1078
|
"ts/keyword-spacing": "off",
|
|
1078
1079
|
"ts/member-delimiter-style": "off",
|
|
1079
|
-
"ts/no-extra-parens": "off",
|
|
1080
1080
|
"ts/no-extra-semi": "off",
|
|
1081
1081
|
"ts/quotes": "off",
|
|
1082
1082
|
"ts/semi": "off",
|
|
@@ -1125,7 +1125,6 @@ const typescript = async ({ componentExts = [], parserOptions, overrides } = {})
|
|
|
1125
1125
|
}],
|
|
1126
1126
|
"ts/consistent-type-definitions": ["error", "interface"],
|
|
1127
1127
|
"ts/consistent-indexed-object-style": ["error", "record"],
|
|
1128
|
-
"ts/prefer-ts-expect-error": "error",
|
|
1129
1128
|
"ts/prefer-for-of": "error",
|
|
1130
1129
|
"ts/no-duplicate-enum-values": "error",
|
|
1131
1130
|
"ts/no-non-null-asserted-nullish-coalescing": "error",
|
|
@@ -1152,8 +1151,6 @@ const typescript = async ({ componentExts = [], parserOptions, overrides } = {})
|
|
|
1152
1151
|
"space-before-function-paren": "off",
|
|
1153
1152
|
"no-dupe-class-members": "off",
|
|
1154
1153
|
"ts/no-dupe-class-members": "error",
|
|
1155
|
-
"no-loss-of-precision": "off",
|
|
1156
|
-
"ts/no-loss-of-precision": "error",
|
|
1157
1154
|
"so1ve/no-inline-type-import": "error",
|
|
1158
1155
|
"ts/camelcase": "off",
|
|
1159
1156
|
"ts/explicit-function-return-type": "off",
|
|
@@ -1276,7 +1273,7 @@ const unicorn = () => [{
|
|
|
1276
1273
|
"unicorn/error-message": "error",
|
|
1277
1274
|
"unicorn/escape-case": "error",
|
|
1278
1275
|
"unicorn/explicit-length-check": "error",
|
|
1279
|
-
"unicorn/no-instanceof-
|
|
1276
|
+
"unicorn/no-instanceof-builtins": "error",
|
|
1280
1277
|
"unicorn/no-new-buffer": "error",
|
|
1281
1278
|
"unicorn/no-new-array": "error",
|
|
1282
1279
|
"unicorn/no-array-for-each": "error",
|
|
@@ -1474,7 +1471,6 @@ async function vue({ overrides, typescript: typescript$1 } = {}) {
|
|
|
1474
1471
|
"vue/no-multiple-template-root": "off",
|
|
1475
1472
|
"vue/multiline-html-element-content-newline": "off",
|
|
1476
1473
|
"vue/singleline-html-element-content-newline": "off",
|
|
1477
|
-
"vue/no-extra-parens": "off",
|
|
1478
1474
|
"vue/array-bracket-spacing": "off",
|
|
1479
1475
|
"vue/arrow-spacing": "off",
|
|
1480
1476
|
"vue/block-spacing": "off",
|
|
@@ -1512,7 +1508,7 @@ async function yaml({ overrides } = {}) {
|
|
|
1512
1508
|
...renameRules(pluginYaml.configs.prettier.rules, { yml: "yaml" }),
|
|
1513
1509
|
...renameRules(pluginYaml.configs.recommended.rules, { yml: "yaml" }),
|
|
1514
1510
|
"yaml/no-empty-document": "off",
|
|
1515
|
-
"spaced-comment": "off",
|
|
1511
|
+
"style/spaced-comment": "off",
|
|
1516
1512
|
...overrides
|
|
1517
1513
|
}
|
|
1518
1514
|
}];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@so1ve/eslint-config",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.0",
|
|
4
4
|
"author": "Ray <i@mk1.io> (https://github.com/so1ve/)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Ray's eslint config.",
|
|
@@ -33,52 +33,52 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
|
|
36
|
-
"@html-eslint/eslint-plugin": "^0.
|
|
37
|
-
"@html-eslint/parser": "^0.
|
|
38
|
-
"@stylistic/eslint-plugin": "^5.
|
|
39
|
-
"@typescript-eslint/parser": "^8.
|
|
40
|
-
"@typescript-eslint/utils": "^8.
|
|
41
|
-
"@unocss/eslint-config": "^66.5.
|
|
42
|
-
"@vitest/eslint-plugin": "^1.3.
|
|
36
|
+
"@html-eslint/eslint-plugin": "^0.47.0",
|
|
37
|
+
"@html-eslint/parser": "^0.47.0",
|
|
38
|
+
"@stylistic/eslint-plugin": "^5.4.0",
|
|
39
|
+
"@typescript-eslint/parser": "^8.46.1",
|
|
40
|
+
"@typescript-eslint/utils": "^8.46.1",
|
|
41
|
+
"@unocss/eslint-config": "^66.5.3",
|
|
42
|
+
"@vitest/eslint-plugin": "^1.3.19",
|
|
43
43
|
"astro-eslint-parser": "^1.2.2",
|
|
44
44
|
"eslint-config-flat-gitignore": "^2.1.0",
|
|
45
|
-
"eslint-flat-config-utils": "^2.1.
|
|
45
|
+
"eslint-flat-config-utils": "^2.1.4",
|
|
46
46
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
47
47
|
"eslint-mdx": "^3.6.2",
|
|
48
|
-
"eslint-plugin-array-func": "^5.0
|
|
48
|
+
"eslint-plugin-array-func": "^5.1.0",
|
|
49
49
|
"eslint-plugin-astro": "^1.3.1",
|
|
50
50
|
"eslint-plugin-case-police": "^2.0.0",
|
|
51
51
|
"eslint-plugin-html": "^8.1.3",
|
|
52
52
|
"eslint-plugin-import-x": "^4.16.1",
|
|
53
53
|
"eslint-plugin-jest-formatting": "^3.1.0",
|
|
54
|
-
"eslint-plugin-jsonc": "^2.
|
|
54
|
+
"eslint-plugin-jsonc": "^2.21.0",
|
|
55
55
|
"eslint-plugin-mdx": "^3.6.2",
|
|
56
|
-
"eslint-plugin-n": "^17.23.
|
|
56
|
+
"eslint-plugin-n": "^17.23.1",
|
|
57
57
|
"eslint-plugin-no-await-in-promise": "^3.0.1",
|
|
58
58
|
"eslint-plugin-no-explicit-type-exports": "^0.12.1",
|
|
59
59
|
"eslint-plugin-no-only-tests": "^3.3.0",
|
|
60
60
|
"eslint-plugin-only-error": "^1.0.2",
|
|
61
|
-
"eslint-plugin-pnpm": "^1.
|
|
61
|
+
"eslint-plugin-pnpm": "^1.2.0",
|
|
62
62
|
"eslint-plugin-promise": "^7.2.1",
|
|
63
63
|
"eslint-plugin-regexp": "^2.10.0",
|
|
64
64
|
"eslint-plugin-solid": "^0.14.5",
|
|
65
65
|
"eslint-plugin-toml": "^0.12.0",
|
|
66
66
|
"eslint-plugin-unicorn": "^61.0.2",
|
|
67
67
|
"eslint-plugin-unused-imports": "^4.2.0",
|
|
68
|
-
"eslint-plugin-vue": "^10.
|
|
69
|
-
"eslint-plugin-yml": "^1.
|
|
68
|
+
"eslint-plugin-vue": "^10.5.0",
|
|
69
|
+
"eslint-plugin-yml": "^1.19.0",
|
|
70
70
|
"globals": "^16.4.0",
|
|
71
|
-
"jsonc-eslint-parser": "^2.4.
|
|
71
|
+
"jsonc-eslint-parser": "^2.4.1",
|
|
72
72
|
"local-pkg": "^1.1.2",
|
|
73
73
|
"toml-eslint-parser": "^0.10.0",
|
|
74
|
-
"typescript-eslint": "^8.
|
|
74
|
+
"typescript-eslint": "^8.46.1",
|
|
75
75
|
"vue-eslint-parser": "^10.2.0",
|
|
76
76
|
"yaml-eslint-parser": "^1.3.0",
|
|
77
|
-
"@so1ve/eslint-plugin": "3.
|
|
78
|
-
"@so1ve/eslint-plugin-sort-imports": "3.
|
|
77
|
+
"@so1ve/eslint-plugin": "3.10.0",
|
|
78
|
+
"@so1ve/eslint-plugin-sort-imports": "3.10.0"
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
|
-
"eslint": "^9.
|
|
81
|
+
"eslint": "^9.37.0",
|
|
82
82
|
"prettier": "^3.6.2"
|
|
83
83
|
},
|
|
84
84
|
"scripts": {
|