@kazupon/eslint-config 0.41.0 → 0.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -5845,6 +5845,16 @@ interface MarkdownRules {
5845
5845
  */
5846
5846
  "markdown-preferences/list-marker-alignment"?: Linter.RuleEntry<MarkdownPreferencesListMarkerAlignment>;
5847
5847
  /**
5848
+ * enforce maximum length for various Markdown entities
5849
+ * @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/max-len.html
5850
+ */
5851
+ "markdown-preferences/max-len"?: Linter.RuleEntry<MarkdownPreferencesMaxLen>;
5852
+ /**
5853
+ * disallow trailing punctuation in headings.
5854
+ * @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/no-heading-trailing-punctuation.html
5855
+ */
5856
+ "markdown-preferences/no-heading-trailing-punctuation"?: Linter.RuleEntry<MarkdownPreferencesNoHeadingTrailingPunctuation>;
5857
+ /**
5848
5858
  * disallow implicit block closing for fenced code blocks, math blocks, and custom containers
5849
5859
  * @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/no-implicit-block-closing.html
5850
5860
  */
@@ -5865,6 +5875,11 @@ interface MarkdownRules {
5865
5875
  */
5866
5876
  "markdown-preferences/no-multiple-empty-lines"?: Linter.RuleEntry<MarkdownPreferencesNoMultipleEmptyLines>;
5867
5877
  /**
5878
+ * disallow tab characters in Markdown files.
5879
+ * @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/no-tabs.html
5880
+ */
5881
+ "markdown-preferences/no-tabs"?: Linter.RuleEntry<MarkdownPreferencesNoTabs>;
5882
+ /**
5868
5883
  * disallow text backslash at the end of a line.
5869
5884
  * @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/no-text-backslash-linebreak.html
5870
5885
  */
@@ -5875,10 +5890,10 @@ interface MarkdownRules {
5875
5890
  */
5876
5891
  "markdown-preferences/no-trailing-spaces"?: Linter.RuleEntry<MarkdownPreferencesNoTrailingSpaces>;
5877
5892
  /**
5878
- * enforce that ordered list markers use sequential numbers
5893
+ * enforce consistent ordered list marker numbering (sequential or flat)
5879
5894
  * @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/ordered-list-marker-sequence.html
5880
5895
  */
5881
- "markdown-preferences/ordered-list-marker-sequence"?: Linter.RuleEntry<[]>;
5896
+ "markdown-preferences/ordered-list-marker-sequence"?: Linter.RuleEntry<MarkdownPreferencesOrderedListMarkerSequence>;
5882
5897
  /**
5883
5898
  * enforce that ordered list markers start with 1 or 0
5884
5899
  * @see https://ota-meshi.github.io/eslint-plugin-markdown-preferences/rules/ordered-list-marker-start.html
@@ -6197,15 +6212,102 @@ type MarkdownPreferencesLinkTitleStyle = [] | [{
6197
6212
  type MarkdownPreferencesListMarkerAlignment = [] | [{
6198
6213
  align?: ("left" | "right");
6199
6214
  }];
6215
+ type MarkdownPreferencesMaxLen = [] | [{
6216
+ heading?: (number | "ignore");
6217
+ paragraph?: (number | "ignore");
6218
+ table?: (number | "ignore");
6219
+ html?: (number | "ignore");
6220
+ math?: (number | "ignore");
6221
+ code?: ((number | "ignore") | {
6222
+ [k: string]: (number | "ignore");
6223
+ });
6224
+ frontmatter?: ((number | "ignore") | {
6225
+ [k: string]: (number | "ignore");
6226
+ });
6227
+ list?: ((number | "ignore") | {
6228
+ heading?: (number | "ignore");
6229
+ paragraph?: (number | "ignore");
6230
+ table?: (number | "ignore");
6231
+ html?: (number | "ignore");
6232
+ math?: (number | "ignore");
6233
+ code?: ((number | "ignore") | {
6234
+ [k: string]: (number | "ignore");
6235
+ });
6236
+ frontmatter?: ((number | "ignore") | {
6237
+ [k: string]: (number | "ignore");
6238
+ });
6239
+ });
6240
+ blockquote?: ((number | "ignore") | {
6241
+ heading?: (number | "ignore");
6242
+ paragraph?: (number | "ignore");
6243
+ table?: (number | "ignore");
6244
+ html?: (number | "ignore");
6245
+ math?: (number | "ignore");
6246
+ code?: ((number | "ignore") | {
6247
+ [k: string]: (number | "ignore");
6248
+ });
6249
+ frontmatter?: ((number | "ignore") | {
6250
+ [k: string]: (number | "ignore");
6251
+ });
6252
+ });
6253
+ footnoteDefinition?: ((number | "ignore") | {
6254
+ heading?: (number | "ignore");
6255
+ paragraph?: (number | "ignore");
6256
+ table?: (number | "ignore");
6257
+ html?: (number | "ignore");
6258
+ math?: (number | "ignore");
6259
+ code?: ((number | "ignore") | {
6260
+ [k: string]: (number | "ignore");
6261
+ });
6262
+ frontmatter?: ((number | "ignore") | {
6263
+ [k: string]: (number | "ignore");
6264
+ });
6265
+ });
6266
+ ignoreUrls?: boolean;
6267
+ }];
6268
+ type MarkdownPreferencesNoHeadingTrailingPunctuation = [] | [{
6269
+ punctuation?: (string | {
6270
+ "1"?: string;
6271
+ "2"?: string;
6272
+ "3"?: string;
6273
+ "4"?: string;
6274
+ "5"?: string;
6275
+ "6"?: string;
6276
+ default?: string;
6277
+ "1-2"?: string;
6278
+ "1-3"?: string;
6279
+ "1-4"?: string;
6280
+ "1-5"?: string;
6281
+ "1-6"?: string;
6282
+ "2-3"?: string;
6283
+ "2-4"?: string;
6284
+ "2-5"?: string;
6285
+ "2-6"?: string;
6286
+ "3-4"?: string;
6287
+ "3-5"?: string;
6288
+ "3-6"?: string;
6289
+ "4-5"?: string;
6290
+ "4-6"?: string;
6291
+ "5-6"?: string;
6292
+ });
6293
+ }];
6200
6294
  type MarkdownPreferencesNoMultipleEmptyLines = [] | [{
6201
6295
  max?: number;
6202
6296
  maxEOF?: number;
6203
6297
  maxBOF?: number;
6204
6298
  }];
6299
+ type MarkdownPreferencesNoTabs = [] | [{
6300
+ checkTarget?: ("all" | "indentation" | "non-indentation");
6301
+ ignoreCodeBlocks?: string[];
6302
+ codeBlockTabWidth?: number;
6303
+ }];
6205
6304
  type MarkdownPreferencesNoTrailingSpaces = [] | [{
6206
6305
  skipBlankLines?: boolean;
6207
6306
  ignoreComments?: boolean;
6208
6307
  }];
6308
+ type MarkdownPreferencesOrderedListMarkerSequence = [] | [{
6309
+ increment?: ("always" | "never");
6310
+ }];
6209
6311
  type MarkdownPreferencesOrderedListMarkerStart = [] | [{
6210
6312
  start?: (1 | 0);
6211
6313
  }];
@@ -10916,6 +11018,11 @@ interface TypescriptRules {
10916
11018
  */
10917
11019
  "@typescript-eslint/no-useless-constructor"?: Linter.RuleEntry<[]>;
10918
11020
  /**
11021
+ * Disallow default values that will never be used
11022
+ * @see https://typescript-eslint.io/rules/no-useless-default-assignment
11023
+ */
11024
+ "@typescript-eslint/no-useless-default-assignment"?: Linter.RuleEntry<[]>;
11025
+ /**
10919
11026
  * Disallow empty exports that don't change anything in a module file
10920
11027
  * @see https://typescript-eslint.io/rules/no-useless-empty-export
10921
11028
  */
@@ -13039,6 +13146,11 @@ interface VitestRules {
13039
13146
  */
13040
13147
  "vitest/no-test-return-statement"?: Linter.RuleEntry<[]>;
13041
13148
  /**
13149
+ * Disallow unnecessary async function wrapper for expected promises
13150
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/no-unneeded-async-expect-function.md
13151
+ */
13152
+ "vitest/no-unneeded-async-expect-function"?: Linter.RuleEntry<[]>;
13153
+ /**
13042
13154
  * Enforce padding around `afterAll` blocks
13043
13155
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/padding-around-after-all-blocks.md
13044
13156
  */
@@ -13147,7 +13259,7 @@ interface VitestRules {
13147
13259
  * prefer dynamic import in mock
13148
13260
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-import-in-mock.md
13149
13261
  */
13150
- "vitest/prefer-import-in-mock"?: Linter.RuleEntry<[]>;
13262
+ "vitest/prefer-import-in-mock"?: Linter.RuleEntry<VitestPreferImportInMock>;
13151
13263
  /**
13152
13264
  * enforce importing Vitest globals
13153
13265
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-importing-vitest-globals.md
@@ -13164,6 +13276,11 @@ interface VitestRules {
13164
13276
  */
13165
13277
  "vitest/prefer-mock-promise-shorthand"?: Linter.RuleEntry<[]>;
13166
13278
  /**
13279
+ * Prefer mock return shorthands
13280
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-mock-return-shorthand.md
13281
+ */
13282
+ "vitest/prefer-mock-return-shorthand"?: Linter.RuleEntry<[]>;
13283
+ /**
13167
13284
  * enforce including a hint with external snapshots
13168
13285
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-snapshot-hint.md
13169
13286
  */
@@ -13209,6 +13326,11 @@ interface VitestRules {
13209
13326
  */
13210
13327
  "vitest/prefer-to-contain"?: Linter.RuleEntry<[]>;
13211
13328
  /**
13329
+ * Suggest using `toHaveBeenCalledTimes()`
13330
+ * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-have-been-called-times.md
13331
+ */
13332
+ "vitest/prefer-to-have-been-called-times"?: Linter.RuleEntry<[]>;
13333
+ /**
13212
13334
  * enforce using toHaveLength()
13213
13335
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/prefer-to-have-length.md
13214
13336
  */
@@ -13234,11 +13356,6 @@ interface VitestRules {
13234
13356
  */
13235
13357
  "vitest/require-hook"?: Linter.RuleEntry<VitestRequireHook>;
13236
13358
  /**
13237
- * require usage of import in vi.mock()
13238
- * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-import-vi-mock.md
13239
- */
13240
- "vitest/require-import-vi-mock"?: Linter.RuleEntry<[]>;
13241
- /**
13242
13359
  * require local Test Context for concurrent snapshot tests
13243
13360
  * @see https://github.com/vitest-dev/eslint-plugin-vitest/blob/main/docs/rules/require-local-test-context-for-concurrent-snapshots.md
13244
13361
  */
@@ -13338,6 +13455,9 @@ type VitestPreferExpectAssertions = [] | [{
13338
13455
  onlyFunctionsWithExpectInLoop?: boolean;
13339
13456
  onlyFunctionsWithExpectInCallback?: boolean;
13340
13457
  }];
13458
+ type VitestPreferImportInMock = [] | [{
13459
+ fixable?: boolean;
13460
+ }];
13341
13461
  type VitestPreferLowercaseTitle = [] | [{
13342
13462
  ignore?: ("describe" | "test" | "it")[];
13343
13463
  allowedPrefixes?: string[];
@@ -16438,7 +16558,7 @@ interface CommentsOptions {
16438
16558
  /**
16439
16559
  * An options for `@kazupon/eslint-plugin` comment config
16440
16560
  */
16441
- kazupon?: OverridesOptions<CommentsRules>;
16561
+ kazupon?: OverridesOptions<CommentsRules> | false;
16442
16562
  /**
16443
16563
  * enforce inline code for specific words on comments
16444
16564
  *
package/dist/index.mjs CHANGED
@@ -136,7 +136,7 @@ async function comments(options = {}) {
136
136
  const directives = options.directives ?? {};
137
137
  const kazuponOptions = options.kazupon ?? {};
138
138
  const inlineCodeWords = options.inlineCodeWords ?? [];
139
- return [{
139
+ const configs = [{
140
140
  name: "@eslint-community/eslint-comments",
141
141
  ignores: directives.ignores ? [GLOB_MARKDOWN, ...directives.ignores] : [GLOB_MARKDOWN],
142
142
  plugins: { "@eslint-community/eslint-comments": comments$1 },
@@ -145,7 +145,8 @@ async function comments(options = {}) {
145
145
  ...directives.rules,
146
146
  "@eslint-community/eslint-comments/require-description": ["error", { ignore: ["eslint-enable"] }]
147
147
  }
148
- }, ...kazupon.configs.comment.map((config) => ({
148
+ }];
149
+ if (typeof kazuponOptions === "object") configs.push(...kazupon.configs.comment.map((config) => ({
149
150
  ...config,
150
151
  ignores: [...config.ignores, ...kazuponOptions.ignores || []],
151
152
  rules: {
@@ -153,7 +154,8 @@ async function comments(options = {}) {
153
154
  "@kazupon/prefer-inline-code-words-comments": ["error", { words: inlineCodeWords }],
154
155
  ...kazuponOptions.rules
155
156
  }
156
- }))];
157
+ })));
158
+ return configs;
157
159
  }
158
160
 
159
161
  //#endregion
@@ -434,6 +436,7 @@ async function javascript(options = {}) {
434
436
  */
435
437
  async function jsdoc(options = {}) {
436
438
  const { rules: overrideRules = {}, ignores: overrideIgnores = [], typescript: typescript$1, error = false } = options;
439
+ const jsdocSettings = (options.settings || {}).jsdoc || {};
437
440
  const jsdoc$1 = await loadPlugin("eslint-plugin-jsdoc");
438
441
  function resolvePreset() {
439
442
  let preset = "recommended";
@@ -500,7 +503,11 @@ async function jsdoc(options = {}) {
500
503
  { tags: { typeParam: "always" } }
501
504
  ],
502
505
  ...overrideRules
503
- }
506
+ },
507
+ settings: { jsdoc: {
508
+ tagNamePreference: { template: "typeParam" },
509
+ ...jsdocSettings
510
+ } }
504
511
  }];
505
512
  }
506
513
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kazupon/eslint-config",
3
3
  "description": "ESLint config for @kazupon",
4
- "version": "0.41.0",
4
+ "version": "0.43.0",
5
5
  "author": {
6
6
  "email": "kawakazu80@gmail.com",
7
7
  "name": "kazuya kawaguchi"
@@ -50,8 +50,8 @@
50
50
  },
51
51
  "dependencies": {
52
52
  "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
53
- "@eslint/js": "^9.39.1",
54
- "@kazupon/eslint-plugin": "^0.6.2",
53
+ "@eslint/js": "^9.39.2",
54
+ "@kazupon/eslint-plugin": "^0.7.0",
55
55
  "@kazupon/jts-utils": "^0.7.1",
56
56
  "@stylistic/eslint-plugin": "^4.4.1",
57
57
  "eslint-flat-config-utils": "^2.1.4",
@@ -69,7 +69,7 @@
69
69
  "eslint-import-resolver-typescript": ">=4.4.0",
70
70
  "eslint-plugin-barrel-files": ">=3.0.1",
71
71
  "eslint-plugin-import": ">=2.32.0",
72
- "eslint-plugin-jsdoc": ">61.1.0",
72
+ "eslint-plugin-jsdoc": ">61.5.0",
73
73
  "eslint-plugin-jsonc": ">=2.21.0",
74
74
  "eslint-plugin-markdown-preferences": ">=0.36.2",
75
75
  "eslint-plugin-module-interop": ">=0.3.0",
@@ -189,50 +189,50 @@
189
189
  },
190
190
  "devDependencies": {
191
191
  "@eslint/compat": "^1.4.1",
192
- "@eslint/css": "^0.14.0",
192
+ "@eslint/css": "^0.14.1",
193
193
  "@eslint/markdown": "^7.5.1",
194
194
  "@html-eslint/eslint-plugin": "^0.48.0",
195
195
  "@intlify/eslint-plugin-vue-i18n": "^4.1.0",
196
- "@kazupon/prettier-config": "^0.1.1",
196
+ "@kazupon/prettier-config": "^0.2.0",
197
197
  "@types/eslint": "^9.6.1",
198
- "@types/node": "^22.19.1",
199
- "@vitest/eslint-plugin": "^1.5.0",
200
- "bumpp": "^10.3.1",
201
- "eslint": "^9.39.1",
198
+ "@types/node": "^22.19.3",
199
+ "@vitest/eslint-plugin": "^1.6.4",
200
+ "bumpp": "^10.3.2",
201
+ "eslint": "^9.39.2",
202
202
  "eslint-config-prettier": "^10.1.8",
203
203
  "eslint-import-resolver-typescript": "^4.4.4",
204
204
  "eslint-plugin-barrel-files": "^3.0.1",
205
205
  "eslint-plugin-import": "^2.32.0",
206
- "eslint-plugin-jsdoc": "^61.4.1",
206
+ "eslint-plugin-jsdoc": "^61.5.0",
207
207
  "eslint-plugin-jsonc": "^2.21.0",
208
- "eslint-plugin-markdown-preferences": "^0.36.3",
208
+ "eslint-plugin-markdown-preferences": "^0.40.2",
209
209
  "eslint-plugin-module-interop": "^0.3.1",
210
- "eslint-plugin-oxlint": "^1.30.0",
210
+ "eslint-plugin-oxlint": "^1.35.0",
211
211
  "eslint-plugin-promise": "^7.2.1",
212
212
  "eslint-plugin-react": "^7.37.5",
213
213
  "eslint-plugin-react-hooks": "^7.0.1",
214
- "eslint-plugin-react-refresh": "^0.4.24",
214
+ "eslint-plugin-react-refresh": "^0.4.26",
215
215
  "eslint-plugin-regexp": "^2.10.0",
216
- "eslint-plugin-svelte": "^3.13.0",
216
+ "eslint-plugin-svelte": "^3.13.1",
217
217
  "eslint-plugin-toml": "^0.12.0",
218
218
  "eslint-plugin-unicorn": "^61.0.2",
219
219
  "eslint-plugin-unused-imports": "^4.3.0",
220
- "eslint-plugin-vue": "^10.6.0",
220
+ "eslint-plugin-vue": "^10.6.2",
221
221
  "eslint-plugin-vue-composable": "^1.0.0",
222
222
  "eslint-plugin-vue-scoped-css": "^2.12.0",
223
223
  "eslint-plugin-vuejs-accessibility": "^2.4.1",
224
- "eslint-plugin-yml": "^1.19.0",
224
+ "eslint-plugin-yml": "^1.19.1",
225
225
  "eslint-typegen": "^2.3.0",
226
226
  "gh-changelogen": "^0.2.8",
227
227
  "jiti": "^2.6.1",
228
- "knip": "^5.70.2",
228
+ "knip": "^5.77.1",
229
229
  "lint-staged": "^16.2.7",
230
- "prettier": "^3.6.2",
231
- "svelte": "^5.44.1",
230
+ "prettier": "^3.7.4",
231
+ "svelte": "^5.46.1",
232
232
  "tailwind-csstree": "^0.1.4",
233
- "tsdown": "^0.16.4",
233
+ "tsdown": "^0.18.3",
234
234
  "typescript": "^5.9.3",
235
- "typescript-eslint": "^8.48.0",
235
+ "typescript-eslint": "^8.50.1",
236
236
  "vitest": "^3.2.4"
237
237
  },
238
238
  "prettier": "@kazupon/prettier-config",