@2digits/eslint-config 2.12.3 → 2.13.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.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +486 -3
- package/dist/index.d.ts +486 -3
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +21 -15
package/dist/index.d.cts
CHANGED
|
@@ -10,7 +10,7 @@ import { FlatGitignoreOptions } from 'eslint-config-flat-gitignore';
|
|
|
10
10
|
interface RuleOptions {
|
|
11
11
|
/**
|
|
12
12
|
* Enforce giving proper names to type parameters when there are two or more
|
|
13
|
-
* @see https://github.com/2digits-agency/configs/blob/@2digits/eslint-plugin@2.3.
|
|
13
|
+
* @see https://github.com/2digits-agency/configs/blob/@2digits/eslint-plugin@2.3.21/packages/eslint/src/rules/type-param-names.ts
|
|
14
14
|
*/
|
|
15
15
|
'@2digits/type-param-names'?: Linter.RuleEntry<[]>
|
|
16
16
|
/**
|
|
@@ -1075,6 +1075,226 @@ Backward pagination arguments
|
|
|
1075
1075
|
* @see https://github.com/gajus/eslint-plugin-jsdoc/blob/main/docs/rules/valid-types.md#repos-sticky-header
|
|
1076
1076
|
*/
|
|
1077
1077
|
'jsdoc/valid-types'?: Linter.RuleEntry<JsdocValidTypes>
|
|
1078
|
+
/**
|
|
1079
|
+
* enforce line breaks after opening and before closing array brackets
|
|
1080
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/array-bracket-newline.html
|
|
1081
|
+
*/
|
|
1082
|
+
'jsonc/array-bracket-newline'?: Linter.RuleEntry<JsoncArrayBracketNewline>
|
|
1083
|
+
/**
|
|
1084
|
+
* disallow or enforce spaces inside of brackets
|
|
1085
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/array-bracket-spacing.html
|
|
1086
|
+
*/
|
|
1087
|
+
'jsonc/array-bracket-spacing'?: Linter.RuleEntry<JsoncArrayBracketSpacing>
|
|
1088
|
+
/**
|
|
1089
|
+
* enforce line breaks between array elements
|
|
1090
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/array-element-newline.html
|
|
1091
|
+
*/
|
|
1092
|
+
'jsonc/array-element-newline'?: Linter.RuleEntry<JsoncArrayElementNewline>
|
|
1093
|
+
/**
|
|
1094
|
+
* apply jsonc rules similar to your configured ESLint core rules
|
|
1095
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/auto.html
|
|
1096
|
+
*/
|
|
1097
|
+
'jsonc/auto'?: Linter.RuleEntry<[]>
|
|
1098
|
+
/**
|
|
1099
|
+
* require or disallow trailing commas
|
|
1100
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/comma-dangle.html
|
|
1101
|
+
*/
|
|
1102
|
+
'jsonc/comma-dangle'?: Linter.RuleEntry<JsoncCommaDangle>
|
|
1103
|
+
/**
|
|
1104
|
+
* enforce consistent comma style
|
|
1105
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/comma-style.html
|
|
1106
|
+
*/
|
|
1107
|
+
'jsonc/comma-style'?: Linter.RuleEntry<JsoncCommaStyle>
|
|
1108
|
+
/**
|
|
1109
|
+
* enforce consistent indentation
|
|
1110
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/indent.html
|
|
1111
|
+
*/
|
|
1112
|
+
'jsonc/indent'?: Linter.RuleEntry<JsoncIndent>
|
|
1113
|
+
/**
|
|
1114
|
+
* enforce naming convention to property key names
|
|
1115
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/key-name-casing.html
|
|
1116
|
+
*/
|
|
1117
|
+
'jsonc/key-name-casing'?: Linter.RuleEntry<JsoncKeyNameCasing>
|
|
1118
|
+
/**
|
|
1119
|
+
* enforce consistent spacing between keys and values in object literal properties
|
|
1120
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/key-spacing.html
|
|
1121
|
+
*/
|
|
1122
|
+
'jsonc/key-spacing'?: Linter.RuleEntry<JsoncKeySpacing>
|
|
1123
|
+
/**
|
|
1124
|
+
* disallow BigInt literals
|
|
1125
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-bigint-literals.html
|
|
1126
|
+
*/
|
|
1127
|
+
'jsonc/no-bigint-literals'?: Linter.RuleEntry<[]>
|
|
1128
|
+
/**
|
|
1129
|
+
* disallow binary expression
|
|
1130
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-binary-expression.html
|
|
1131
|
+
*/
|
|
1132
|
+
'jsonc/no-binary-expression'?: Linter.RuleEntry<[]>
|
|
1133
|
+
/**
|
|
1134
|
+
* disallow binary numeric literals
|
|
1135
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-binary-numeric-literals.html
|
|
1136
|
+
*/
|
|
1137
|
+
'jsonc/no-binary-numeric-literals'?: Linter.RuleEntry<[]>
|
|
1138
|
+
/**
|
|
1139
|
+
* disallow comments
|
|
1140
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-comments.html
|
|
1141
|
+
*/
|
|
1142
|
+
'jsonc/no-comments'?: Linter.RuleEntry<[]>
|
|
1143
|
+
/**
|
|
1144
|
+
* disallow duplicate keys in object literals
|
|
1145
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-dupe-keys.html
|
|
1146
|
+
*/
|
|
1147
|
+
'jsonc/no-dupe-keys'?: Linter.RuleEntry<[]>
|
|
1148
|
+
/**
|
|
1149
|
+
* disallow escape sequences in identifiers.
|
|
1150
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-escape-sequence-in-identifier.html
|
|
1151
|
+
*/
|
|
1152
|
+
'jsonc/no-escape-sequence-in-identifier'?: Linter.RuleEntry<[]>
|
|
1153
|
+
/**
|
|
1154
|
+
* disallow leading or trailing decimal points in numeric literals
|
|
1155
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-floating-decimal.html
|
|
1156
|
+
*/
|
|
1157
|
+
'jsonc/no-floating-decimal'?: Linter.RuleEntry<[]>
|
|
1158
|
+
/**
|
|
1159
|
+
* disallow hexadecimal numeric literals
|
|
1160
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-hexadecimal-numeric-literals.html
|
|
1161
|
+
*/
|
|
1162
|
+
'jsonc/no-hexadecimal-numeric-literals'?: Linter.RuleEntry<[]>
|
|
1163
|
+
/**
|
|
1164
|
+
* disallow Infinity
|
|
1165
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-infinity.html
|
|
1166
|
+
*/
|
|
1167
|
+
'jsonc/no-infinity'?: Linter.RuleEntry<[]>
|
|
1168
|
+
/**
|
|
1169
|
+
* disallow irregular whitespace
|
|
1170
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-irregular-whitespace.html
|
|
1171
|
+
*/
|
|
1172
|
+
'jsonc/no-irregular-whitespace'?: Linter.RuleEntry<JsoncNoIrregularWhitespace>
|
|
1173
|
+
/**
|
|
1174
|
+
* disallow multiline strings
|
|
1175
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-multi-str.html
|
|
1176
|
+
*/
|
|
1177
|
+
'jsonc/no-multi-str'?: Linter.RuleEntry<[]>
|
|
1178
|
+
/**
|
|
1179
|
+
* disallow NaN
|
|
1180
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-nan.html
|
|
1181
|
+
*/
|
|
1182
|
+
'jsonc/no-nan'?: Linter.RuleEntry<[]>
|
|
1183
|
+
/**
|
|
1184
|
+
* disallow number property keys
|
|
1185
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-number-props.html
|
|
1186
|
+
*/
|
|
1187
|
+
'jsonc/no-number-props'?: Linter.RuleEntry<[]>
|
|
1188
|
+
/**
|
|
1189
|
+
* disallow numeric separators
|
|
1190
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-numeric-separators.html
|
|
1191
|
+
*/
|
|
1192
|
+
'jsonc/no-numeric-separators'?: Linter.RuleEntry<[]>
|
|
1193
|
+
/**
|
|
1194
|
+
* disallow legacy octal literals
|
|
1195
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-octal.html
|
|
1196
|
+
*/
|
|
1197
|
+
'jsonc/no-octal'?: Linter.RuleEntry<[]>
|
|
1198
|
+
/**
|
|
1199
|
+
* disallow octal escape sequences in string literals
|
|
1200
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-octal-escape.html
|
|
1201
|
+
*/
|
|
1202
|
+
'jsonc/no-octal-escape'?: Linter.RuleEntry<[]>
|
|
1203
|
+
/**
|
|
1204
|
+
* disallow octal numeric literals
|
|
1205
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-octal-numeric-literals.html
|
|
1206
|
+
*/
|
|
1207
|
+
'jsonc/no-octal-numeric-literals'?: Linter.RuleEntry<[]>
|
|
1208
|
+
/**
|
|
1209
|
+
* disallow parentheses around the expression
|
|
1210
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-parenthesized.html
|
|
1211
|
+
*/
|
|
1212
|
+
'jsonc/no-parenthesized'?: Linter.RuleEntry<[]>
|
|
1213
|
+
/**
|
|
1214
|
+
* disallow plus sign
|
|
1215
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-plus-sign.html
|
|
1216
|
+
*/
|
|
1217
|
+
'jsonc/no-plus-sign'?: Linter.RuleEntry<[]>
|
|
1218
|
+
/**
|
|
1219
|
+
* disallow RegExp literals
|
|
1220
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-regexp-literals.html
|
|
1221
|
+
*/
|
|
1222
|
+
'jsonc/no-regexp-literals'?: Linter.RuleEntry<[]>
|
|
1223
|
+
/**
|
|
1224
|
+
* disallow sparse arrays
|
|
1225
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-sparse-arrays.html
|
|
1226
|
+
*/
|
|
1227
|
+
'jsonc/no-sparse-arrays'?: Linter.RuleEntry<[]>
|
|
1228
|
+
/**
|
|
1229
|
+
* disallow template literals
|
|
1230
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-template-literals.html
|
|
1231
|
+
*/
|
|
1232
|
+
'jsonc/no-template-literals'?: Linter.RuleEntry<[]>
|
|
1233
|
+
/**
|
|
1234
|
+
* disallow `undefined`
|
|
1235
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-undefined-value.html
|
|
1236
|
+
*/
|
|
1237
|
+
'jsonc/no-undefined-value'?: Linter.RuleEntry<[]>
|
|
1238
|
+
/**
|
|
1239
|
+
* disallow Unicode code point escape sequences.
|
|
1240
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-unicode-codepoint-escapes.html
|
|
1241
|
+
*/
|
|
1242
|
+
'jsonc/no-unicode-codepoint-escapes'?: Linter.RuleEntry<[]>
|
|
1243
|
+
/**
|
|
1244
|
+
* disallow unnecessary escape usage
|
|
1245
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-useless-escape.html
|
|
1246
|
+
*/
|
|
1247
|
+
'jsonc/no-useless-escape'?: Linter.RuleEntry<[]>
|
|
1248
|
+
/**
|
|
1249
|
+
* enforce consistent line breaks inside braces
|
|
1250
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/object-curly-newline.html
|
|
1251
|
+
*/
|
|
1252
|
+
'jsonc/object-curly-newline'?: Linter.RuleEntry<JsoncObjectCurlyNewline>
|
|
1253
|
+
/**
|
|
1254
|
+
* enforce consistent spacing inside braces
|
|
1255
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/object-curly-spacing.html
|
|
1256
|
+
*/
|
|
1257
|
+
'jsonc/object-curly-spacing'?: Linter.RuleEntry<JsoncObjectCurlySpacing>
|
|
1258
|
+
/**
|
|
1259
|
+
* enforce placing object properties on separate lines
|
|
1260
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/object-property-newline.html
|
|
1261
|
+
*/
|
|
1262
|
+
'jsonc/object-property-newline'?: Linter.RuleEntry<JsoncObjectPropertyNewline>
|
|
1263
|
+
/**
|
|
1264
|
+
* require quotes around object literal property names
|
|
1265
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/quote-props.html
|
|
1266
|
+
*/
|
|
1267
|
+
'jsonc/quote-props'?: Linter.RuleEntry<JsoncQuoteProps>
|
|
1268
|
+
/**
|
|
1269
|
+
* enforce use of double or single quotes
|
|
1270
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/quotes.html
|
|
1271
|
+
*/
|
|
1272
|
+
'jsonc/quotes'?: Linter.RuleEntry<JsoncQuotes>
|
|
1273
|
+
/**
|
|
1274
|
+
* require array values to be sorted
|
|
1275
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/sort-array-values.html
|
|
1276
|
+
*/
|
|
1277
|
+
'jsonc/sort-array-values'?: Linter.RuleEntry<JsoncSortArrayValues>
|
|
1278
|
+
/**
|
|
1279
|
+
* require object keys to be sorted
|
|
1280
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/sort-keys.html
|
|
1281
|
+
*/
|
|
1282
|
+
'jsonc/sort-keys'?: Linter.RuleEntry<JsoncSortKeys>
|
|
1283
|
+
/**
|
|
1284
|
+
* disallow spaces after unary operators
|
|
1285
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/space-unary-ops.html
|
|
1286
|
+
*/
|
|
1287
|
+
'jsonc/space-unary-ops'?: Linter.RuleEntry<JsoncSpaceUnaryOps>
|
|
1288
|
+
/**
|
|
1289
|
+
* disallow invalid number for JSON
|
|
1290
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/valid-json-number.html
|
|
1291
|
+
*/
|
|
1292
|
+
'jsonc/valid-json-number'?: Linter.RuleEntry<[]>
|
|
1293
|
+
/**
|
|
1294
|
+
* disallow parsing errors in Vue custom blocks
|
|
1295
|
+
* @see https://ota-meshi.github.io/eslint-plugin-jsonc/rules/vue-custom-block/no-parsing-error.html
|
|
1296
|
+
*/
|
|
1297
|
+
'jsonc/vue-custom-block/no-parsing-error'?: Linter.RuleEntry<[]>
|
|
1078
1298
|
/**
|
|
1079
1299
|
* Enforce the consistent use of either double or single quotes in JSX attributes
|
|
1080
1300
|
* @see https://eslint.org/docs/latest/rules/jsx-quotes
|
|
@@ -6656,6 +6876,267 @@ type JsdocTextEscaping = []|[{
|
|
|
6656
6876
|
type JsdocValidTypes = []|[{
|
|
6657
6877
|
allowEmptyNamepaths?: boolean
|
|
6658
6878
|
}]
|
|
6879
|
+
// ----- jsonc/array-bracket-newline -----
|
|
6880
|
+
type JsoncArrayBracketNewline = []|[(("always" | "never" | "consistent") | {
|
|
6881
|
+
multiline?: boolean
|
|
6882
|
+
minItems?: (number | null)
|
|
6883
|
+
})]
|
|
6884
|
+
// ----- jsonc/array-bracket-spacing -----
|
|
6885
|
+
type JsoncArrayBracketSpacing = []|[("always" | "never")]|[("always" | "never"), {
|
|
6886
|
+
singleValue?: boolean
|
|
6887
|
+
objectsInArrays?: boolean
|
|
6888
|
+
arraysInArrays?: boolean
|
|
6889
|
+
}]
|
|
6890
|
+
// ----- jsonc/array-element-newline -----
|
|
6891
|
+
type JsoncArrayElementNewline = []|[(_JsoncArrayElementNewlineBasicConfig | {
|
|
6892
|
+
ArrayExpression?: _JsoncArrayElementNewlineBasicConfig
|
|
6893
|
+
JSONArrayExpression?: _JsoncArrayElementNewlineBasicConfig
|
|
6894
|
+
ArrayPattern?: _JsoncArrayElementNewlineBasicConfig
|
|
6895
|
+
})]
|
|
6896
|
+
type _JsoncArrayElementNewlineBasicConfig = (("always" | "never" | "consistent") | {
|
|
6897
|
+
multiline?: boolean
|
|
6898
|
+
minItems?: (number | null)
|
|
6899
|
+
})
|
|
6900
|
+
// ----- jsonc/comma-dangle -----
|
|
6901
|
+
type JsoncCommaDangle = []|[(_JsoncCommaDangleValue | {
|
|
6902
|
+
arrays?: _JsoncCommaDangleValueWithIgnore
|
|
6903
|
+
objects?: _JsoncCommaDangleValueWithIgnore
|
|
6904
|
+
imports?: _JsoncCommaDangleValueWithIgnore
|
|
6905
|
+
exports?: _JsoncCommaDangleValueWithIgnore
|
|
6906
|
+
functions?: _JsoncCommaDangleValueWithIgnore
|
|
6907
|
+
})]
|
|
6908
|
+
type _JsoncCommaDangleValue = ("always-multiline" | "always" | "never" | "only-multiline")
|
|
6909
|
+
type _JsoncCommaDangleValueWithIgnore = ("always-multiline" | "always" | "ignore" | "never" | "only-multiline")
|
|
6910
|
+
// ----- jsonc/comma-style -----
|
|
6911
|
+
type JsoncCommaStyle = []|[("first" | "last")]|[("first" | "last"), {
|
|
6912
|
+
exceptions?: {
|
|
6913
|
+
[k: string]: boolean | undefined
|
|
6914
|
+
}
|
|
6915
|
+
}]
|
|
6916
|
+
// ----- jsonc/indent -----
|
|
6917
|
+
type JsoncIndent = []|[("tab" | number)]|[("tab" | number), {
|
|
6918
|
+
SwitchCase?: number
|
|
6919
|
+
VariableDeclarator?: ((number | ("first" | "off")) | {
|
|
6920
|
+
var?: (number | ("first" | "off"))
|
|
6921
|
+
let?: (number | ("first" | "off"))
|
|
6922
|
+
const?: (number | ("first" | "off"))
|
|
6923
|
+
})
|
|
6924
|
+
outerIIFEBody?: (number | "off")
|
|
6925
|
+
MemberExpression?: (number | "off")
|
|
6926
|
+
FunctionDeclaration?: {
|
|
6927
|
+
parameters?: (number | ("first" | "off"))
|
|
6928
|
+
body?: number
|
|
6929
|
+
}
|
|
6930
|
+
FunctionExpression?: {
|
|
6931
|
+
parameters?: (number | ("first" | "off"))
|
|
6932
|
+
body?: number
|
|
6933
|
+
}
|
|
6934
|
+
StaticBlock?: {
|
|
6935
|
+
body?: number
|
|
6936
|
+
}
|
|
6937
|
+
CallExpression?: {
|
|
6938
|
+
arguments?: (number | ("first" | "off"))
|
|
6939
|
+
}
|
|
6940
|
+
ArrayExpression?: (number | ("first" | "off"))
|
|
6941
|
+
ObjectExpression?: (number | ("first" | "off"))
|
|
6942
|
+
ImportDeclaration?: (number | ("first" | "off"))
|
|
6943
|
+
flatTernaryExpressions?: boolean
|
|
6944
|
+
offsetTernaryExpressions?: boolean
|
|
6945
|
+
ignoredNodes?: string[]
|
|
6946
|
+
ignoreComments?: boolean
|
|
6947
|
+
}]
|
|
6948
|
+
// ----- jsonc/key-name-casing -----
|
|
6949
|
+
type JsoncKeyNameCasing = []|[{
|
|
6950
|
+
camelCase?: boolean
|
|
6951
|
+
PascalCase?: boolean
|
|
6952
|
+
SCREAMING_SNAKE_CASE?: boolean
|
|
6953
|
+
"kebab-case"?: boolean
|
|
6954
|
+
snake_case?: boolean
|
|
6955
|
+
ignores?: string[]
|
|
6956
|
+
}]
|
|
6957
|
+
// ----- jsonc/key-spacing -----
|
|
6958
|
+
type JsoncKeySpacing = []|[({
|
|
6959
|
+
align?: (("colon" | "value") | {
|
|
6960
|
+
mode?: ("strict" | "minimum")
|
|
6961
|
+
on?: ("colon" | "value")
|
|
6962
|
+
beforeColon?: boolean
|
|
6963
|
+
afterColon?: boolean
|
|
6964
|
+
})
|
|
6965
|
+
mode?: ("strict" | "minimum")
|
|
6966
|
+
beforeColon?: boolean
|
|
6967
|
+
afterColon?: boolean
|
|
6968
|
+
} | {
|
|
6969
|
+
singleLine?: {
|
|
6970
|
+
mode?: ("strict" | "minimum")
|
|
6971
|
+
beforeColon?: boolean
|
|
6972
|
+
afterColon?: boolean
|
|
6973
|
+
}
|
|
6974
|
+
multiLine?: {
|
|
6975
|
+
align?: (("colon" | "value") | {
|
|
6976
|
+
mode?: ("strict" | "minimum")
|
|
6977
|
+
on?: ("colon" | "value")
|
|
6978
|
+
beforeColon?: boolean
|
|
6979
|
+
afterColon?: boolean
|
|
6980
|
+
})
|
|
6981
|
+
mode?: ("strict" | "minimum")
|
|
6982
|
+
beforeColon?: boolean
|
|
6983
|
+
afterColon?: boolean
|
|
6984
|
+
}
|
|
6985
|
+
} | {
|
|
6986
|
+
singleLine?: {
|
|
6987
|
+
mode?: ("strict" | "minimum")
|
|
6988
|
+
beforeColon?: boolean
|
|
6989
|
+
afterColon?: boolean
|
|
6990
|
+
}
|
|
6991
|
+
multiLine?: {
|
|
6992
|
+
mode?: ("strict" | "minimum")
|
|
6993
|
+
beforeColon?: boolean
|
|
6994
|
+
afterColon?: boolean
|
|
6995
|
+
}
|
|
6996
|
+
align?: {
|
|
6997
|
+
mode?: ("strict" | "minimum")
|
|
6998
|
+
on?: ("colon" | "value")
|
|
6999
|
+
beforeColon?: boolean
|
|
7000
|
+
afterColon?: boolean
|
|
7001
|
+
}
|
|
7002
|
+
})]
|
|
7003
|
+
// ----- jsonc/no-irregular-whitespace -----
|
|
7004
|
+
type JsoncNoIrregularWhitespace = []|[{
|
|
7005
|
+
skipComments?: boolean
|
|
7006
|
+
skipStrings?: boolean
|
|
7007
|
+
skipTemplates?: boolean
|
|
7008
|
+
skipRegExps?: boolean
|
|
7009
|
+
skipJSXText?: boolean
|
|
7010
|
+
}]
|
|
7011
|
+
// ----- jsonc/object-curly-newline -----
|
|
7012
|
+
type JsoncObjectCurlyNewline = []|[((("always" | "never") | {
|
|
7013
|
+
multiline?: boolean
|
|
7014
|
+
minProperties?: number
|
|
7015
|
+
consistent?: boolean
|
|
7016
|
+
}) | {
|
|
7017
|
+
ObjectExpression?: (("always" | "never") | {
|
|
7018
|
+
multiline?: boolean
|
|
7019
|
+
minProperties?: number
|
|
7020
|
+
consistent?: boolean
|
|
7021
|
+
})
|
|
7022
|
+
ObjectPattern?: (("always" | "never") | {
|
|
7023
|
+
multiline?: boolean
|
|
7024
|
+
minProperties?: number
|
|
7025
|
+
consistent?: boolean
|
|
7026
|
+
})
|
|
7027
|
+
ImportDeclaration?: (("always" | "never") | {
|
|
7028
|
+
multiline?: boolean
|
|
7029
|
+
minProperties?: number
|
|
7030
|
+
consistent?: boolean
|
|
7031
|
+
})
|
|
7032
|
+
ExportDeclaration?: (("always" | "never") | {
|
|
7033
|
+
multiline?: boolean
|
|
7034
|
+
minProperties?: number
|
|
7035
|
+
consistent?: boolean
|
|
7036
|
+
})
|
|
7037
|
+
})]
|
|
7038
|
+
// ----- jsonc/object-curly-spacing -----
|
|
7039
|
+
type JsoncObjectCurlySpacing = []|[("always" | "never")]|[("always" | "never"), {
|
|
7040
|
+
arraysInObjects?: boolean
|
|
7041
|
+
objectsInObjects?: boolean
|
|
7042
|
+
}]
|
|
7043
|
+
// ----- jsonc/object-property-newline -----
|
|
7044
|
+
type JsoncObjectPropertyNewline = []|[{
|
|
7045
|
+
allowAllPropertiesOnSameLine?: boolean
|
|
7046
|
+
allowMultiplePropertiesPerLine?: boolean
|
|
7047
|
+
}]
|
|
7048
|
+
// ----- jsonc/quote-props -----
|
|
7049
|
+
type JsoncQuoteProps = ([]|[("always" | "as-needed" | "consistent" | "consistent-as-needed")] | []|[("always" | "as-needed" | "consistent" | "consistent-as-needed")]|[("always" | "as-needed" | "consistent" | "consistent-as-needed"), {
|
|
7050
|
+
keywords?: boolean
|
|
7051
|
+
unnecessary?: boolean
|
|
7052
|
+
numbers?: boolean
|
|
7053
|
+
}])
|
|
7054
|
+
// ----- jsonc/quotes -----
|
|
7055
|
+
type JsoncQuotes = []|[("single" | "double" | "backtick")]|[("single" | "double" | "backtick"), ("avoid-escape" | {
|
|
7056
|
+
avoidEscape?: boolean
|
|
7057
|
+
allowTemplateLiterals?: boolean
|
|
7058
|
+
})]
|
|
7059
|
+
// ----- jsonc/sort-array-values -----
|
|
7060
|
+
type JsoncSortArrayValues = [{
|
|
7061
|
+
pathPattern: string
|
|
7062
|
+
order: ((string | {
|
|
7063
|
+
valuePattern?: string
|
|
7064
|
+
order?: {
|
|
7065
|
+
type?: ("asc" | "desc")
|
|
7066
|
+
caseSensitive?: boolean
|
|
7067
|
+
natural?: boolean
|
|
7068
|
+
}
|
|
7069
|
+
})[] | {
|
|
7070
|
+
type?: ("asc" | "desc")
|
|
7071
|
+
caseSensitive?: boolean
|
|
7072
|
+
natural?: boolean
|
|
7073
|
+
})
|
|
7074
|
+
minValues?: number
|
|
7075
|
+
}, ...({
|
|
7076
|
+
pathPattern: string
|
|
7077
|
+
order: ((string | {
|
|
7078
|
+
valuePattern?: string
|
|
7079
|
+
order?: {
|
|
7080
|
+
type?: ("asc" | "desc")
|
|
7081
|
+
caseSensitive?: boolean
|
|
7082
|
+
natural?: boolean
|
|
7083
|
+
}
|
|
7084
|
+
})[] | {
|
|
7085
|
+
type?: ("asc" | "desc")
|
|
7086
|
+
caseSensitive?: boolean
|
|
7087
|
+
natural?: boolean
|
|
7088
|
+
})
|
|
7089
|
+
minValues?: number
|
|
7090
|
+
})[]]
|
|
7091
|
+
// ----- jsonc/sort-keys -----
|
|
7092
|
+
type JsoncSortKeys = ([{
|
|
7093
|
+
pathPattern: string
|
|
7094
|
+
hasProperties?: string[]
|
|
7095
|
+
order: ((string | {
|
|
7096
|
+
keyPattern?: string
|
|
7097
|
+
order?: {
|
|
7098
|
+
type?: ("asc" | "desc")
|
|
7099
|
+
caseSensitive?: boolean
|
|
7100
|
+
natural?: boolean
|
|
7101
|
+
}
|
|
7102
|
+
})[] | {
|
|
7103
|
+
type?: ("asc" | "desc")
|
|
7104
|
+
caseSensitive?: boolean
|
|
7105
|
+
natural?: boolean
|
|
7106
|
+
})
|
|
7107
|
+
minKeys?: number
|
|
7108
|
+
allowLineSeparatedGroups?: boolean
|
|
7109
|
+
}, ...({
|
|
7110
|
+
pathPattern: string
|
|
7111
|
+
hasProperties?: string[]
|
|
7112
|
+
order: ((string | {
|
|
7113
|
+
keyPattern?: string
|
|
7114
|
+
order?: {
|
|
7115
|
+
type?: ("asc" | "desc")
|
|
7116
|
+
caseSensitive?: boolean
|
|
7117
|
+
natural?: boolean
|
|
7118
|
+
}
|
|
7119
|
+
})[] | {
|
|
7120
|
+
type?: ("asc" | "desc")
|
|
7121
|
+
caseSensitive?: boolean
|
|
7122
|
+
natural?: boolean
|
|
7123
|
+
})
|
|
7124
|
+
minKeys?: number
|
|
7125
|
+
allowLineSeparatedGroups?: boolean
|
|
7126
|
+
})[]] | []|[("asc" | "desc")]|[("asc" | "desc"), {
|
|
7127
|
+
caseSensitive?: boolean
|
|
7128
|
+
natural?: boolean
|
|
7129
|
+
minKeys?: number
|
|
7130
|
+
allowLineSeparatedGroups?: boolean
|
|
7131
|
+
}])
|
|
7132
|
+
// ----- jsonc/space-unary-ops -----
|
|
7133
|
+
type JsoncSpaceUnaryOps = []|[{
|
|
7134
|
+
words?: boolean
|
|
7135
|
+
nonwords?: boolean
|
|
7136
|
+
overrides?: {
|
|
7137
|
+
[k: string]: boolean | undefined
|
|
7138
|
+
}
|
|
7139
|
+
}]
|
|
6659
7140
|
// ----- jsx-quotes -----
|
|
6660
7141
|
type JsxQuotes = []|[("prefer-single" | "prefer-double")]
|
|
6661
7142
|
// ----- key-spacing -----
|
|
@@ -10181,7 +10662,7 @@ type Yoda = []|[("always" | "never")]|[("always" | "never"), {
|
|
|
10181
10662
|
onlyEquality?: boolean
|
|
10182
10663
|
}]
|
|
10183
10664
|
// Names of all the configs
|
|
10184
|
-
type ConfigNames = '2digits:antfu' | '2digits:comments' | '2digits:drizzle' | '2digits:graphql' | '2digits:ignores' | '2digits:gitignore' | '2digits:javascript' | '2digits:jsdoc' | '2digits:next/setup' | '2digits:next/rules' | '2digits:node' | '2digits:prettier' | '2digits:react/setup' | '2digits:react/rules' | '2digits:regexp' | '2digits:sonar' | '2digits:storybook/setup' | '2digits:storybook/rules' | '2digits:storybook/disables' | '2digits:storybook/config' | '2digits:tailwind' | '2digits:tanstack' | '2digits:turbo' | '2digits:typescript/setup' | '2digits:typescript/rules' | '2digits:typescript/disables/dts' | '2digits:typescript/disables/test' | '2digits:typescript/disables/cjs' | '2digits:unicorn'
|
|
10665
|
+
type ConfigNames = '2digits:antfu' | '2digits:comments' | '2digits:drizzle' | '2digits:graphql' | '2digits:ignores' | '2digits:gitignore' | '2digits:javascript' | '2digits:jsdoc' | '2digits:jsonc/base' | '2digits:jsonc/base' | '2digits:jsonc/json' | '2digits:jsonc/jsonc' | '2digits:jsonc/json5' | '2digits:jsonc/package.json' | '2digits:jsonc/tsconfig.json' | '2digits:jsonc/prettier' | '2digits:jsonc/prettier' | '2digits:jsonc/prettier' | '2digits:next/setup' | '2digits:next/rules' | '2digits:node' | '2digits:prettier' | '2digits:react/setup' | '2digits:react/rules' | '2digits:regexp' | '2digits:sonar' | '2digits:storybook/setup' | '2digits:storybook/rules' | '2digits:storybook/disables' | '2digits:storybook/config' | '2digits:tailwind' | '2digits:tanstack' | '2digits:turbo' | '2digits:typescript/setup' | '2digits:typescript/rules' | '2digits:typescript/disables/dts' | '2digits:typescript/disables/test' | '2digits:typescript/disables/cjs' | '2digits:unicorn'
|
|
10185
10666
|
|
|
10186
10667
|
type Rules = RuleOptions;
|
|
10187
10668
|
interface TypedFlatConfigItem extends Omit<Linter.Config<Linter.RulesRecord & Rules>, 'plugins' | 'languageOptions'> {
|
|
@@ -10256,6 +10737,8 @@ declare function javascript(options?: OptionsOverrides): TypedFlatConfigItem[];
|
|
|
10256
10737
|
|
|
10257
10738
|
declare function jsdoc(): Promise<TypedFlatConfigItem[]>;
|
|
10258
10739
|
|
|
10740
|
+
declare function jsonc(): TypedFlatConfigItem[];
|
|
10741
|
+
|
|
10259
10742
|
declare function next(options?: OptionsWithFiles & OptionsTypeScriptWithTypes): Promise<TypedFlatConfigItem[]>;
|
|
10260
10743
|
|
|
10261
10744
|
declare function node(): TypedFlatConfigItem[];
|
|
@@ -10298,4 +10781,4 @@ interface ESLint2DigitsOptions {
|
|
|
10298
10781
|
}
|
|
10299
10782
|
declare function twoDigits(options?: ESLint2DigitsOptions, ...userConfig: TypedFlatConfigItem[]): Promise<TypedFlatConfigItem[]>;
|
|
10300
10783
|
|
|
10301
|
-
export { type ConfigNames, type OptionsOverrides, type OptionsTypeScriptWithTypes, type OptionsWithDrizzle, type OptionsWithFiles, type OptionsWithIgnores, type OptionsWithReact, type OptionsWithStorybook, type Rules, type TypedFlatConfigItem, antfu, comments, twoDigits as default, drizzle, graphql, ignores, javascript, jsdoc, next, node, prettier, react, regexp, sonar, storybook, tailwind, tanstack, turbo, twoDigits, typescript, unicorn };
|
|
10784
|
+
export { type ConfigNames, type OptionsOverrides, type OptionsTypeScriptWithTypes, type OptionsWithDrizzle, type OptionsWithFiles, type OptionsWithIgnores, type OptionsWithReact, type OptionsWithStorybook, type Rules, type TypedFlatConfigItem, antfu, comments, twoDigits as default, drizzle, graphql, ignores, javascript, jsdoc, jsonc, next, node, prettier, react, regexp, sonar, storybook, tailwind, tanstack, turbo, twoDigits, typescript, unicorn };
|