@lincy/eslint-config 5.4.1 → 5.4.2

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 CHANGED
@@ -28,8 +28,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
 
30
30
  // src/index.ts
31
- var src_exports = {};
32
- __export(src_exports, {
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
33
  GLOB_ALL_SRC: () => GLOB_ALL_SRC,
34
34
  GLOB_CSS: () => GLOB_CSS,
35
35
  GLOB_EXCLUDE: () => GLOB_EXCLUDE,
@@ -61,7 +61,7 @@ __export(src_exports, {
61
61
  StylisticConfigDefaults: () => StylisticConfigDefaults,
62
62
  combine: () => combine,
63
63
  comments: () => comments,
64
- default: () => src_default,
64
+ default: () => index_default,
65
65
  defaultPluginRenaming: () => defaultPluginRenaming,
66
66
  disables: () => disables,
67
67
  ensurePackages: () => ensurePackages,
@@ -99,9 +99,9 @@ __export(src_exports, {
99
99
  vue: () => vue,
100
100
  yaml: () => yaml
101
101
  });
102
- module.exports = __toCommonJS(src_exports);
102
+ module.exports = __toCommonJS(index_exports);
103
103
 
104
- // node_modules/.pnpm/tsup@8.3.5_jiti@2.4.2_postcss@8.4.49_tsx@4.19.2_typescript@5.7.3_yaml@2.6.1/node_modules/tsup/assets/cjs_shims.js
104
+ // node_modules/.pnpm/tsup@8.3.6_jiti@2.4.2_postcss@8.4.49_tsx@4.19.2_typescript@5.7.3_yaml@2.7.0/node_modules/tsup/assets/cjs_shims.js
105
105
  var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
106
106
  var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
107
107
 
@@ -388,7 +388,6 @@ async function stylistic(options = {}) {
388
388
  } = typeof stylistic2 === "boolean" ? StylisticConfigDefaults : { ...StylisticConfigDefaults, ...stylistic2 };
389
389
  const pluginStylistic = await interopDefault(import("@stylistic/eslint-plugin"));
390
390
  const config = pluginStylistic.configs.customize({
391
- flat: true,
392
391
  indent,
393
392
  jsx: jsx2,
394
393
  pluginName: "style",
@@ -685,6 +684,7 @@ async function imports(options = {}) {
685
684
  "antfu/import-dedupe": "error",
686
685
  "antfu/no-import-dist": "error",
687
686
  "antfu/no-import-node-modules-by-path": "error",
687
+ "import/consistent-type-specifier-style": ["error", "prefer-top-level"],
688
688
  "import/first": "error",
689
689
  "import/no-duplicates": "error",
690
690
  "import/no-mutable-exports": "error",
@@ -1852,6 +1852,7 @@ async function typescript(options = {}) {
1852
1852
  "ts/consistent-type-definitions": ["error", "interface"],
1853
1853
  "ts/consistent-type-imports": ["error", {
1854
1854
  disallowTypeAnnotations: false,
1855
+ fixStyle: "separate-type-imports",
1855
1856
  prefer: "type-imports"
1856
1857
  }],
1857
1858
  "ts/method-signature-style": ["error", "property"],
@@ -2482,7 +2483,7 @@ function getOverrides(options, key) {
2482
2483
  }
2483
2484
 
2484
2485
  // src/index.ts
2485
- var src_default = lincy;
2486
+ var index_default = lincy;
2486
2487
  // Annotate the CommonJS export names for ESM import in node:
2487
2488
  0 && (module.exports = {
2488
2489
  GLOB_ALL_SRC,
package/dist/index.d.cts CHANGED
@@ -1192,31 +1192,31 @@ interface RuleOptions {
1192
1192
  */
1193
1193
  'logical-assignment-operators'?: Linter.RuleEntry<LogicalAssignmentOperators>
1194
1194
  /**
1195
- * Require languages for fenced code blocks.
1195
+ * Require languages for fenced code blocks
1196
1196
  */
1197
1197
  'markdown/fenced-code-language'?: Linter.RuleEntry<MarkdownFencedCodeLanguage>
1198
1198
  /**
1199
- * Enforce heading levels increment by one.
1199
+ * Enforce heading levels increment by one
1200
1200
  */
1201
1201
  'markdown/heading-increment'?: Linter.RuleEntry<[]>
1202
1202
  /**
1203
- * Disallow duplicate headings in the same document.
1203
+ * Disallow duplicate headings in the same document
1204
1204
  */
1205
1205
  'markdown/no-duplicate-headings'?: Linter.RuleEntry<[]>
1206
1206
  /**
1207
- * Disallow empty links.
1207
+ * Disallow empty links
1208
1208
  */
1209
1209
  'markdown/no-empty-links'?: Linter.RuleEntry<[]>
1210
1210
  /**
1211
- * Disallow HTML tags.
1211
+ * Disallow HTML tags
1212
1212
  */
1213
1213
  'markdown/no-html'?: Linter.RuleEntry<MarkdownNoHtml>
1214
1214
  /**
1215
- * Disallow invalid label references.
1215
+ * Disallow invalid label references
1216
1216
  */
1217
1217
  'markdown/no-invalid-label-refs'?: Linter.RuleEntry<[]>
1218
1218
  /**
1219
- * Disallow missing label references.
1219
+ * Disallow missing label references
1220
1220
  */
1221
1221
  'markdown/no-missing-label-refs'?: Linter.RuleEntry<[]>
1222
1222
  /**
@@ -2957,6 +2957,11 @@ interface RuleOptions {
2957
2957
  * @see https://eslint-react.xyz/docs/rules/no-unused-state
2958
2958
  */
2959
2959
  'react/no-unused-state'?: Linter.RuleEntry<[]>
2960
+ /**
2961
+ * disallow the use of 'useContext'
2962
+ * @see https://eslint-react.xyz/docs/rules/no-use-context
2963
+ */
2964
+ 'react/no-use-context'?: Linter.RuleEntry<[]>
2960
2965
  /**
2961
2966
  * disallow unnecessary fragments
2962
2967
  * @see https://eslint-react.xyz/docs/rules/no-useless-fragment
@@ -4237,6 +4242,11 @@ interface RuleOptions {
4237
4242
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-spy-on.md
4238
4243
  */
4239
4244
  'test/prefer-spy-on'?: Linter.RuleEntry<[]>
4245
+ /**
4246
+ * enforce using `toBe(true)` and `toBe(false)` over matchers that coerce types to boolean
4247
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-strict-boolean-matchers.md
4248
+ */
4249
+ 'test/prefer-strict-boolean-matchers'?: Linter.RuleEntry<[]>
4240
4250
  /**
4241
4251
  * enforce strict equal over equal
4242
4252
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-strict-equal.md
@@ -4292,6 +4302,11 @@ interface RuleOptions {
4292
4302
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-local-test-context-for-concurrent-snapshots.md
4293
4303
  */
4294
4304
  'test/require-local-test-context-for-concurrent-snapshots'?: Linter.RuleEntry<[]>
4305
+ /**
4306
+ * enforce using type parameters with vitest mock functions
4307
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-mock-type-parameters.md
4308
+ */
4309
+ 'test/require-mock-type-parameters'?: Linter.RuleEntry<TestRequireMockTypeParameters>
4295
4310
  /**
4296
4311
  * require toThrow() to be called with an error message
4297
4312
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-to-throw-message.md
@@ -6051,7 +6066,7 @@ interface RuleOptions {
6051
6066
  */
6052
6067
  'vue/jsx-uses-vars'?: Linter.RuleEntry<[]>
6053
6068
  /**
6054
- * Enforce consistent spacing between property names and type annotations in types and interfaces in `<template>`
6069
+ * Enforce consistent spacing between keys and values in object literal properties in `<template>`
6055
6070
  * @see https://eslint.vuejs.org/rules/key-spacing.html
6056
6071
  */
6057
6072
  'vue/key-spacing'?: Linter.RuleEntry<VueKeySpacing>
@@ -6744,7 +6759,7 @@ interface RuleOptions {
6744
6759
  */
6745
6760
  'vue/prop-name-casing'?: Linter.RuleEntry<VuePropNameCasing>
6746
6761
  /**
6747
- * Require quotes around object literal, type literal, interfaces and enums property names in `<template>`
6762
+ * Require quotes around object literal property names in `<template>`
6748
6763
  * @see https://eslint.vuejs.org/rules/quote-props.html
6749
6764
  */
6750
6765
  'vue/quote-props'?: Linter.RuleEntry<VueQuoteProps>
@@ -10007,6 +10022,37 @@ type PerfectionistSortEnums = []|[{
10007
10022
  order?: ("asc" | "desc")
10008
10023
 
10009
10024
  forceNumericSort?: boolean
10025
+ customGroups?: ({
10026
+ [k: string]: (string | string[]) | undefined
10027
+ } | ({
10028
+
10029
+ groupName?: string
10030
+
10031
+ type?: ("alphabetical" | "line-length" | "natural" | "unsorted")
10032
+
10033
+ order?: ("desc" | "asc")
10034
+
10035
+ newlinesInside?: ("always" | "never")
10036
+ anyOf?: {
10037
+
10038
+ elementValuePattern?: string
10039
+
10040
+ elementNamePattern?: string
10041
+ }[]
10042
+ } | {
10043
+
10044
+ groupName?: string
10045
+
10046
+ type?: ("alphabetical" | "line-length" | "natural" | "unsorted")
10047
+
10048
+ order?: ("desc" | "asc")
10049
+
10050
+ newlinesInside?: ("always" | "never")
10051
+
10052
+ elementValuePattern?: string
10053
+
10054
+ elementNamePattern?: string
10055
+ })[])
10010
10056
 
10011
10057
  sortByValue?: boolean
10012
10058
 
@@ -10018,7 +10064,15 @@ type PerfectionistSortEnums = []|[{
10018
10064
 
10019
10065
  partitionByNewLine?: boolean
10020
10066
 
10067
+ newlinesBetween?: ("ignore" | "always" | "never")
10068
+
10021
10069
  type?: ("alphabetical" | "natural" | "line-length" | "custom")
10070
+
10071
+ groups?: (string | string[] | {
10072
+
10073
+ newlinesBetween?: ("ignore" | "always" | "never")
10074
+ [k: string]: unknown | undefined
10075
+ })[]
10022
10076
  }]
10023
10077
  // ----- perfectionist/sort-exports -----
10024
10078
  type PerfectionistSortExports = []|[{
@@ -10410,6 +10464,8 @@ type PerfectionistSortNamedExports = []|[{
10410
10464
 
10411
10465
  groupKind?: ("mixed" | "values-first" | "types-first")
10412
10466
 
10467
+ ignoreAlias?: boolean
10468
+
10413
10469
  partitionByComment?: (string[] | boolean | string | {
10414
10470
  block?: (string[] | boolean | string)
10415
10471
  line?: (string[] | boolean | string)
@@ -12102,7 +12158,7 @@ type StyleQuoteProps = ([]|[("always" | "as-needed" | "consistent" | "consistent
12102
12158
  // ----- style/quotes -----
12103
12159
  type StyleQuotes = []|[("single" | "double" | "backtick")]|[("single" | "double" | "backtick"), ("avoid-escape" | {
12104
12160
  avoidEscape?: boolean
12105
- allowTemplateLiterals?: boolean
12161
+ allowTemplateLiterals?: (boolean | ("never" | "avoidEscape" | "always"))
12106
12162
  ignoreStringLiterals?: boolean
12107
12163
  })]
12108
12164
  // ----- style/rest-spread-spacing -----
@@ -12284,6 +12340,10 @@ type TestPreferSnapshotHint = []|[("always" | "multi")]
12284
12340
  type TestRequireHook = []|[{
12285
12341
  allowedFunctionCalls?: string[]
12286
12342
  }]
12343
+ // ----- test/require-mock-type-parameters -----
12344
+ type TestRequireMockTypeParameters = []|[{
12345
+ checkImportFunctions?: boolean
12346
+ }]
12287
12347
  // ----- test/require-top-level-describe -----
12288
12348
  type TestRequireTopLevelDescribe = []|[{
12289
12349
  maxNumberOfTopLevelDescribes?: number
@@ -13225,11 +13285,13 @@ type TsNoUnnecessaryBooleanLiteralCompare = []|[{
13225
13285
  allowComparingNullableBooleansToFalse?: boolean
13226
13286
 
13227
13287
  allowComparingNullableBooleansToTrue?: boolean
13288
+
13289
+ allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean
13228
13290
  }]
13229
13291
  // ----- ts/no-unnecessary-condition -----
13230
13292
  type TsNoUnnecessaryCondition = []|[{
13231
13293
 
13232
- allowConstantLoopConditions?: boolean
13294
+ allowConstantLoopConditions?: (boolean | ("always" | "never" | "only-allowed-literals"))
13233
13295
 
13234
13296
  allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean
13235
13297
 
@@ -13866,7 +13928,6 @@ type VueArrayElementNewline = []|[(_VueArrayElementNewlineBasicConfig | {
13866
13928
  ArrayPattern?: _VueArrayElementNewlineBasicConfig
13867
13929
  })]
13868
13930
  type _VueArrayElementNewlineBasicConfig = (("always" | "never" | "consistent") | {
13869
- consistent?: boolean
13870
13931
  multiline?: boolean
13871
13932
  minItems?: (number | null)
13872
13933
  })
@@ -13935,14 +13996,9 @@ type VueCommaDangle = []|[(_VueCommaDangleValue | {
13935
13996
  imports?: _VueCommaDangleValueWithIgnore
13936
13997
  exports?: _VueCommaDangleValueWithIgnore
13937
13998
  functions?: _VueCommaDangleValueWithIgnore
13938
- importAttributes?: _VueCommaDangleValueWithIgnore
13939
- dynamicImports?: _VueCommaDangleValueWithIgnore
13940
- enums?: _VueCommaDangleValueWithIgnore
13941
- generics?: _VueCommaDangleValueWithIgnore
13942
- tuples?: _VueCommaDangleValueWithIgnore
13943
13999
  })]
13944
14000
  type _VueCommaDangleValue = ("always-multiline" | "always" | "never" | "only-multiline")
13945
- type _VueCommaDangleValueWithIgnore = ("always-multiline" | "always" | "never" | "only-multiline" | "ignore")
14001
+ type _VueCommaDangleValueWithIgnore = ("always-multiline" | "always" | "ignore" | "never" | "only-multiline")
13946
14002
  // ----- vue/comma-spacing -----
13947
14003
  type VueCommaSpacing = []|[{
13948
14004
  before?: boolean
@@ -14013,10 +14069,6 @@ type VueFirstAttributeLinebreak = []|[{
14013
14069
  // ----- vue/func-call-spacing -----
14014
14070
  type VueFuncCallSpacing = ([]|["never"] | []|["always"]|["always", {
14015
14071
  allowNewlines?: boolean
14016
- optionalChain?: {
14017
- before?: boolean
14018
- after?: boolean
14019
- }
14020
14072
  }])
14021
14073
  // ----- vue/html-button-has-type -----
14022
14074
  type VueHtmlButtonHasType = []|[{
@@ -14098,7 +14150,6 @@ type VueKeySpacing = []|[({
14098
14150
  mode?: ("strict" | "minimum")
14099
14151
  beforeColon?: boolean
14100
14152
  afterColon?: boolean
14101
- ignoredNodes?: ("ObjectExpression" | "ObjectPattern" | "ImportDeclaration" | "ExportNamedDeclaration" | "ExportAllDeclaration" | "TSTypeLiteral" | "TSInterfaceBody" | "ClassBody")[]
14102
14153
  } | {
14103
14154
  singleLine?: {
14104
14155
  mode?: ("strict" | "minimum")
@@ -14335,10 +14386,6 @@ type VueKeywordSpacing = []|[{
14335
14386
  before?: boolean
14336
14387
  after?: boolean
14337
14388
  }
14338
- satisfies?: {
14339
- before?: boolean
14340
- after?: boolean
14341
- }
14342
14389
  set?: {
14343
14390
  before?: boolean
14344
14391
  after?: boolean
@@ -14415,10 +14462,6 @@ type VueKeywordSpacing = []|[{
14415
14462
  before?: boolean
14416
14463
  after?: boolean
14417
14464
  }
14418
- type?: {
14419
- before?: boolean
14420
- after?: boolean
14421
- }
14422
14465
  }
14423
14466
  }]
14424
14467
  // ----- vue/match-component-file-name -----
@@ -14547,10 +14590,7 @@ type VueMultilineHtmlElementContentNewline = []|[{
14547
14590
  allowEmptyLines?: boolean
14548
14591
  }]
14549
14592
  // ----- vue/multiline-ternary -----
14550
- type VueMultilineTernary = []|[("always" | "always-multiline" | "never")]|[("always" | "always-multiline" | "never"), {
14551
- ignoreJSX?: boolean
14552
- [k: string]: unknown | undefined
14553
- }]
14593
+ type VueMultilineTernary = []|[("always" | "always-multiline" | "never")]
14554
14594
  // ----- vue/mustache-interpolation-spacing -----
14555
14595
  type VueMustacheInterpolationSpacing = []|[("always" | "never")]
14556
14596
  // ----- vue/new-line-between-multi-line-property -----
@@ -14625,7 +14665,6 @@ type VueNoExtraParens = ([]|["functions"] | []|["all"]|["all", {
14625
14665
  enforceForNewInMemberExpressions?: boolean
14626
14666
  enforceForFunctionPrototypeMethods?: boolean
14627
14667
  allowParensAfterCommentPattern?: string
14628
- nestedConditionalExpressions?: boolean
14629
14668
  }])
14630
14669
  // ----- vue/no-irregular-whitespace -----
14631
14670
  type VueNoIrregularWhitespace = []|[{
@@ -14868,16 +14907,6 @@ type VueObjectCurlyNewline = []|[((("always" | "never") | {
14868
14907
  minProperties?: number
14869
14908
  consistent?: boolean
14870
14909
  })
14871
- TSTypeLiteral?: (("always" | "never") | {
14872
- multiline?: boolean
14873
- minProperties?: number
14874
- consistent?: boolean
14875
- })
14876
- TSInterfaceBody?: (("always" | "never") | {
14877
- multiline?: boolean
14878
- minProperties?: number
14879
- consistent?: boolean
14880
- })
14881
14910
  })]
14882
14911
  // ----- vue/object-curly-spacing -----
14883
14912
  type VueObjectCurlySpacing = []|[("always" | "never")]|[("always" | "never"), {
@@ -14899,7 +14928,7 @@ type VueObjectShorthand = ([]|[("always" | "methods" | "properties" | "never" |
14899
14928
  avoidExplicitReturnArrows?: boolean
14900
14929
  }])
14901
14930
  // ----- vue/operator-linebreak -----
14902
- type VueOperatorLinebreak = []|[(("after" | "before" | "none") | null)]|[(("after" | "before" | "none") | null), {
14931
+ type VueOperatorLinebreak = []|[("after" | "before" | "none" | null)]|[("after" | "before" | "none" | null), {
14903
14932
  overrides?: {
14904
14933
  [k: string]: ("after" | "before" | "none" | "ignore") | undefined
14905
14934
  }
package/dist/index.d.ts CHANGED
@@ -1192,31 +1192,31 @@ interface RuleOptions {
1192
1192
  */
1193
1193
  'logical-assignment-operators'?: Linter.RuleEntry<LogicalAssignmentOperators>
1194
1194
  /**
1195
- * Require languages for fenced code blocks.
1195
+ * Require languages for fenced code blocks
1196
1196
  */
1197
1197
  'markdown/fenced-code-language'?: Linter.RuleEntry<MarkdownFencedCodeLanguage>
1198
1198
  /**
1199
- * Enforce heading levels increment by one.
1199
+ * Enforce heading levels increment by one
1200
1200
  */
1201
1201
  'markdown/heading-increment'?: Linter.RuleEntry<[]>
1202
1202
  /**
1203
- * Disallow duplicate headings in the same document.
1203
+ * Disallow duplicate headings in the same document
1204
1204
  */
1205
1205
  'markdown/no-duplicate-headings'?: Linter.RuleEntry<[]>
1206
1206
  /**
1207
- * Disallow empty links.
1207
+ * Disallow empty links
1208
1208
  */
1209
1209
  'markdown/no-empty-links'?: Linter.RuleEntry<[]>
1210
1210
  /**
1211
- * Disallow HTML tags.
1211
+ * Disallow HTML tags
1212
1212
  */
1213
1213
  'markdown/no-html'?: Linter.RuleEntry<MarkdownNoHtml>
1214
1214
  /**
1215
- * Disallow invalid label references.
1215
+ * Disallow invalid label references
1216
1216
  */
1217
1217
  'markdown/no-invalid-label-refs'?: Linter.RuleEntry<[]>
1218
1218
  /**
1219
- * Disallow missing label references.
1219
+ * Disallow missing label references
1220
1220
  */
1221
1221
  'markdown/no-missing-label-refs'?: Linter.RuleEntry<[]>
1222
1222
  /**
@@ -2957,6 +2957,11 @@ interface RuleOptions {
2957
2957
  * @see https://eslint-react.xyz/docs/rules/no-unused-state
2958
2958
  */
2959
2959
  'react/no-unused-state'?: Linter.RuleEntry<[]>
2960
+ /**
2961
+ * disallow the use of 'useContext'
2962
+ * @see https://eslint-react.xyz/docs/rules/no-use-context
2963
+ */
2964
+ 'react/no-use-context'?: Linter.RuleEntry<[]>
2960
2965
  /**
2961
2966
  * disallow unnecessary fragments
2962
2967
  * @see https://eslint-react.xyz/docs/rules/no-useless-fragment
@@ -4237,6 +4242,11 @@ interface RuleOptions {
4237
4242
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-spy-on.md
4238
4243
  */
4239
4244
  'test/prefer-spy-on'?: Linter.RuleEntry<[]>
4245
+ /**
4246
+ * enforce using `toBe(true)` and `toBe(false)` over matchers that coerce types to boolean
4247
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-strict-boolean-matchers.md
4248
+ */
4249
+ 'test/prefer-strict-boolean-matchers'?: Linter.RuleEntry<[]>
4240
4250
  /**
4241
4251
  * enforce strict equal over equal
4242
4252
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-strict-equal.md
@@ -4292,6 +4302,11 @@ interface RuleOptions {
4292
4302
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-local-test-context-for-concurrent-snapshots.md
4293
4303
  */
4294
4304
  'test/require-local-test-context-for-concurrent-snapshots'?: Linter.RuleEntry<[]>
4305
+ /**
4306
+ * enforce using type parameters with vitest mock functions
4307
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-mock-type-parameters.md
4308
+ */
4309
+ 'test/require-mock-type-parameters'?: Linter.RuleEntry<TestRequireMockTypeParameters>
4295
4310
  /**
4296
4311
  * require toThrow() to be called with an error message
4297
4312
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-to-throw-message.md
@@ -6051,7 +6066,7 @@ interface RuleOptions {
6051
6066
  */
6052
6067
  'vue/jsx-uses-vars'?: Linter.RuleEntry<[]>
6053
6068
  /**
6054
- * Enforce consistent spacing between property names and type annotations in types and interfaces in `<template>`
6069
+ * Enforce consistent spacing between keys and values in object literal properties in `<template>`
6055
6070
  * @see https://eslint.vuejs.org/rules/key-spacing.html
6056
6071
  */
6057
6072
  'vue/key-spacing'?: Linter.RuleEntry<VueKeySpacing>
@@ -6744,7 +6759,7 @@ interface RuleOptions {
6744
6759
  */
6745
6760
  'vue/prop-name-casing'?: Linter.RuleEntry<VuePropNameCasing>
6746
6761
  /**
6747
- * Require quotes around object literal, type literal, interfaces and enums property names in `<template>`
6762
+ * Require quotes around object literal property names in `<template>`
6748
6763
  * @see https://eslint.vuejs.org/rules/quote-props.html
6749
6764
  */
6750
6765
  'vue/quote-props'?: Linter.RuleEntry<VueQuoteProps>
@@ -10007,6 +10022,37 @@ type PerfectionistSortEnums = []|[{
10007
10022
  order?: ("asc" | "desc")
10008
10023
 
10009
10024
  forceNumericSort?: boolean
10025
+ customGroups?: ({
10026
+ [k: string]: (string | string[]) | undefined
10027
+ } | ({
10028
+
10029
+ groupName?: string
10030
+
10031
+ type?: ("alphabetical" | "line-length" | "natural" | "unsorted")
10032
+
10033
+ order?: ("desc" | "asc")
10034
+
10035
+ newlinesInside?: ("always" | "never")
10036
+ anyOf?: {
10037
+
10038
+ elementValuePattern?: string
10039
+
10040
+ elementNamePattern?: string
10041
+ }[]
10042
+ } | {
10043
+
10044
+ groupName?: string
10045
+
10046
+ type?: ("alphabetical" | "line-length" | "natural" | "unsorted")
10047
+
10048
+ order?: ("desc" | "asc")
10049
+
10050
+ newlinesInside?: ("always" | "never")
10051
+
10052
+ elementValuePattern?: string
10053
+
10054
+ elementNamePattern?: string
10055
+ })[])
10010
10056
 
10011
10057
  sortByValue?: boolean
10012
10058
 
@@ -10018,7 +10064,15 @@ type PerfectionistSortEnums = []|[{
10018
10064
 
10019
10065
  partitionByNewLine?: boolean
10020
10066
 
10067
+ newlinesBetween?: ("ignore" | "always" | "never")
10068
+
10021
10069
  type?: ("alphabetical" | "natural" | "line-length" | "custom")
10070
+
10071
+ groups?: (string | string[] | {
10072
+
10073
+ newlinesBetween?: ("ignore" | "always" | "never")
10074
+ [k: string]: unknown | undefined
10075
+ })[]
10022
10076
  }]
10023
10077
  // ----- perfectionist/sort-exports -----
10024
10078
  type PerfectionistSortExports = []|[{
@@ -10410,6 +10464,8 @@ type PerfectionistSortNamedExports = []|[{
10410
10464
 
10411
10465
  groupKind?: ("mixed" | "values-first" | "types-first")
10412
10466
 
10467
+ ignoreAlias?: boolean
10468
+
10413
10469
  partitionByComment?: (string[] | boolean | string | {
10414
10470
  block?: (string[] | boolean | string)
10415
10471
  line?: (string[] | boolean | string)
@@ -12102,7 +12158,7 @@ type StyleQuoteProps = ([]|[("always" | "as-needed" | "consistent" | "consistent
12102
12158
  // ----- style/quotes -----
12103
12159
  type StyleQuotes = []|[("single" | "double" | "backtick")]|[("single" | "double" | "backtick"), ("avoid-escape" | {
12104
12160
  avoidEscape?: boolean
12105
- allowTemplateLiterals?: boolean
12161
+ allowTemplateLiterals?: (boolean | ("never" | "avoidEscape" | "always"))
12106
12162
  ignoreStringLiterals?: boolean
12107
12163
  })]
12108
12164
  // ----- style/rest-spread-spacing -----
@@ -12284,6 +12340,10 @@ type TestPreferSnapshotHint = []|[("always" | "multi")]
12284
12340
  type TestRequireHook = []|[{
12285
12341
  allowedFunctionCalls?: string[]
12286
12342
  }]
12343
+ // ----- test/require-mock-type-parameters -----
12344
+ type TestRequireMockTypeParameters = []|[{
12345
+ checkImportFunctions?: boolean
12346
+ }]
12287
12347
  // ----- test/require-top-level-describe -----
12288
12348
  type TestRequireTopLevelDescribe = []|[{
12289
12349
  maxNumberOfTopLevelDescribes?: number
@@ -13225,11 +13285,13 @@ type TsNoUnnecessaryBooleanLiteralCompare = []|[{
13225
13285
  allowComparingNullableBooleansToFalse?: boolean
13226
13286
 
13227
13287
  allowComparingNullableBooleansToTrue?: boolean
13288
+
13289
+ allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean
13228
13290
  }]
13229
13291
  // ----- ts/no-unnecessary-condition -----
13230
13292
  type TsNoUnnecessaryCondition = []|[{
13231
13293
 
13232
- allowConstantLoopConditions?: boolean
13294
+ allowConstantLoopConditions?: (boolean | ("always" | "never" | "only-allowed-literals"))
13233
13295
 
13234
13296
  allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean
13235
13297
 
@@ -13866,7 +13928,6 @@ type VueArrayElementNewline = []|[(_VueArrayElementNewlineBasicConfig | {
13866
13928
  ArrayPattern?: _VueArrayElementNewlineBasicConfig
13867
13929
  })]
13868
13930
  type _VueArrayElementNewlineBasicConfig = (("always" | "never" | "consistent") | {
13869
- consistent?: boolean
13870
13931
  multiline?: boolean
13871
13932
  minItems?: (number | null)
13872
13933
  })
@@ -13935,14 +13996,9 @@ type VueCommaDangle = []|[(_VueCommaDangleValue | {
13935
13996
  imports?: _VueCommaDangleValueWithIgnore
13936
13997
  exports?: _VueCommaDangleValueWithIgnore
13937
13998
  functions?: _VueCommaDangleValueWithIgnore
13938
- importAttributes?: _VueCommaDangleValueWithIgnore
13939
- dynamicImports?: _VueCommaDangleValueWithIgnore
13940
- enums?: _VueCommaDangleValueWithIgnore
13941
- generics?: _VueCommaDangleValueWithIgnore
13942
- tuples?: _VueCommaDangleValueWithIgnore
13943
13999
  })]
13944
14000
  type _VueCommaDangleValue = ("always-multiline" | "always" | "never" | "only-multiline")
13945
- type _VueCommaDangleValueWithIgnore = ("always-multiline" | "always" | "never" | "only-multiline" | "ignore")
14001
+ type _VueCommaDangleValueWithIgnore = ("always-multiline" | "always" | "ignore" | "never" | "only-multiline")
13946
14002
  // ----- vue/comma-spacing -----
13947
14003
  type VueCommaSpacing = []|[{
13948
14004
  before?: boolean
@@ -14013,10 +14069,6 @@ type VueFirstAttributeLinebreak = []|[{
14013
14069
  // ----- vue/func-call-spacing -----
14014
14070
  type VueFuncCallSpacing = ([]|["never"] | []|["always"]|["always", {
14015
14071
  allowNewlines?: boolean
14016
- optionalChain?: {
14017
- before?: boolean
14018
- after?: boolean
14019
- }
14020
14072
  }])
14021
14073
  // ----- vue/html-button-has-type -----
14022
14074
  type VueHtmlButtonHasType = []|[{
@@ -14098,7 +14150,6 @@ type VueKeySpacing = []|[({
14098
14150
  mode?: ("strict" | "minimum")
14099
14151
  beforeColon?: boolean
14100
14152
  afterColon?: boolean
14101
- ignoredNodes?: ("ObjectExpression" | "ObjectPattern" | "ImportDeclaration" | "ExportNamedDeclaration" | "ExportAllDeclaration" | "TSTypeLiteral" | "TSInterfaceBody" | "ClassBody")[]
14102
14153
  } | {
14103
14154
  singleLine?: {
14104
14155
  mode?: ("strict" | "minimum")
@@ -14335,10 +14386,6 @@ type VueKeywordSpacing = []|[{
14335
14386
  before?: boolean
14336
14387
  after?: boolean
14337
14388
  }
14338
- satisfies?: {
14339
- before?: boolean
14340
- after?: boolean
14341
- }
14342
14389
  set?: {
14343
14390
  before?: boolean
14344
14391
  after?: boolean
@@ -14415,10 +14462,6 @@ type VueKeywordSpacing = []|[{
14415
14462
  before?: boolean
14416
14463
  after?: boolean
14417
14464
  }
14418
- type?: {
14419
- before?: boolean
14420
- after?: boolean
14421
- }
14422
14465
  }
14423
14466
  }]
14424
14467
  // ----- vue/match-component-file-name -----
@@ -14547,10 +14590,7 @@ type VueMultilineHtmlElementContentNewline = []|[{
14547
14590
  allowEmptyLines?: boolean
14548
14591
  }]
14549
14592
  // ----- vue/multiline-ternary -----
14550
- type VueMultilineTernary = []|[("always" | "always-multiline" | "never")]|[("always" | "always-multiline" | "never"), {
14551
- ignoreJSX?: boolean
14552
- [k: string]: unknown | undefined
14553
- }]
14593
+ type VueMultilineTernary = []|[("always" | "always-multiline" | "never")]
14554
14594
  // ----- vue/mustache-interpolation-spacing -----
14555
14595
  type VueMustacheInterpolationSpacing = []|[("always" | "never")]
14556
14596
  // ----- vue/new-line-between-multi-line-property -----
@@ -14625,7 +14665,6 @@ type VueNoExtraParens = ([]|["functions"] | []|["all"]|["all", {
14625
14665
  enforceForNewInMemberExpressions?: boolean
14626
14666
  enforceForFunctionPrototypeMethods?: boolean
14627
14667
  allowParensAfterCommentPattern?: string
14628
- nestedConditionalExpressions?: boolean
14629
14668
  }])
14630
14669
  // ----- vue/no-irregular-whitespace -----
14631
14670
  type VueNoIrregularWhitespace = []|[{
@@ -14868,16 +14907,6 @@ type VueObjectCurlyNewline = []|[((("always" | "never") | {
14868
14907
  minProperties?: number
14869
14908
  consistent?: boolean
14870
14909
  })
14871
- TSTypeLiteral?: (("always" | "never") | {
14872
- multiline?: boolean
14873
- minProperties?: number
14874
- consistent?: boolean
14875
- })
14876
- TSInterfaceBody?: (("always" | "never") | {
14877
- multiline?: boolean
14878
- minProperties?: number
14879
- consistent?: boolean
14880
- })
14881
14910
  })]
14882
14911
  // ----- vue/object-curly-spacing -----
14883
14912
  type VueObjectCurlySpacing = []|[("always" | "never")]|[("always" | "never"), {
@@ -14899,7 +14928,7 @@ type VueObjectShorthand = ([]|[("always" | "methods" | "properties" | "never" |
14899
14928
  avoidExplicitReturnArrows?: boolean
14900
14929
  }])
14901
14930
  // ----- vue/operator-linebreak -----
14902
- type VueOperatorLinebreak = []|[(("after" | "before" | "none") | null)]|[(("after" | "before" | "none") | null), {
14931
+ type VueOperatorLinebreak = []|[("after" | "before" | "none" | null)]|[("after" | "before" | "none" | null), {
14903
14932
  overrides?: {
14904
14933
  [k: string]: ("after" | "before" | "none" | "ignore") | undefined
14905
14934
  }
package/dist/index.js CHANGED
@@ -281,7 +281,6 @@ async function stylistic(options = {}) {
281
281
  } = typeof stylistic2 === "boolean" ? StylisticConfigDefaults : { ...StylisticConfigDefaults, ...stylistic2 };
282
282
  const pluginStylistic = await interopDefault(import("@stylistic/eslint-plugin"));
283
283
  const config = pluginStylistic.configs.customize({
284
- flat: true,
285
284
  indent,
286
285
  jsx: jsx2,
287
286
  pluginName: "style",
@@ -578,6 +577,7 @@ async function imports(options = {}) {
578
577
  "antfu/import-dedupe": "error",
579
578
  "antfu/no-import-dist": "error",
580
579
  "antfu/no-import-node-modules-by-path": "error",
580
+ "import/consistent-type-specifier-style": ["error", "prefer-top-level"],
581
581
  "import/first": "error",
582
582
  "import/no-duplicates": "error",
583
583
  "import/no-mutable-exports": "error",
@@ -1745,6 +1745,7 @@ async function typescript(options = {}) {
1745
1745
  "ts/consistent-type-definitions": ["error", "interface"],
1746
1746
  "ts/consistent-type-imports": ["error", {
1747
1747
  disallowTypeAnnotations: false,
1748
+ fixStyle: "separate-type-imports",
1748
1749
  prefer: "type-imports"
1749
1750
  }],
1750
1751
  "ts/method-signature-style": ["error", "property"],
@@ -2375,7 +2376,7 @@ function getOverrides(options, key) {
2375
2376
  }
2376
2377
 
2377
2378
  // src/index.ts
2378
- var src_default = lincy;
2379
+ var index_default = lincy;
2379
2380
  export {
2380
2381
  GLOB_ALL_SRC,
2381
2382
  GLOB_CSS,
@@ -2408,7 +2409,7 @@ export {
2408
2409
  StylisticConfigDefaults,
2409
2410
  combine,
2410
2411
  comments,
2411
- src_default as default,
2412
+ index_default as default,
2412
2413
  defaultPluginRenaming,
2413
2414
  disables,
2414
2415
  ensurePackages,
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@lincy/eslint-config",
3
3
  "type": "module",
4
- "version": "5.4.1",
5
- "packageManager": "pnpm@9.15.4",
4
+ "version": "5.4.2",
5
+ "packageManager": "pnpm@10.3.0",
6
6
  "description": "LinCenYing's ESLint config",
7
7
  "author": "LinCenYing <lincenying@gmail.com> (https://github.com/lincenying/)",
8
8
  "license": "MIT",
@@ -68,32 +68,32 @@
68
68
  "dependencies": {
69
69
  "@antfu/eslint-define-config": "1.23.0-2",
70
70
  "@antfu/install-pkg": "^1.0.0",
71
- "@clack/prompts": "^0.9.1",
71
+ "@clack/prompts": "^0.10.0",
72
72
  "@eslint-community/eslint-plugin-eslint-comments": "^4.4.1",
73
- "@eslint/markdown": "^6.2.1",
74
- "@stylistic/eslint-plugin": "^2.13.0",
75
- "@typescript-eslint/eslint-plugin": "^8.21.0",
76
- "@typescript-eslint/parser": "^8.21.0",
77
- "@vitest/eslint-plugin": "^1.1.25",
78
- "eslint-config-flat-gitignore": "^1.0.0",
79
- "eslint-flat-config-utils": "^1.1.0",
80
- "eslint-merge-processors": "^1.0.0",
73
+ "@eslint/markdown": "^6.2.2",
74
+ "@stylistic/eslint-plugin": "4.0.0-beta.1",
75
+ "@typescript-eslint/eslint-plugin": "^8.24.0",
76
+ "@typescript-eslint/parser": "^8.24.0",
77
+ "@vitest/eslint-plugin": "^1.1.31",
78
+ "eslint-config-flat-gitignore": "^2.0.0",
79
+ "eslint-flat-config-utils": "^2.0.1",
80
+ "eslint-merge-processors": "^2.0.0",
81
81
  "eslint-parser-plain": "^0.1.1",
82
- "eslint-plugin-antfu": "^2.7.0",
82
+ "eslint-plugin-antfu": "^3.0.0",
83
83
  "eslint-plugin-import-x": "^4.6.1",
84
- "eslint-plugin-jsdoc": "^50.6.2",
85
- "eslint-plugin-jsonc": "^2.18.2",
84
+ "eslint-plugin-jsdoc": "^50.6.3",
85
+ "eslint-plugin-jsonc": "^2.19.1",
86
86
  "eslint-plugin-n": "^17.15.1",
87
87
  "eslint-plugin-no-only-tests": "^3.3.0",
88
- "eslint-plugin-perfectionist": "^4.7.0",
88
+ "eslint-plugin-perfectionist": "^4.8.0",
89
89
  "eslint-plugin-regexp": "^2.7.0",
90
90
  "eslint-plugin-toml": "^0.12.0",
91
91
  "eslint-plugin-unicorn": "^56.0.1",
92
92
  "eslint-plugin-unused-imports": "^4.1.4",
93
93
  "eslint-plugin-vue": "^9.32.0",
94
94
  "eslint-plugin-yml": "^1.16.0",
95
- "eslint-processor-vue-blocks": "^1.0.0",
96
- "globals": "^15.14.0",
95
+ "eslint-processor-vue-blocks": "^2.0.0",
96
+ "globals": "^15.15.0",
97
97
  "jsonc-eslint-parser": "^2.4.0",
98
98
  "local-pkg": "^1.0.0",
99
99
  "prompts": "^2.4.2",
@@ -102,40 +102,40 @@
102
102
  "yaml-eslint-parser": "^1.2.3"
103
103
  },
104
104
  "devDependencies": {
105
- "@antfu/ni": "^23.2.0",
106
- "@eslint-react/eslint-plugin": "^1.24.1",
105
+ "@antfu/ni": "^23.3.1",
106
+ "@eslint-react/eslint-plugin": "^1.26.2",
107
107
  "@eslint-types/jsdoc": "48.2.2",
108
108
  "@eslint-types/typescript-eslint": "^7.5.0",
109
109
  "@eslint-types/unicorn": "^52.0.0",
110
110
  "@eslint/config-inspector": "^1.0.0",
111
111
  "@lincy/eslint-config": "workspace:*",
112
112
  "@prettier/plugin-xml": "^3.4.1",
113
- "@stylistic/eslint-plugin-migrate": "^2.13.0",
113
+ "@stylistic/eslint-plugin-migrate": "^4.0.0-beta.1",
114
114
  "@types/fs-extra": "^11.0.4",
115
- "@types/node": "^22.10.8",
115
+ "@types/node": "^22.13.1",
116
116
  "@types/prompts": "^2.4.9",
117
- "@types/react": "^19.0.7",
117
+ "@types/react": "^19.0.8",
118
118
  "@unocss/eslint-plugin": "^65.4.3",
119
- "bumpp": "^9.10.2",
120
- "eslint": "^9.18.0",
119
+ "bumpp": "^10.0.3",
120
+ "eslint": "^9.20.1",
121
121
  "eslint-plugin-format": "^1.0.1",
122
122
  "eslint-plugin-react-hooks": "^5.1.0",
123
- "eslint-plugin-react-refresh": "^0.4.18",
123
+ "eslint-plugin-react-refresh": "^0.4.19",
124
124
  "eslint-ts-patch": "9.8.0-1",
125
125
  "eslint-typegen": "^1.0.0",
126
126
  "esno": "^4.8.0",
127
127
  "fs-extra": "^11.3.0",
128
- "lint-staged": "^15.4.1",
129
- "prettier": "^3.4.2",
128
+ "lint-staged": "^15.4.3",
129
+ "prettier": "^3.5.0",
130
130
  "react": "^19.0.0",
131
131
  "rimraf": "^6.0.1",
132
132
  "simple-git-hooks": "^2.11.1",
133
133
  "simple-open-url": "^3.0.1",
134
134
  "sucrase": "^3.35.0",
135
- "tsup": "^8.3.5",
135
+ "tsup": "^8.3.6",
136
136
  "typescript": "^5.7.3",
137
137
  "unbuild": "^3.3.1",
138
- "vitest": "^3.0.3",
138
+ "vitest": "^3.0.5",
139
139
  "vue": "^3.5.13"
140
140
  },
141
141
  "pnpm": {
@@ -147,8 +147,8 @@
147
147
  },
148
148
  "resolutions": {
149
149
  "@eslint-community/eslint-utils": "^4.4.1",
150
- "@typescript-eslint/utils": "^8.21.0",
151
- "eslint": "^9.18.0",
150
+ "@typescript-eslint/utils": "^8.24.0",
151
+ "eslint": "^9.20.1",
152
152
  "tsx": "^4.19.2"
153
153
  },
154
154
  "simple-git-hooks": {