@w5s/eslint-config 3.5.6 → 3.7.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/README.md +35 -38
- package/dist/index.d.ts +643 -22
- package/dist/index.js +140 -145
- package/dist/index.js.map +1 -1
- package/package.json +11 -9
- package/src/config/e18e.ts +71 -0
- package/src/config/es.ts +10 -3
- package/src/config/ignores.ts +5 -79
- package/src/config/imports.ts +21 -11
- package/src/config/jsdoc.ts +20 -9
- package/src/config/jsonc.ts +7 -2
- package/src/config/markdown.ts +8 -2
- package/src/config/next.ts +50 -0
- package/src/config/node.ts +18 -13
- package/src/config/test.ts +10 -3
- package/src/config/unicorn.ts +2 -3
- package/src/config/yml.ts +8 -6
- package/src/config.ts +2 -0
- package/src/defineConfig.ts +23 -46
- package/src/type/PluginOptionsBase.ts +5 -0
- package/src/typegen/e18e.d.ts +123 -0
- package/src/typegen/next.d.ts +120 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ESLintIgnoreOptions } from "@w5s/eslint-config-ignore";
|
|
1
2
|
import { Linter } from "eslint";
|
|
2
3
|
import { StylisticCustomizeOptions } from "@stylistic/eslint-plugin";
|
|
3
4
|
|
|
@@ -44,19 +45,169 @@ interface PluginOptionsBase<Rules> {
|
|
|
44
45
|
* Plugin rules
|
|
45
46
|
*/
|
|
46
47
|
rules?: Rules;
|
|
48
|
+
/**
|
|
49
|
+
* Include recommended settings
|
|
50
|
+
*/
|
|
51
|
+
recommended?: boolean;
|
|
47
52
|
/**
|
|
48
53
|
* Stylistic options
|
|
49
54
|
*/
|
|
50
55
|
stylistic?: boolean | StylisticParameters;
|
|
51
56
|
}
|
|
52
57
|
//#endregion
|
|
58
|
+
//#region src/typegen/e18e.d.ts
|
|
59
|
+
declare module 'eslint' {
|
|
60
|
+
namespace Linter {
|
|
61
|
+
interface RulesRecord extends RuleOptions$11 {}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
interface RuleOptions$11 {
|
|
65
|
+
/**
|
|
66
|
+
* Disallow dependencies in favor of more performant or secure alternatives
|
|
67
|
+
*/
|
|
68
|
+
'e18e/ban-dependencies'?: Linter.RuleEntry<E18EBanDependencies>;
|
|
69
|
+
/**
|
|
70
|
+
* Disallow `delete` on properties — V8 deoptimizes the object to dictionary mode
|
|
71
|
+
*/
|
|
72
|
+
'e18e/no-delete-property'?: Linter.RuleEntry<[]>;
|
|
73
|
+
/**
|
|
74
|
+
* Prefer optimized alternatives to `indexOf()` equality checks
|
|
75
|
+
*/
|
|
76
|
+
'e18e/no-indexof-equality'?: Linter.RuleEntry<[]>;
|
|
77
|
+
/**
|
|
78
|
+
* Disallow spreading the accumulator inside a `reduce` callback (O(N²) growth)
|
|
79
|
+
*/
|
|
80
|
+
'e18e/no-spread-in-reduce'?: Linter.RuleEntry<[]>;
|
|
81
|
+
/**
|
|
82
|
+
* Prefer Array.prototype.at() over length-based indexing
|
|
83
|
+
*/
|
|
84
|
+
'e18e/prefer-array-at'?: Linter.RuleEntry<[]>;
|
|
85
|
+
/**
|
|
86
|
+
* Prefer Array.prototype.fill() over Array.from or map with constant values
|
|
87
|
+
*/
|
|
88
|
+
'e18e/prefer-array-fill'?: Linter.RuleEntry<[]>;
|
|
89
|
+
/**
|
|
90
|
+
* Prefer Array.from(iterable, mapper) over [...iterable].map(mapper) to avoid intermediate array allocation
|
|
91
|
+
*/
|
|
92
|
+
'e18e/prefer-array-from-map'?: Linter.RuleEntry<[]>;
|
|
93
|
+
/**
|
|
94
|
+
* Prefer Array.some() over Array.find() and Array.filter().length checks when checking for element existence
|
|
95
|
+
*/
|
|
96
|
+
'e18e/prefer-array-some'?: Linter.RuleEntry<[]>;
|
|
97
|
+
/**
|
|
98
|
+
* Prefer Array.prototype.toReversed() over copying and reversing arrays
|
|
99
|
+
*/
|
|
100
|
+
'e18e/prefer-array-to-reversed'?: Linter.RuleEntry<[]>;
|
|
101
|
+
/**
|
|
102
|
+
* Prefer Array.prototype.toSorted() over copying and sorting arrays
|
|
103
|
+
*/
|
|
104
|
+
'e18e/prefer-array-to-sorted'?: Linter.RuleEntry<[]>;
|
|
105
|
+
/**
|
|
106
|
+
* Prefer Array.prototype.toSpliced() over copying and splicing arrays
|
|
107
|
+
*/
|
|
108
|
+
'e18e/prefer-array-to-spliced'?: Linter.RuleEntry<[]>;
|
|
109
|
+
/**
|
|
110
|
+
* Prefer Date.now() over new Date().getTime() and +new Date()
|
|
111
|
+
*/
|
|
112
|
+
'e18e/prefer-date-now'?: Linter.RuleEntry<[]>;
|
|
113
|
+
/**
|
|
114
|
+
* Prefer the exponentiation operator ** over Math.pow()
|
|
115
|
+
*/
|
|
116
|
+
'e18e/prefer-exponentiation-operator'?: Linter.RuleEntry<[]>;
|
|
117
|
+
/**
|
|
118
|
+
* Prefer .includes() over indexOf() comparisons for arrays and strings
|
|
119
|
+
*/
|
|
120
|
+
'e18e/prefer-includes'?: Linter.RuleEntry<[]>;
|
|
121
|
+
/**
|
|
122
|
+
* Prefer String.prototype.{includes,startsWith,endsWith} over equivalent regex.test() calls
|
|
123
|
+
*/
|
|
124
|
+
'e18e/prefer-includes-over-regex-test'?: Linter.RuleEntry<[]>;
|
|
125
|
+
/**
|
|
126
|
+
* Prefer inline equality checks over temporary object creation for simple comparisons
|
|
127
|
+
*/
|
|
128
|
+
'e18e/prefer-inline-equality'?: Linter.RuleEntry<[]>;
|
|
129
|
+
/**
|
|
130
|
+
* Prefer nullish coalescing operator (?? and ??=) over verbose null checks
|
|
131
|
+
*/
|
|
132
|
+
'e18e/prefer-nullish-coalescing'?: Linter.RuleEntry<[]>;
|
|
133
|
+
/**
|
|
134
|
+
* Prefer Object.hasOwn() over Object.prototype.hasOwnProperty.call() and obj.hasOwnProperty()
|
|
135
|
+
*/
|
|
136
|
+
'e18e/prefer-object-has-own'?: Linter.RuleEntry<[]>;
|
|
137
|
+
/**
|
|
138
|
+
* prefer `RegExp.test()` over `String.match()` and `RegExp.exec()` when only checking for match existence
|
|
139
|
+
*/
|
|
140
|
+
'e18e/prefer-regex-test'?: Linter.RuleEntry<[]>;
|
|
141
|
+
/**
|
|
142
|
+
* Prefer spread syntax over Array.concat(), Array.from(), Object.assign({}, ...), and Function.apply()
|
|
143
|
+
*/
|
|
144
|
+
'e18e/prefer-spread-syntax'?: Linter.RuleEntry<[]>;
|
|
145
|
+
/**
|
|
146
|
+
* Prefer hoisting an `Intl.Collator` instance over calling localeCompare in a sort callback
|
|
147
|
+
*/
|
|
148
|
+
'e18e/prefer-static-collator'?: Linter.RuleEntry<[]>;
|
|
149
|
+
/**
|
|
150
|
+
* Prefer defining regular expressions at module scope to avoid re-compilation on every function call
|
|
151
|
+
*/
|
|
152
|
+
'e18e/prefer-static-regex'?: Linter.RuleEntry<[]>;
|
|
153
|
+
/**
|
|
154
|
+
* Prefer String.fromCharCode() over String.fromCodePoint() for code points below 0x10000
|
|
155
|
+
*/
|
|
156
|
+
'e18e/prefer-string-fromcharcode'?: Linter.RuleEntry<[]>;
|
|
157
|
+
/**
|
|
158
|
+
* Prefer passing function and arguments directly to setTimeout/setInterval instead of wrapping in an arrow function or using bind
|
|
159
|
+
*/
|
|
160
|
+
'e18e/prefer-timer-args'?: Linter.RuleEntry<[]>;
|
|
161
|
+
/**
|
|
162
|
+
* Prefer URL.canParse() over try-catch blocks for URL validation
|
|
163
|
+
*/
|
|
164
|
+
'e18e/prefer-url-canparse'?: Linter.RuleEntry<[]>;
|
|
165
|
+
}
|
|
166
|
+
/* ======= Declarations ======= */
|
|
167
|
+
// ----- e18e/ban-dependencies -----
|
|
168
|
+
type E18EBanDependencies = [] | [{
|
|
169
|
+
presets?: string[];
|
|
170
|
+
modules?: string[];
|
|
171
|
+
allowed?: string[];
|
|
172
|
+
}];
|
|
173
|
+
//#endregion
|
|
174
|
+
//#region src/config/e18e.d.ts
|
|
175
|
+
/**
|
|
176
|
+
* @see https://e18e.dev
|
|
177
|
+
* @param options
|
|
178
|
+
*/
|
|
179
|
+
declare function e18e(options?: e18e.Options): Promise<[Config, Config]>;
|
|
180
|
+
declare namespace e18e {
|
|
181
|
+
type Rules = RuleOptions$11;
|
|
182
|
+
interface Options extends PluginOptionsBase<Rules> {
|
|
183
|
+
/**
|
|
184
|
+
* Include modernization default configuration
|
|
185
|
+
*
|
|
186
|
+
* @default true
|
|
187
|
+
*/
|
|
188
|
+
modernization?: boolean;
|
|
189
|
+
/**
|
|
190
|
+
* Include moduleReplacements default configuration
|
|
191
|
+
*
|
|
192
|
+
* @default false
|
|
193
|
+
*/
|
|
194
|
+
moduleReplacements?: boolean;
|
|
195
|
+
/**
|
|
196
|
+
* Include performanceImprovements default configuration
|
|
197
|
+
*
|
|
198
|
+
* @default true
|
|
199
|
+
*/
|
|
200
|
+
performanceImprovements?: boolean;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
//#endregion
|
|
53
204
|
//#region src/typegen/jsonc.d.ts
|
|
54
205
|
declare module 'eslint' {
|
|
55
206
|
namespace Linter {
|
|
56
|
-
interface RulesRecord extends RuleOptions$
|
|
207
|
+
interface RulesRecord extends RuleOptions$10 {}
|
|
57
208
|
}
|
|
58
209
|
}
|
|
59
|
-
interface RuleOptions$
|
|
210
|
+
interface RuleOptions$10 {
|
|
60
211
|
/**
|
|
61
212
|
* enforce line breaks after opening and before closing array brackets
|
|
62
213
|
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/array-bracket-newline.html
|
|
@@ -532,28 +683,359 @@ type JsoncSpaceUnaryOps = [] | [{
|
|
|
532
683
|
//#region src/config/es.d.ts
|
|
533
684
|
declare function es(options: es.Options): Promise<[Config, Config]>;
|
|
534
685
|
declare namespace es {
|
|
535
|
-
|
|
686
|
+
var recommended: {
|
|
687
|
+
'class-methods-use-this': "off";
|
|
688
|
+
'default-case': "off";
|
|
689
|
+
'no-console': "error";
|
|
690
|
+
'no-nested-ternary': "off";
|
|
691
|
+
'no-param-reassign': ["error", {
|
|
692
|
+
props: boolean;
|
|
693
|
+
}];
|
|
694
|
+
'no-underscore-dangle': "off";
|
|
695
|
+
'no-unused-vars': ["error", {
|
|
696
|
+
argsIgnorePattern: string;
|
|
697
|
+
}];
|
|
698
|
+
'no-use-before-define': ["error", string];
|
|
699
|
+
'no-void': ["error", {
|
|
700
|
+
allowAsStatement: boolean;
|
|
701
|
+
}];
|
|
702
|
+
'unicode-bom': ["error", string];
|
|
703
|
+
'init-declarations': "off";
|
|
704
|
+
'no-catch-shadow': "off";
|
|
705
|
+
'no-delete-var': "error";
|
|
706
|
+
'no-label-var': "error";
|
|
707
|
+
'no-restricted-globals': ["error", {
|
|
708
|
+
name: string;
|
|
709
|
+
message: string;
|
|
710
|
+
}, {
|
|
711
|
+
name: string;
|
|
712
|
+
message: string;
|
|
713
|
+
}];
|
|
714
|
+
'no-shadow': "error";
|
|
715
|
+
'no-shadow-restricted-names': "error";
|
|
716
|
+
'no-undef': "error";
|
|
717
|
+
'no-undef-init': "error";
|
|
718
|
+
'no-undefined': "off";
|
|
719
|
+
strict: ["error", string];
|
|
720
|
+
'arrow-body-style': ["error", string, {
|
|
721
|
+
requireReturnForObjectLiteral: boolean;
|
|
722
|
+
}];
|
|
723
|
+
'arrow-parens': ["error", string];
|
|
724
|
+
'arrow-spacing': ["error", {
|
|
725
|
+
before: boolean;
|
|
726
|
+
after: boolean;
|
|
727
|
+
}];
|
|
728
|
+
'constructor-super': "error";
|
|
729
|
+
'generator-star-spacing': ["error", {
|
|
730
|
+
before: boolean;
|
|
731
|
+
after: boolean;
|
|
732
|
+
}];
|
|
733
|
+
'no-class-assign': "error";
|
|
734
|
+
'no-confusing-arrow': ["error", {
|
|
735
|
+
allowParens: boolean;
|
|
736
|
+
}];
|
|
737
|
+
'no-const-assign': "error";
|
|
738
|
+
'no-dupe-class-members': "error";
|
|
739
|
+
'no-duplicate-imports': "off";
|
|
740
|
+
'no-new-symbol': "error";
|
|
741
|
+
'no-restricted-exports': ["error", {
|
|
742
|
+
restrictedNamedExports: string[];
|
|
743
|
+
}];
|
|
744
|
+
'no-restricted-imports': ["off", {
|
|
745
|
+
paths: never[];
|
|
746
|
+
patterns: never[];
|
|
747
|
+
}];
|
|
748
|
+
'no-this-before-super': "error";
|
|
749
|
+
'no-useless-computed-key': "error";
|
|
750
|
+
'no-useless-constructor': "error";
|
|
751
|
+
'no-useless-rename': ["error", {
|
|
752
|
+
ignoreDestructuring: boolean;
|
|
753
|
+
ignoreImport: boolean;
|
|
754
|
+
ignoreExport: boolean;
|
|
755
|
+
}];
|
|
756
|
+
'no-var': "error";
|
|
757
|
+
'object-shorthand': ["error", string, {
|
|
758
|
+
ignoreConstructors: boolean;
|
|
759
|
+
avoidQuotes: boolean;
|
|
760
|
+
}];
|
|
761
|
+
'prefer-arrow-callback': ["error", {
|
|
762
|
+
allowNamedFunctions: boolean;
|
|
763
|
+
allowUnboundThis: boolean;
|
|
764
|
+
}];
|
|
765
|
+
'prefer-const': ["error", {
|
|
766
|
+
destructuring: string;
|
|
767
|
+
ignoreReadBeforeAssign: boolean;
|
|
768
|
+
}];
|
|
769
|
+
'prefer-destructuring': ["error", {
|
|
770
|
+
VariableDeclarator: {
|
|
771
|
+
array: boolean;
|
|
772
|
+
object: boolean;
|
|
773
|
+
};
|
|
774
|
+
AssignmentExpression: {
|
|
775
|
+
array: boolean;
|
|
776
|
+
object: boolean;
|
|
777
|
+
};
|
|
778
|
+
}, {
|
|
779
|
+
enforceForRenamedProperties: boolean;
|
|
780
|
+
}];
|
|
781
|
+
'prefer-numeric-literals': "error";
|
|
782
|
+
'prefer-reflect': "off";
|
|
783
|
+
'prefer-rest-params': "error";
|
|
784
|
+
'prefer-spread': "error";
|
|
785
|
+
'prefer-template': "error";
|
|
786
|
+
'require-yield': "error";
|
|
787
|
+
'rest-spread-spacing': ["error", string];
|
|
788
|
+
'sort-imports': ["off", {
|
|
789
|
+
ignoreCase: boolean;
|
|
790
|
+
ignoreDeclarationSort: boolean;
|
|
791
|
+
ignoreMemberSort: boolean;
|
|
792
|
+
memberSyntaxSortOrder: string[];
|
|
793
|
+
}];
|
|
794
|
+
'symbol-description': "error";
|
|
795
|
+
'template-curly-spacing': "error";
|
|
796
|
+
'yield-star-spacing': ["error", string];
|
|
797
|
+
'for-direction': "error";
|
|
798
|
+
'getter-return': ["error", {
|
|
799
|
+
allowImplicit: boolean;
|
|
800
|
+
}];
|
|
801
|
+
'no-async-promise-executor': "error";
|
|
802
|
+
'no-await-in-loop': "error";
|
|
803
|
+
'no-compare-neg-zero': "error";
|
|
804
|
+
'no-cond-assign': ["error", string];
|
|
805
|
+
'no-constant-binary-expression': "off";
|
|
806
|
+
'no-constant-condition': "warn";
|
|
807
|
+
'no-control-regex': "error";
|
|
808
|
+
'no-debugger': "error";
|
|
809
|
+
'no-dupe-args': "error";
|
|
810
|
+
'no-dupe-else-if': "error";
|
|
811
|
+
'no-dupe-keys': "error";
|
|
812
|
+
'no-duplicate-case': "error";
|
|
813
|
+
'no-empty': "error";
|
|
814
|
+
'no-empty-character-class': "error";
|
|
815
|
+
'no-ex-assign': "error";
|
|
816
|
+
'no-extra-boolean-cast': "error";
|
|
817
|
+
'no-extra-parens': ["off", string, {
|
|
818
|
+
conditionalAssign: boolean;
|
|
819
|
+
nestedBinaryExpressions: boolean;
|
|
820
|
+
returnAssign: boolean;
|
|
821
|
+
ignoreJSX: string;
|
|
822
|
+
enforceForArrowConditionals: boolean;
|
|
823
|
+
}];
|
|
824
|
+
'no-extra-semi': "error";
|
|
825
|
+
'no-func-assign': "error";
|
|
826
|
+
'no-import-assign': "error";
|
|
827
|
+
'no-inner-declarations': "error";
|
|
828
|
+
'no-invalid-regexp': "error";
|
|
829
|
+
'no-irregular-whitespace': "error";
|
|
830
|
+
'no-loss-of-precision': "error";
|
|
831
|
+
'no-misleading-character-class': "error";
|
|
832
|
+
'no-obj-calls': "error";
|
|
833
|
+
'no-new-native-nonconstructor': "off";
|
|
834
|
+
'no-promise-executor-return': "error";
|
|
835
|
+
'no-prototype-builtins': "error";
|
|
836
|
+
'no-regex-spaces': "error";
|
|
837
|
+
'no-setter-return': "error";
|
|
838
|
+
'no-sparse-arrays': "error";
|
|
839
|
+
'no-template-curly-in-string': "error";
|
|
840
|
+
'no-unexpected-multiline': "error";
|
|
841
|
+
'no-unreachable': "error";
|
|
842
|
+
'no-unreachable-loop': ["error", {
|
|
843
|
+
ignore: never[];
|
|
844
|
+
}];
|
|
845
|
+
'no-unsafe-finally': "error";
|
|
846
|
+
'no-unsafe-negation': "error";
|
|
847
|
+
'no-unsafe-optional-chaining': ["error", {
|
|
848
|
+
disallowArithmeticOperators: boolean;
|
|
849
|
+
}];
|
|
850
|
+
'no-unused-private-class-members': "off";
|
|
851
|
+
'no-useless-backreference': "error";
|
|
852
|
+
'no-negated-in-lhs': "off";
|
|
853
|
+
'require-atomic-updates': "off";
|
|
854
|
+
'use-isnan': "error";
|
|
855
|
+
'valid-jsdoc': "off";
|
|
856
|
+
'valid-typeof': ["error", {
|
|
857
|
+
requireStringLiterals: boolean;
|
|
858
|
+
}];
|
|
859
|
+
'accessor-pairs': "off";
|
|
860
|
+
'array-callback-return': ["error", {
|
|
861
|
+
allowImplicit: boolean;
|
|
862
|
+
}];
|
|
863
|
+
'block-scoped-var': "error";
|
|
864
|
+
complexity: ["off", number];
|
|
865
|
+
'consistent-return': "error";
|
|
866
|
+
curly: ["error", string];
|
|
867
|
+
'default-case-last': "error";
|
|
868
|
+
'default-param-last': "error";
|
|
869
|
+
'dot-notation': ["error", {
|
|
870
|
+
allowKeywords: boolean;
|
|
871
|
+
}];
|
|
872
|
+
'dot-location': ["error", string];
|
|
873
|
+
eqeqeq: ["error", string, {
|
|
874
|
+
null: string;
|
|
875
|
+
}];
|
|
876
|
+
'grouped-accessor-pairs': "error";
|
|
877
|
+
'guard-for-in': "error";
|
|
878
|
+
'max-classes-per-file': ["error", number];
|
|
879
|
+
'no-alert': "warn";
|
|
880
|
+
'no-caller': "error";
|
|
881
|
+
'no-case-declarations': "error";
|
|
882
|
+
'no-constructor-return': "error";
|
|
883
|
+
'no-div-regex': "off";
|
|
884
|
+
'no-else-return': ["error", {
|
|
885
|
+
allowElseIf: boolean;
|
|
886
|
+
}];
|
|
887
|
+
'no-empty-function': ["error", {
|
|
888
|
+
allow: string[];
|
|
889
|
+
}];
|
|
890
|
+
'no-empty-pattern': "error";
|
|
891
|
+
'no-empty-static-block': "off";
|
|
892
|
+
'no-eq-null': "off";
|
|
893
|
+
'no-eval': "error";
|
|
894
|
+
'no-extend-native': "error";
|
|
895
|
+
'no-extra-bind': "error";
|
|
896
|
+
'no-extra-label': "error";
|
|
897
|
+
'no-fallthrough': "error";
|
|
898
|
+
'no-floating-decimal': "error";
|
|
899
|
+
'no-global-assign': ["error", {
|
|
900
|
+
exceptions: never[];
|
|
901
|
+
}];
|
|
902
|
+
'no-native-reassign': "off";
|
|
903
|
+
'no-implicit-coercion': ["off", {
|
|
904
|
+
boolean: boolean;
|
|
905
|
+
number: boolean;
|
|
906
|
+
string: boolean;
|
|
907
|
+
allow: never[];
|
|
908
|
+
}];
|
|
909
|
+
'no-implicit-globals': "off";
|
|
910
|
+
'no-implied-eval': "error";
|
|
911
|
+
'no-invalid-this': "off";
|
|
912
|
+
'no-iterator': "error";
|
|
913
|
+
'no-labels': ["error", {
|
|
914
|
+
allowLoop: boolean;
|
|
915
|
+
allowSwitch: boolean;
|
|
916
|
+
}];
|
|
917
|
+
'no-lone-blocks': "error";
|
|
918
|
+
'no-loop-func': "error";
|
|
919
|
+
'no-magic-numbers': ["off", {
|
|
920
|
+
ignore: never[];
|
|
921
|
+
ignoreArrayIndexes: boolean;
|
|
922
|
+
enforceConst: boolean;
|
|
923
|
+
detectObjects: boolean;
|
|
924
|
+
}];
|
|
925
|
+
'no-multi-spaces': ["error", {
|
|
926
|
+
ignoreEOLComments: boolean;
|
|
927
|
+
}];
|
|
928
|
+
'no-multi-str': "error";
|
|
929
|
+
'no-new': "error";
|
|
930
|
+
'no-new-func': "error";
|
|
931
|
+
'no-new-wrappers': "error";
|
|
932
|
+
'no-nonoctal-decimal-escape': "error";
|
|
933
|
+
'no-object-constructor': "off";
|
|
934
|
+
'no-octal': "error";
|
|
935
|
+
'no-octal-escape': "error";
|
|
936
|
+
'no-proto': "error";
|
|
937
|
+
'no-redeclare': "error";
|
|
938
|
+
'no-restricted-properties': ["error", {
|
|
939
|
+
object: string;
|
|
940
|
+
property: string;
|
|
941
|
+
message: string;
|
|
942
|
+
}, {
|
|
943
|
+
object: string;
|
|
944
|
+
property: string;
|
|
945
|
+
message: string;
|
|
946
|
+
}, {
|
|
947
|
+
object: string;
|
|
948
|
+
property: string;
|
|
949
|
+
message: string;
|
|
950
|
+
}, {
|
|
951
|
+
object: string;
|
|
952
|
+
property: string;
|
|
953
|
+
message: string;
|
|
954
|
+
}, {
|
|
955
|
+
object: string;
|
|
956
|
+
property: string;
|
|
957
|
+
message: string;
|
|
958
|
+
}, {
|
|
959
|
+
object: string;
|
|
960
|
+
property: string;
|
|
961
|
+
message: string;
|
|
962
|
+
}, {
|
|
963
|
+
object: string;
|
|
964
|
+
property: string;
|
|
965
|
+
message: string;
|
|
966
|
+
}, {
|
|
967
|
+
property: string;
|
|
968
|
+
message: string;
|
|
969
|
+
}, {
|
|
970
|
+
property: string;
|
|
971
|
+
message: string;
|
|
972
|
+
}, {
|
|
973
|
+
object: string;
|
|
974
|
+
property: string;
|
|
975
|
+
message: string;
|
|
976
|
+
}];
|
|
977
|
+
'no-return-assign': ["error", string];
|
|
978
|
+
'no-return-await': "error";
|
|
979
|
+
'no-script-url': "error";
|
|
980
|
+
'no-self-assign': ["error", {
|
|
981
|
+
props: boolean;
|
|
982
|
+
}];
|
|
983
|
+
'no-self-compare': "error";
|
|
984
|
+
'no-sequences': "error";
|
|
985
|
+
'no-throw-literal': "error";
|
|
986
|
+
'no-unmodified-loop-condition': "off";
|
|
987
|
+
'no-unused-expressions': ["error", {
|
|
988
|
+
allowShortCircuit: boolean;
|
|
989
|
+
allowTernary: boolean;
|
|
990
|
+
allowTaggedTemplates: boolean;
|
|
991
|
+
}];
|
|
992
|
+
'no-unused-labels': "error";
|
|
993
|
+
'no-useless-call': "off";
|
|
994
|
+
'no-useless-catch': "error";
|
|
995
|
+
'no-useless-concat': "error";
|
|
996
|
+
'no-useless-escape': "error";
|
|
997
|
+
'no-useless-return': "error";
|
|
998
|
+
'no-warning-comments': ["off", {
|
|
999
|
+
terms: string[];
|
|
1000
|
+
location: string;
|
|
1001
|
+
}];
|
|
1002
|
+
'no-with': "error";
|
|
1003
|
+
'prefer-promise-reject-errors': ["error", {
|
|
1004
|
+
allowEmptyReject: boolean;
|
|
1005
|
+
}];
|
|
1006
|
+
'prefer-named-capture-group': "off";
|
|
1007
|
+
'prefer-object-has-own': "off";
|
|
1008
|
+
'prefer-regex-literals': ["error", {
|
|
1009
|
+
disallowRedundantWrapping: boolean;
|
|
1010
|
+
}];
|
|
1011
|
+
radix: "error";
|
|
1012
|
+
'require-await': "off";
|
|
1013
|
+
'require-unicode-regexp': "off";
|
|
1014
|
+
'vars-on-top': "error";
|
|
1015
|
+
'wrap-iife': ["error", string, {
|
|
1016
|
+
functionPrototypeMethods: boolean;
|
|
1017
|
+
}];
|
|
1018
|
+
yoda: "error";
|
|
1019
|
+
};
|
|
1020
|
+
}
|
|
1021
|
+
declare namespace es {
|
|
1022
|
+
type Rules = RuleOptions$10;
|
|
536
1023
|
interface Options extends PluginOptionsBase<Rules> {}
|
|
537
1024
|
}
|
|
538
1025
|
//#endregion
|
|
539
1026
|
//#region src/config/ignores.d.ts
|
|
540
|
-
declare function ignores(options?: ignores.Options): Promise<[
|
|
541
|
-
readonly ignores: Array<string>;
|
|
542
|
-
readonly name: "w5s/ignore";
|
|
543
|
-
}]>;
|
|
1027
|
+
declare function ignores(options?: ignores.Options): Promise<import("@w5s/eslint-config-ignore").ESLintIgnoreConfig[]>;
|
|
544
1028
|
declare namespace ignores {
|
|
545
|
-
|
|
546
|
-
ignores?: string[];
|
|
547
|
-
}
|
|
1029
|
+
type Options = ESLintIgnoreOptions;
|
|
548
1030
|
}
|
|
549
1031
|
//#endregion
|
|
550
1032
|
//#region src/typegen/jsdoc.d.ts
|
|
551
1033
|
declare module 'eslint' {
|
|
552
1034
|
namespace Linter {
|
|
553
|
-
interface RulesRecord extends RuleOptions$
|
|
1035
|
+
interface RulesRecord extends RuleOptions$9 {}
|
|
554
1036
|
}
|
|
555
1037
|
}
|
|
556
|
-
interface RuleOptions$
|
|
1038
|
+
interface RuleOptions$9 {
|
|
557
1039
|
/**
|
|
558
1040
|
* Checks that `@access` tags have a valid value.
|
|
559
1041
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/check-access.md#repos-sticky-header
|
|
@@ -1430,24 +1912,24 @@ type JsdocValidTypes = [] | [{
|
|
|
1430
1912
|
//#region src/config/jsdoc.d.ts
|
|
1431
1913
|
declare function jsdoc(options?: jsdoc.Options): Promise<readonly Config[]>;
|
|
1432
1914
|
declare namespace jsdoc {
|
|
1433
|
-
type Rules = RuleOptions$
|
|
1915
|
+
type Rules = RuleOptions$9;
|
|
1434
1916
|
interface Options extends PluginOptionsBase<Rules> {}
|
|
1435
1917
|
}
|
|
1436
1918
|
//#endregion
|
|
1437
1919
|
//#region src/config/jsonc.d.ts
|
|
1438
1920
|
declare function jsonc(options?: jsonc.Options): Promise<readonly Config[]>;
|
|
1439
1921
|
declare namespace jsonc {
|
|
1440
|
-
type Rules = RuleOptions$
|
|
1922
|
+
type Rules = RuleOptions$10;
|
|
1441
1923
|
interface Options extends PluginOptionsBase<Rules> {}
|
|
1442
1924
|
}
|
|
1443
1925
|
//#endregion
|
|
1444
1926
|
//#region src/typegen/import.d.ts
|
|
1445
1927
|
declare module 'eslint' {
|
|
1446
1928
|
namespace Linter {
|
|
1447
|
-
interface RulesRecord extends RuleOptions$
|
|
1929
|
+
interface RulesRecord extends RuleOptions$8 {}
|
|
1448
1930
|
}
|
|
1449
1931
|
}
|
|
1450
|
-
interface RuleOptions$
|
|
1932
|
+
interface RuleOptions$8 {
|
|
1451
1933
|
/**
|
|
1452
1934
|
* Enforce or ban the use of inline type-only markers for named imports.
|
|
1453
1935
|
* @see https://github.com/import-js/eslint-plugin-import/blob/v2.32.0/docs/rules/consistent-type-specifier-style.md
|
|
@@ -1893,17 +2375,30 @@ type ImportPreferDefaultExport = [] | [{
|
|
|
1893
2375
|
//#region src/config/imports.d.ts
|
|
1894
2376
|
declare function imports(options?: imports.Options): Promise<[Config]>;
|
|
1895
2377
|
declare namespace imports {
|
|
1896
|
-
|
|
2378
|
+
var recommended: {
|
|
2379
|
+
'import/first': string;
|
|
2380
|
+
'import/no-duplicates': string;
|
|
2381
|
+
'import/no-mutable-exports': string;
|
|
2382
|
+
'import/no-named-default': string;
|
|
2383
|
+
};
|
|
2384
|
+
var stylistic: {
|
|
2385
|
+
'import/newline-after-import': (string | {
|
|
2386
|
+
count: number;
|
|
2387
|
+
})[];
|
|
2388
|
+
};
|
|
2389
|
+
}
|
|
2390
|
+
declare namespace imports {
|
|
2391
|
+
type Rules = RuleOptions$8;
|
|
1897
2392
|
interface Options extends PluginOptionsBase<Rules> {}
|
|
1898
2393
|
}
|
|
1899
2394
|
//#endregion
|
|
1900
2395
|
//#region src/typegen/markdown.d.ts
|
|
1901
2396
|
declare module 'eslint' {
|
|
1902
2397
|
namespace Linter {
|
|
1903
|
-
interface RulesRecord extends RuleOptions$
|
|
2398
|
+
interface RulesRecord extends RuleOptions$7 {}
|
|
1904
2399
|
}
|
|
1905
2400
|
}
|
|
1906
|
-
interface RuleOptions$
|
|
2401
|
+
interface RuleOptions$7 {
|
|
1907
2402
|
/**
|
|
1908
2403
|
* Require languages for fenced code blocks
|
|
1909
2404
|
* @see https://github.com/eslint/markdown/blob/main/docs/rules/fenced-code-language.md
|
|
@@ -2064,7 +2559,7 @@ type MarkdownTableColumnCount = [] | [{
|
|
|
2064
2559
|
//#region src/config/markdown.d.ts
|
|
2065
2560
|
declare function markdown(options?: markdown.Options): Promise<[Config, Config]>;
|
|
2066
2561
|
declare namespace markdown {
|
|
2067
|
-
type Rules = RuleOptions$
|
|
2562
|
+
type Rules = RuleOptions$7;
|
|
2068
2563
|
interface Options extends PluginOptionsBase<Rules> {
|
|
2069
2564
|
/**
|
|
2070
2565
|
* Default to 'markdown/gfm' (Github Flavored Markdown)
|
|
@@ -2073,6 +2568,129 @@ declare namespace markdown {
|
|
|
2073
2568
|
}
|
|
2074
2569
|
}
|
|
2075
2570
|
//#endregion
|
|
2571
|
+
//#region src/typegen/next.d.ts
|
|
2572
|
+
declare module 'eslint' {
|
|
2573
|
+
namespace Linter {
|
|
2574
|
+
interface RulesRecord extends RuleOptions$6 {}
|
|
2575
|
+
}
|
|
2576
|
+
}
|
|
2577
|
+
interface RuleOptions$6 {
|
|
2578
|
+
/**
|
|
2579
|
+
* Enforce font-display behavior with Google Fonts.
|
|
2580
|
+
* @see https://nextjs.org/docs/messages/google-font-display
|
|
2581
|
+
*/
|
|
2582
|
+
'next/google-font-display'?: Linter.RuleEntry<[]>;
|
|
2583
|
+
/**
|
|
2584
|
+
* Ensure `preconnect` is used with Google Fonts.
|
|
2585
|
+
* @see https://nextjs.org/docs/messages/google-font-preconnect
|
|
2586
|
+
*/
|
|
2587
|
+
'next/google-font-preconnect'?: Linter.RuleEntry<[]>;
|
|
2588
|
+
/**
|
|
2589
|
+
* Enforce `id` attribute on `next/script` components with inline content.
|
|
2590
|
+
* @see https://nextjs.org/docs/messages/inline-script-id
|
|
2591
|
+
*/
|
|
2592
|
+
'next/inline-script-id'?: Linter.RuleEntry<[]>;
|
|
2593
|
+
/**
|
|
2594
|
+
* Prefer `@next/third-parties/google` when using the inline script for Google Analytics and Tag Manager.
|
|
2595
|
+
* @see https://nextjs.org/docs/messages/next-script-for-ga
|
|
2596
|
+
*/
|
|
2597
|
+
'next/next-script-for-ga'?: Linter.RuleEntry<[]>;
|
|
2598
|
+
/**
|
|
2599
|
+
* Prevent assignment to the `module` variable.
|
|
2600
|
+
* @see https://nextjs.org/docs/messages/no-assign-module-variable
|
|
2601
|
+
*/
|
|
2602
|
+
'next/no-assign-module-variable'?: Linter.RuleEntry<[]>;
|
|
2603
|
+
/**
|
|
2604
|
+
* Prevent Client Components from being async functions.
|
|
2605
|
+
* @see https://nextjs.org/docs/messages/no-async-client-component
|
|
2606
|
+
*/
|
|
2607
|
+
'next/no-async-client-component'?: Linter.RuleEntry<[]>;
|
|
2608
|
+
/**
|
|
2609
|
+
* Prevent usage of `next/script`'s `beforeInteractive` strategy outside of `pages/_document.js`.
|
|
2610
|
+
* @see https://nextjs.org/docs/messages/no-before-interactive-script-outside-document
|
|
2611
|
+
*/
|
|
2612
|
+
'next/no-before-interactive-script-outside-document'?: Linter.RuleEntry<[]>;
|
|
2613
|
+
/**
|
|
2614
|
+
* Prevent manual stylesheet tags.
|
|
2615
|
+
* @see https://nextjs.org/docs/messages/no-css-tags
|
|
2616
|
+
*/
|
|
2617
|
+
'next/no-css-tags'?: Linter.RuleEntry<[]>;
|
|
2618
|
+
/**
|
|
2619
|
+
* Prevent importing `next/document` outside of `pages/_document.js`.
|
|
2620
|
+
* @see https://nextjs.org/docs/messages/no-document-import-in-page
|
|
2621
|
+
*/
|
|
2622
|
+
'next/no-document-import-in-page'?: Linter.RuleEntry<[]>;
|
|
2623
|
+
/**
|
|
2624
|
+
* Prevent duplicate usage of `<Head>` in `pages/_document.js`.
|
|
2625
|
+
* @see https://nextjs.org/docs/messages/no-duplicate-head
|
|
2626
|
+
*/
|
|
2627
|
+
'next/no-duplicate-head'?: Linter.RuleEntry<[]>;
|
|
2628
|
+
/**
|
|
2629
|
+
* Prevent usage of `<head>` element.
|
|
2630
|
+
* @see https://nextjs.org/docs/messages/no-head-element
|
|
2631
|
+
*/
|
|
2632
|
+
'next/no-head-element'?: Linter.RuleEntry<[]>;
|
|
2633
|
+
/**
|
|
2634
|
+
* Prevent usage of `next/head` in `pages/_document.js`.
|
|
2635
|
+
* @see https://nextjs.org/docs/messages/no-head-import-in-document
|
|
2636
|
+
*/
|
|
2637
|
+
'next/no-head-import-in-document'?: Linter.RuleEntry<[]>;
|
|
2638
|
+
/**
|
|
2639
|
+
* Prevent usage of `<a>` elements to navigate to internal Next.js pages.
|
|
2640
|
+
* @see https://nextjs.org/docs/messages/no-html-link-for-pages
|
|
2641
|
+
*/
|
|
2642
|
+
'next/no-html-link-for-pages'?: Linter.RuleEntry<NextNoHtmlLinkForPages>;
|
|
2643
|
+
/**
|
|
2644
|
+
* Prevent usage of `<img>` element due to slower LCP and higher bandwidth.
|
|
2645
|
+
* @see https://nextjs.org/docs/messages/no-img-element
|
|
2646
|
+
*/
|
|
2647
|
+
'next/no-img-element'?: Linter.RuleEntry<[]>;
|
|
2648
|
+
/**
|
|
2649
|
+
* Prevent page-only custom fonts.
|
|
2650
|
+
* @see https://nextjs.org/docs/messages/no-page-custom-font
|
|
2651
|
+
*/
|
|
2652
|
+
'next/no-page-custom-font'?: Linter.RuleEntry<[]>;
|
|
2653
|
+
/**
|
|
2654
|
+
* Prevent usage of `next/script` in `next/head` component.
|
|
2655
|
+
* @see https://nextjs.org/docs/messages/no-script-component-in-head
|
|
2656
|
+
*/
|
|
2657
|
+
'next/no-script-component-in-head'?: Linter.RuleEntry<[]>;
|
|
2658
|
+
/**
|
|
2659
|
+
* Prevent usage of `styled-jsx` in `pages/_document.js`.
|
|
2660
|
+
* @see https://nextjs.org/docs/messages/no-styled-jsx-in-document
|
|
2661
|
+
*/
|
|
2662
|
+
'next/no-styled-jsx-in-document'?: Linter.RuleEntry<[]>;
|
|
2663
|
+
/**
|
|
2664
|
+
* Prevent synchronous scripts.
|
|
2665
|
+
* @see https://nextjs.org/docs/messages/no-sync-scripts
|
|
2666
|
+
*/
|
|
2667
|
+
'next/no-sync-scripts'?: Linter.RuleEntry<[]>;
|
|
2668
|
+
/**
|
|
2669
|
+
* Prevent usage of `<title>` with `Head` component from `next/document`.
|
|
2670
|
+
* @see https://nextjs.org/docs/messages/no-title-in-document-head
|
|
2671
|
+
*/
|
|
2672
|
+
'next/no-title-in-document-head'?: Linter.RuleEntry<[]>;
|
|
2673
|
+
/**
|
|
2674
|
+
* Prevent common typos in Next.js data fetching functions.
|
|
2675
|
+
*/
|
|
2676
|
+
'next/no-typos'?: Linter.RuleEntry<[]>;
|
|
2677
|
+
/**
|
|
2678
|
+
* Prevent duplicate polyfills from Polyfill.io.
|
|
2679
|
+
* @see https://nextjs.org/docs/messages/no-unwanted-polyfillio
|
|
2680
|
+
*/
|
|
2681
|
+
'next/no-unwanted-polyfillio'?: Linter.RuleEntry<[]>;
|
|
2682
|
+
}
|
|
2683
|
+
/* ======= Declarations ======= */
|
|
2684
|
+
// ----- next/no-html-link-for-pages -----
|
|
2685
|
+
type NextNoHtmlLinkForPages = [] | [(string | string[])];
|
|
2686
|
+
//#endregion
|
|
2687
|
+
//#region src/config/next.d.ts
|
|
2688
|
+
declare function next(options?: next.Options): Promise<[Config, Config]>;
|
|
2689
|
+
declare namespace next {
|
|
2690
|
+
type Rules = RuleOptions$6;
|
|
2691
|
+
interface Options extends Omit<PluginOptionsBase<Rules>, 'stylistic'> {}
|
|
2692
|
+
}
|
|
2693
|
+
//#endregion
|
|
2076
2694
|
//#region src/typegen/node.d.ts
|
|
2077
2695
|
declare module 'eslint' {
|
|
2078
2696
|
namespace Linter {
|
|
@@ -7646,18 +8264,21 @@ declare namespace yml {
|
|
|
7646
8264
|
//#endregion
|
|
7647
8265
|
//#region src/defineConfig.d.ts
|
|
7648
8266
|
interface DefineConfigOptions extends ignores.Options {
|
|
8267
|
+
e18e?: boolean | e18e.Options;
|
|
7649
8268
|
es?: boolean | es.Options;
|
|
7650
8269
|
import?: boolean | imports.Options;
|
|
7651
8270
|
markdown?: boolean | markdown.Options;
|
|
7652
8271
|
jsdoc?: boolean | jsdoc.Options;
|
|
7653
8272
|
jsonc?: boolean | jsonc.Options;
|
|
8273
|
+
next?: boolean | next.Options;
|
|
7654
8274
|
node?: boolean | node.Options;
|
|
7655
8275
|
stylistic?: boolean | stylistic.Options;
|
|
8276
|
+
test?: boolean | test.Options;
|
|
7656
8277
|
ts?: boolean | ts.Options;
|
|
7657
8278
|
unicorn?: boolean | unicorn.Options;
|
|
7658
8279
|
yml?: boolean | yml.Options;
|
|
7659
8280
|
}
|
|
7660
|
-
declare function defineConfig(options?: DefineConfigOptions): Promise<Config[]>;
|
|
8281
|
+
declare function defineConfig(options?: DefineConfigOptions): Promise<import("eslint").Linter.Config<import("eslint").Linter.RulesRecord>[]>;
|
|
7661
8282
|
//#endregion
|
|
7662
8283
|
//#region src/meta.d.ts
|
|
7663
8284
|
declare const meta: Readonly<{
|
|
@@ -7666,5 +8287,5 @@ declare const meta: Readonly<{
|
|
|
7666
8287
|
buildNumber: number;
|
|
7667
8288
|
}>;
|
|
7668
8289
|
//#endregion
|
|
7669
|
-
export { Config, DefineConfigOptions, PluginOptionsBase, StylisticConfig, StylisticParameters, defineConfig as default, defineConfig, es, ignores, imports, jsdoc, jsonc, markdown, meta, node, stylistic, test, ts, unicorn, yml };
|
|
8290
|
+
export { Config, DefineConfigOptions, PluginOptionsBase, StylisticConfig, StylisticParameters, defineConfig as default, defineConfig, e18e, es, ignores, imports, jsdoc, jsonc, markdown, meta, next, node, stylistic, test, ts, unicorn, yml };
|
|
7670
8291
|
//# sourceMappingURL=index.d.ts.map
|