@lincy/eslint-config 5.7.0 → 5.7.1

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
@@ -1279,7 +1279,7 @@ async function sortPackageJson() {
1279
1279
  */
1280
1280
  function sortTsconfig() {
1281
1281
  return [{
1282
- files: ["**/tsconfig.json", "**/tsconfig.*.json"],
1282
+ files: ["**/[jt]sconfig.json", "**/[jt]sconfig.*.json"],
1283
1283
  name: "eslint/sort/tsconfig",
1284
1284
  rules: { "jsonc/sort-keys": [
1285
1285
  "error",
package/dist/index.d.cts CHANGED
@@ -1021,7 +1021,7 @@ interface RuleOptions {
1021
1021
  * Disallow empty definitions
1022
1022
  * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-empty-definitions.md
1023
1023
  */
1024
- 'markdown/no-empty-definitions'?: Linter.RuleEntry<[]>;
1024
+ 'markdown/no-empty-definitions'?: Linter.RuleEntry<MarkdownNoEmptyDefinitions>;
1025
1025
  /**
1026
1026
  * Disallow empty images
1027
1027
  * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-empty-images.md
@@ -1067,6 +1067,11 @@ interface RuleOptions {
1067
1067
  * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-reversed-media-syntax.md
1068
1068
  */
1069
1069
  'markdown/no-reversed-media-syntax'?: Linter.RuleEntry<[]>;
1070
+ /**
1071
+ * Disallow unused definitions
1072
+ * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-unused-definitions.md
1073
+ */
1074
+ 'markdown/no-unused-definitions'?: Linter.RuleEntry<MarkdownNoUnusedDefinitions>;
1070
1075
  /**
1071
1076
  * Require alternative text for images
1072
1077
  * @see https://github.com/eslint/markdown/blob/main/docs/rules/require-alt-text.md
@@ -1239,7 +1244,7 @@ interface RuleOptions {
1239
1244
  */
1240
1245
  'no-console'?: Linter.RuleEntry<NoConsole>;
1241
1246
  /**
1242
- * Disallow reassigning `const` variables
1247
+ * Disallow reassigning `const`, `using`, and `await using` variables
1243
1248
  * @see https://eslint.org/docs/latest/rules/no-const-assign
1244
1249
  */
1245
1250
  'no-const-assign'?: Linter.RuleEntry<[]>;
@@ -4130,6 +4135,16 @@ interface RuleOptions {
4130
4135
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/padding-around-test-blocks.md
4131
4136
  */
4132
4137
  'test/padding-around-test-blocks'?: Linter.RuleEntry<[]>;
4138
+ /**
4139
+ * enforce using `toBeCalledOnce()` or `toHaveBeenCalledOnce()`
4140
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-once.md
4141
+ */
4142
+ 'test/prefer-called-once'?: Linter.RuleEntry<[]>;
4143
+ /**
4144
+ * enforce using `toBeCalledTimes(1)` or `toHaveBeenCalledTimes(1)`
4145
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-times.md
4146
+ */
4147
+ 'test/prefer-called-times'?: Linter.RuleEntry<[]>;
4133
4148
  /**
4134
4149
  * enforce using `toBeCalledWith()` or `toHaveBeenCalledWith()`
4135
4150
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-with.md
@@ -4295,6 +4310,11 @@ interface RuleOptions {
4295
4310
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/valid-title.md
4296
4311
  */
4297
4312
  'test/valid-title'?: Linter.RuleEntry<TestValidTitle>;
4313
+ /**
4314
+ * disallow `.todo` usage
4315
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/warn-todo.md
4316
+ */
4317
+ 'test/warn-todo'?: Linter.RuleEntry<[]>;
4298
4318
  /**
4299
4319
  * enforce linebreaks after opening and before closing array brackets
4300
4320
  * @see https://ota-meshi.github.io/eslint-plugin-toml/rules/array-bracket-newline.html
@@ -6392,7 +6412,7 @@ interface RuleOptions {
6392
6412
  */
6393
6413
  'vue/no-restricted-custom-event'?: Linter.RuleEntry<VueNoRestrictedCustomEvent>;
6394
6414
  /**
6395
- * disallow specific HTML elements
6415
+ * disallow specific elements
6396
6416
  * @see https://eslint.vuejs.org/rules/no-restricted-html-elements.html
6397
6417
  */
6398
6418
  'vue/no-restricted-html-elements'?: Linter.RuleEntry<VueNoRestrictedHtmlElements>;
@@ -7701,6 +7721,7 @@ type JsdocMultilineBlocks = [] | [{
7701
7721
  noMultilineBlocks?: boolean;
7702
7722
  noSingleLineBlocks?: boolean;
7703
7723
  noZeroLineText?: boolean;
7724
+ requireSingleLineUnderCount?: number;
7704
7725
  singleLineTags?: string[];
7705
7726
  }];
7706
7727
  // ----- jsdoc/no-bad-blocks -----
@@ -8662,6 +8683,12 @@ type MarkdownNoDuplicateDefinitions = [] | [{
8662
8683
  type MarkdownNoDuplicateHeadings = [] | [{
8663
8684
  checkSiblingsOnly?: boolean;
8664
8685
  }];
8686
+ // ----- markdown/no-empty-definitions -----
8687
+ type MarkdownNoEmptyDefinitions = [] | [{
8688
+ allowDefinitions?: string[];
8689
+ allowFootnoteDefinitions?: string[];
8690
+ checkFootnoteDefinitions?: boolean;
8691
+ }];
8665
8692
  // ----- markdown/no-html -----
8666
8693
  type MarkdownNoHtml = [] | [{
8667
8694
  allowed?: string[];
@@ -8675,6 +8702,11 @@ type MarkdownNoMissingLinkFragments = [] | [{
8675
8702
  type MarkdownNoMultipleH1 = [] | [{
8676
8703
  frontmatterTitle?: string;
8677
8704
  }];
8705
+ // ----- markdown/no-unused-definitions -----
8706
+ type MarkdownNoUnusedDefinitions = [] | [{
8707
+ allowDefinitions?: string[];
8708
+ allowFootnoteDefinitions?: string[];
8709
+ }];
8678
8710
  // ----- max-classes-per-file -----
8679
8711
  type MaxClassesPerFile = [] | [(number | {
8680
8712
  ignoreExpressions?: boolean;
@@ -8838,6 +8870,7 @@ type NoConstantCondition = [] | [{
8838
8870
  // ----- no-duplicate-imports -----
8839
8871
  type NoDuplicateImports = [] | [{
8840
8872
  includeExports?: boolean;
8873
+ allowSeparateTypeImports?: boolean;
8841
8874
  }];
8842
8875
  // ----- no-else-return -----
8843
8876
  type NoElseReturn = [] | [{
@@ -13414,6 +13447,7 @@ interface _TsNamingConvention_MatchRegexConfig {
13414
13447
  }
13415
13448
  // ----- ts/no-base-to-string -----
13416
13449
  type TsNoBaseToString = [] | [{
13450
+ checkUnknown?: boolean;
13417
13451
  ignoredTypeNames?: string[];
13418
13452
  }];
13419
13453
  // ----- ts/no-confusing-void-expression -----
package/dist/index.d.ts CHANGED
@@ -1021,7 +1021,7 @@ interface RuleOptions {
1021
1021
  * Disallow empty definitions
1022
1022
  * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-empty-definitions.md
1023
1023
  */
1024
- 'markdown/no-empty-definitions'?: Linter.RuleEntry<[]>;
1024
+ 'markdown/no-empty-definitions'?: Linter.RuleEntry<MarkdownNoEmptyDefinitions>;
1025
1025
  /**
1026
1026
  * Disallow empty images
1027
1027
  * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-empty-images.md
@@ -1067,6 +1067,11 @@ interface RuleOptions {
1067
1067
  * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-reversed-media-syntax.md
1068
1068
  */
1069
1069
  'markdown/no-reversed-media-syntax'?: Linter.RuleEntry<[]>;
1070
+ /**
1071
+ * Disallow unused definitions
1072
+ * @see https://github.com/eslint/markdown/blob/main/docs/rules/no-unused-definitions.md
1073
+ */
1074
+ 'markdown/no-unused-definitions'?: Linter.RuleEntry<MarkdownNoUnusedDefinitions>;
1070
1075
  /**
1071
1076
  * Require alternative text for images
1072
1077
  * @see https://github.com/eslint/markdown/blob/main/docs/rules/require-alt-text.md
@@ -1239,7 +1244,7 @@ interface RuleOptions {
1239
1244
  */
1240
1245
  'no-console'?: Linter.RuleEntry<NoConsole>;
1241
1246
  /**
1242
- * Disallow reassigning `const` variables
1247
+ * Disallow reassigning `const`, `using`, and `await using` variables
1243
1248
  * @see https://eslint.org/docs/latest/rules/no-const-assign
1244
1249
  */
1245
1250
  'no-const-assign'?: Linter.RuleEntry<[]>;
@@ -4130,6 +4135,16 @@ interface RuleOptions {
4130
4135
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/padding-around-test-blocks.md
4131
4136
  */
4132
4137
  'test/padding-around-test-blocks'?: Linter.RuleEntry<[]>;
4138
+ /**
4139
+ * enforce using `toBeCalledOnce()` or `toHaveBeenCalledOnce()`
4140
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-once.md
4141
+ */
4142
+ 'test/prefer-called-once'?: Linter.RuleEntry<[]>;
4143
+ /**
4144
+ * enforce using `toBeCalledTimes(1)` or `toHaveBeenCalledTimes(1)`
4145
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-times.md
4146
+ */
4147
+ 'test/prefer-called-times'?: Linter.RuleEntry<[]>;
4133
4148
  /**
4134
4149
  * enforce using `toBeCalledWith()` or `toHaveBeenCalledWith()`
4135
4150
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-called-with.md
@@ -4295,6 +4310,11 @@ interface RuleOptions {
4295
4310
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/valid-title.md
4296
4311
  */
4297
4312
  'test/valid-title'?: Linter.RuleEntry<TestValidTitle>;
4313
+ /**
4314
+ * disallow `.todo` usage
4315
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/warn-todo.md
4316
+ */
4317
+ 'test/warn-todo'?: Linter.RuleEntry<[]>;
4298
4318
  /**
4299
4319
  * enforce linebreaks after opening and before closing array brackets
4300
4320
  * @see https://ota-meshi.github.io/eslint-plugin-toml/rules/array-bracket-newline.html
@@ -6392,7 +6412,7 @@ interface RuleOptions {
6392
6412
  */
6393
6413
  'vue/no-restricted-custom-event'?: Linter.RuleEntry<VueNoRestrictedCustomEvent>;
6394
6414
  /**
6395
- * disallow specific HTML elements
6415
+ * disallow specific elements
6396
6416
  * @see https://eslint.vuejs.org/rules/no-restricted-html-elements.html
6397
6417
  */
6398
6418
  'vue/no-restricted-html-elements'?: Linter.RuleEntry<VueNoRestrictedHtmlElements>;
@@ -7701,6 +7721,7 @@ type JsdocMultilineBlocks = [] | [{
7701
7721
  noMultilineBlocks?: boolean;
7702
7722
  noSingleLineBlocks?: boolean;
7703
7723
  noZeroLineText?: boolean;
7724
+ requireSingleLineUnderCount?: number;
7704
7725
  singleLineTags?: string[];
7705
7726
  }];
7706
7727
  // ----- jsdoc/no-bad-blocks -----
@@ -8662,6 +8683,12 @@ type MarkdownNoDuplicateDefinitions = [] | [{
8662
8683
  type MarkdownNoDuplicateHeadings = [] | [{
8663
8684
  checkSiblingsOnly?: boolean;
8664
8685
  }];
8686
+ // ----- markdown/no-empty-definitions -----
8687
+ type MarkdownNoEmptyDefinitions = [] | [{
8688
+ allowDefinitions?: string[];
8689
+ allowFootnoteDefinitions?: string[];
8690
+ checkFootnoteDefinitions?: boolean;
8691
+ }];
8665
8692
  // ----- markdown/no-html -----
8666
8693
  type MarkdownNoHtml = [] | [{
8667
8694
  allowed?: string[];
@@ -8675,6 +8702,11 @@ type MarkdownNoMissingLinkFragments = [] | [{
8675
8702
  type MarkdownNoMultipleH1 = [] | [{
8676
8703
  frontmatterTitle?: string;
8677
8704
  }];
8705
+ // ----- markdown/no-unused-definitions -----
8706
+ type MarkdownNoUnusedDefinitions = [] | [{
8707
+ allowDefinitions?: string[];
8708
+ allowFootnoteDefinitions?: string[];
8709
+ }];
8678
8710
  // ----- max-classes-per-file -----
8679
8711
  type MaxClassesPerFile = [] | [(number | {
8680
8712
  ignoreExpressions?: boolean;
@@ -8838,6 +8870,7 @@ type NoConstantCondition = [] | [{
8838
8870
  // ----- no-duplicate-imports -----
8839
8871
  type NoDuplicateImports = [] | [{
8840
8872
  includeExports?: boolean;
8873
+ allowSeparateTypeImports?: boolean;
8841
8874
  }];
8842
8875
  // ----- no-else-return -----
8843
8876
  type NoElseReturn = [] | [{
@@ -13414,6 +13447,7 @@ interface _TsNamingConvention_MatchRegexConfig {
13414
13447
  }
13415
13448
  // ----- ts/no-base-to-string -----
13416
13449
  type TsNoBaseToString = [] | [{
13450
+ checkUnknown?: boolean;
13417
13451
  ignoredTypeNames?: string[];
13418
13452
  }];
13419
13453
  // ----- ts/no-confusing-void-expression -----
package/dist/index.js CHANGED
@@ -1255,7 +1255,7 @@ async function sortPackageJson() {
1255
1255
  */
1256
1256
  function sortTsconfig() {
1257
1257
  return [{
1258
- files: ["**/tsconfig.json", "**/tsconfig.*.json"],
1258
+ files: ["**/[jt]sconfig.json", "**/[jt]sconfig.*.json"],
1259
1259
  name: "eslint/sort/tsconfig",
1260
1260
  rules: { "jsonc/sort-keys": [
1261
1261
  "error",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lincy/eslint-config",
3
3
  "type": "module",
4
- "version": "5.7.0",
4
+ "version": "5.7.1",
5
5
  "description": "LinCenYing's ESLint config",
6
6
  "author": "LinCenYing <lincenying@gmail.com> (https://github.com/lincenying/)",
7
7
  "license": "MIT",
@@ -54,69 +54,69 @@
54
54
  "@antfu/install-pkg": "^1.1.0",
55
55
  "@clack/prompts": "^0.11.0",
56
56
  "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
57
- "@eslint/markdown": "^6.6.0",
58
- "@stylistic/eslint-plugin": "^5.0.0",
59
- "@typescript-eslint/eslint-plugin": "^8.34.1",
60
- "@typescript-eslint/parser": "^8.34.1",
61
- "@vitest/eslint-plugin": "^1.2.7",
57
+ "@eslint/markdown": "^7.0.0",
58
+ "@stylistic/eslint-plugin": "^5.1.0",
59
+ "@typescript-eslint/eslint-plugin": "^8.37.0",
60
+ "@typescript-eslint/parser": "^8.37.0",
61
+ "@vitest/eslint-plugin": "^1.3.4",
62
62
  "eslint-config-flat-gitignore": "^2.1.0",
63
63
  "eslint-flat-config-utils": "^2.1.0",
64
64
  "eslint-merge-processors": "^2.0.0",
65
65
  "eslint-parser-plain": "^0.1.1",
66
66
  "eslint-plugin-antfu": "^3.1.1",
67
67
  "eslint-plugin-import-lite": "^0.3.0",
68
- "eslint-plugin-jsdoc": "^51.2.1",
68
+ "eslint-plugin-jsdoc": "^51.3.4",
69
69
  "eslint-plugin-jsonc": "^2.20.1",
70
- "eslint-plugin-n": "^17.20.0",
70
+ "eslint-plugin-n": "^17.21.0",
71
71
  "eslint-plugin-no-only-tests": "^3.3.0",
72
72
  "eslint-plugin-perfectionist": "^4.15.0",
73
- "eslint-plugin-pnpm": "^0.3.1",
73
+ "eslint-plugin-pnpm": "^1.0.0",
74
74
  "eslint-plugin-regexp": "^2.9.0",
75
75
  "eslint-plugin-toml": "^0.12.0",
76
76
  "eslint-plugin-unicorn": "^59.0.1",
77
77
  "eslint-plugin-unused-imports": "^4.1.4",
78
- "eslint-plugin-vue": "^10.2.0",
78
+ "eslint-plugin-vue": "^10.3.0",
79
79
  "eslint-plugin-yml": "^1.18.0",
80
80
  "eslint-processor-vue-blocks": "^2.0.0",
81
- "globals": "^16.2.0",
81
+ "globals": "^16.3.0",
82
82
  "jsonc-eslint-parser": "^2.4.0",
83
83
  "local-pkg": "^1.1.1",
84
84
  "prompts": "^2.4.2",
85
85
  "toml-eslint-parser": "^0.10.0",
86
- "vue-eslint-parser": "^10.1.3",
86
+ "vue-eslint-parser": "^10.2.0",
87
87
  "yaml-eslint-parser": "^1.3.0"
88
88
  },
89
89
  "devDependencies": {
90
90
  "@antfu/ni": "^25.0.0",
91
- "@eslint-react/eslint-plugin": "^1.52.2",
91
+ "@eslint-react/eslint-plugin": "^1.52.3",
92
92
  "@eslint-types/typescript-eslint": "^7.5.0",
93
93
  "@eslint-types/unicorn": "^52.0.0",
94
94
  "@eslint/config-inspector": "^1.1.0",
95
- "@prettier/plugin-xml": "^3.4.1",
95
+ "@prettier/plugin-xml": "^3.4.2",
96
96
  "@stylistic/eslint-plugin-migrate": "^4.4.1",
97
- "@types/node": "^24.0.3",
97
+ "@types/node": "^24.0.13",
98
98
  "@types/react": "^19.1.8",
99
- "@unocss/eslint-plugin": "^66.2.3",
99
+ "@unocss/eslint-plugin": "^66.3.3",
100
100
  "bumpp": "^10.2.0",
101
- "eslint": "^9.29.0",
101
+ "eslint": "^9.31.0",
102
102
  "eslint-plugin-format": "^1.0.1",
103
103
  "eslint-plugin-react-hooks": "^5.2.0",
104
104
  "eslint-plugin-react-refresh": "^0.4.20",
105
- "eslint-typegen": "^2.2.0",
105
+ "eslint-typegen": "^2.2.1",
106
106
  "esno": "^4.8.0",
107
107
  "execa": "^9.6.0",
108
108
  "lint-staged": "^16.1.2",
109
- "prettier": "^3.5.3",
109
+ "prettier": "^3.6.2",
110
110
  "react": "^19.1.0",
111
111
  "simple-git-hooks": "^2.13.0",
112
112
  "simple-open-url": "^3.0.1",
113
113
  "sucrase": "^3.35.0",
114
114
  "tinyglobby": "^0.2.14",
115
- "tsdown": "^0.12.8",
115
+ "tsdown": "^0.12.9",
116
116
  "typescript": "^5.8.3",
117
117
  "vitest": "^3.2.4",
118
118
  "vue": "^3.5.17",
119
- "@lincy/eslint-config": "5.7.0"
119
+ "@lincy/eslint-config": "5.7.1"
120
120
  },
121
121
  "simple-git-hooks": {
122
122
  "pre-commit": "npx lint-staged"