@kazupon/eslint-config 0.34.0 → 0.36.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.js CHANGED
@@ -112,6 +112,7 @@ async function comments(options = {}) {
112
112
  const kazupon = await loadPlugin("@kazupon/eslint-plugin");
113
113
  const directives = options.directives ?? {};
114
114
  const kazuponOptions = options.kazupon ?? {};
115
+ const inlineCodeWords = options.inlineCodeWords ?? [];
115
116
  return [{
116
117
  name: "@eslint-community/eslint-comments",
117
118
  ignores: directives.ignores ? [GLOB_MARKDOWN, ...directives.ignores] : [GLOB_MARKDOWN],
@@ -126,6 +127,7 @@ async function comments(options = {}) {
126
127
  ignores: [...config.ignores, ...kazuponOptions.ignores || []],
127
128
  rules: {
128
129
  ...config.rules,
130
+ "@kazupon/prefer-inline-code-words-comments": ["error", { words: inlineCodeWords }],
129
131
  ...kazuponOptions.rules
130
132
  }
131
133
  }))];
@@ -167,6 +169,34 @@ async function css(options = {}) {
167
169
  }];
168
170
  }
169
171
 
172
+ //#endregion
173
+ //#region src/configs/deps.ts
174
+ /**
175
+ * `eslint-plugin-barrel-files` and overrides configuration options
176
+ *
177
+ * @param {DepsOptions & OverridesOptions} options - deps configuration options
178
+ * @returns {Promise<Linter.Config[]>} eslint flat configurations with `eslint-plugin-barrel-files` and overrides
179
+ */
180
+ async function deps(options = {}) {
181
+ const { rules: overrideRules = {}, barrel = false } = options;
182
+ const configs = [];
183
+ if (barrel) {
184
+ const barrelPlugin = await loadPlugin("eslint-plugin-barrel-files");
185
+ const barrelConfig = {
186
+ name: "barrel-files/recommended",
187
+ files: [GLOB_SRC],
188
+ ...barrelPlugin.configs["recommended"]
189
+ };
190
+ configs.push(barrelConfig);
191
+ if (Object.keys(overrideRules).length > 0) configs.push({
192
+ name: "@kazupon/barrel-files",
193
+ files: [GLOB_SRC],
194
+ rules: overrideRules
195
+ });
196
+ }
197
+ return configs;
198
+ }
199
+
170
200
  //#endregion
171
201
  //#region src/configs/html.ts
172
202
  /**
@@ -555,7 +585,7 @@ function jsoncSort() {
555
585
  * @returns {Promise<Linter.Config[]>} eslint flat configurations with `@eslint/markdown` and overrides
556
586
  */
557
587
  async function markdown(options = {}) {
558
- const { rules: overrideRules = {}, files = [GLOB_MARKDOWN], blockExtensions = [], preferences = true, inlineCodeWords = [], linkedWords = [] } = options;
588
+ const { rules: overrideRules = {}, files = [GLOB_MARKDOWN], blockExtensions = [], preferences = true, inlineCodeWords = [], inlineCodeWordsIgnores = [], linkedWords = [], linkedWordsIgnores = [] } = options;
559
589
  const language = options.language || "gfm";
560
590
  /**
561
591
  * TODO: remove this option
@@ -587,8 +617,14 @@ async function markdown(options = {}) {
587
617
  rules: {
588
618
  ...preferencesPlugin.configs.recommended.rules,
589
619
  "markdown-preferences/no-trailing-spaces": "error",
590
- "markdown-preferences/prefer-linked-words": ["error", { words: linkedWords }],
591
- "markdown-preferences/prefer-inline-code-words": ["error", { words: inlineCodeWords }]
620
+ "markdown-preferences/prefer-linked-words": ["error", {
621
+ words: linkedWords,
622
+ ignores: linkedWordsIgnores
623
+ }],
624
+ "markdown-preferences/prefer-inline-code-words": ["error", {
625
+ words: inlineCodeWords,
626
+ ignores: inlineCodeWordsIgnores
627
+ }]
592
628
  }
593
629
  });
594
630
  }
@@ -1072,4 +1108,4 @@ async function yml(options = {}) {
1072
1108
  const yaml = yml;
1073
1109
 
1074
1110
  //#endregion
1075
- export { comments, css, defineConfig, html, imports, javascript, jsdoc, jsonc, markdown, md, prettier, promise, react, regexp, stylistic, svelte, toml, typescript, unicorn, vitest, vue, yaml, yml };
1111
+ export { comments, css, defineConfig, deps, html, imports, javascript, jsdoc, jsonc, markdown, md, prettier, promise, react, regexp, stylistic, svelte, toml, typescript, unicorn, vitest, vue, yaml, yml };
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.34.0",
4
+ "version": "0.36.0",
5
5
  "author": {
6
6
  "email": "kawakazu80@gmail.com",
7
7
  "name": "kazuya kawaguchi"
@@ -50,13 +50,13 @@
50
50
  },
51
51
  "dependencies": {
52
52
  "@eslint-community/eslint-plugin-eslint-comments": "^4.5.0",
53
- "@eslint/js": "^9.32.0",
54
- "@kazupon/eslint-plugin": "^0.5.0",
55
- "@kazupon/jts-utils": "^0.6.0",
53
+ "@eslint/js": "^9.36.0",
54
+ "@kazupon/eslint-plugin": "^0.6.2",
55
+ "@kazupon/jts-utils": "^0.7.1",
56
56
  "@stylistic/eslint-plugin": "^4.4.1",
57
- "eslint-flat-config-utils": "^2.1.0",
57
+ "eslint-flat-config-utils": "^2.1.4",
58
58
  "eslint-merge-processors": "^2.0.0",
59
- "globals": "^16.3.0"
59
+ "globals": "^16.4.0"
60
60
  },
61
61
  "peerDependencies": {
62
62
  "@eslint/css": ">=0.5.0",
@@ -67,10 +67,11 @@
67
67
  "eslint": ">=8.56.0 || >=9.0.0",
68
68
  "eslint-config-prettier": ">=9.1.0",
69
69
  "eslint-import-resolver-typescript": ">=3.6.0",
70
+ "eslint-plugin-barrel-files": ">=3.0.1",
70
71
  "eslint-plugin-import": ">=2.31.0",
71
72
  "eslint-plugin-jsdoc": ">=51.0.0",
72
73
  "eslint-plugin-jsonc": ">=2.16.0",
73
- "eslint-plugin-markdown-preferences": ">=0.4.0",
74
+ "eslint-plugin-markdown-preferences": ">=0.5.0",
74
75
  "eslint-plugin-module-interop": ">=0.3.0",
75
76
  "eslint-plugin-promise": ">=6.4.0",
76
77
  "eslint-plugin-react": ">=7.35.0",
@@ -111,6 +112,9 @@
111
112
  "eslint-import-resolver-typescript": {
112
113
  "optional": true
113
114
  },
115
+ "eslint-plugin-barrel-files": {
116
+ "optional": true
117
+ },
114
118
  "eslint-plugin-import": {
115
119
  "optional": true
116
120
  },
@@ -176,48 +180,49 @@
176
180
  }
177
181
  },
178
182
  "devDependencies": {
179
- "@eslint/compat": "^1.3.1",
183
+ "@eslint/compat": "^1.4.0",
180
184
  "@eslint/css": "^0.9.0",
181
- "@eslint/markdown": "^7.1.0",
182
- "@html-eslint/eslint-plugin": "^0.44.0",
183
- "@intlify/eslint-plugin-vue-i18n": "^4.0.1",
185
+ "@eslint/markdown": "^7.3.0",
186
+ "@html-eslint/eslint-plugin": "^0.45.0",
187
+ "@intlify/eslint-plugin-vue-i18n": "^4.1.0",
184
188
  "@kazupon/prettier-config": "^0.1.1",
185
189
  "@types/eslint": "^9.6.1",
186
- "@types/node": "^22.16.5",
187
- "@vitest/eslint-plugin": "^1.3.4",
188
- "bumpp": "^10.2.1",
189
- "eslint": "^9.32.0",
190
+ "@types/node": "^22.18.6",
191
+ "@vitest/eslint-plugin": "^1.3.12",
192
+ "bumpp": "^10.2.3",
193
+ "eslint": "^9.36.0",
190
194
  "eslint-config-prettier": "^10.1.8",
191
195
  "eslint-import-resolver-typescript": "^4.4.4",
196
+ "eslint-plugin-barrel-files": "^3.0.1",
192
197
  "eslint-plugin-import": "^2.32.0",
193
- "eslint-plugin-jsdoc": "^52.0.0",
198
+ "eslint-plugin-jsdoc": "^58.0.0",
194
199
  "eslint-plugin-jsonc": "^2.20.1",
195
- "eslint-plugin-markdown-preferences": "^0.4.0",
200
+ "eslint-plugin-markdown-preferences": "^0.10.0",
196
201
  "eslint-plugin-module-interop": "^0.3.1",
197
202
  "eslint-plugin-promise": "^7.2.1",
198
203
  "eslint-plugin-react": "^7.37.5",
199
204
  "eslint-plugin-react-hooks": "^5.2.0",
200
- "eslint-plugin-react-refresh": "^0.4.20",
201
- "eslint-plugin-regexp": "^2.9.0",
205
+ "eslint-plugin-react-refresh": "^0.4.21",
206
+ "eslint-plugin-regexp": "^2.10.0",
202
207
  "eslint-plugin-svelte": "^2.46.1",
203
208
  "eslint-plugin-toml": "^0.12.0",
204
- "eslint-plugin-unicorn": "^59.0.1",
205
- "eslint-plugin-unused-imports": "^4.1.4",
206
- "eslint-plugin-vue": "^10.3.0",
209
+ "eslint-plugin-unicorn": "^61.0.0",
210
+ "eslint-plugin-unused-imports": "^4.2.0",
211
+ "eslint-plugin-vue": "^10.5.0",
207
212
  "eslint-plugin-vue-composable": "^1.0.0",
208
- "eslint-plugin-vue-scoped-css": "^2.11.0",
213
+ "eslint-plugin-vue-scoped-css": "^2.12.0",
209
214
  "eslint-plugin-vuejs-accessibility": "^2.4.1",
210
215
  "eslint-plugin-yml": "^1.18.0",
211
216
  "eslint-typegen": "^2.3.0",
212
217
  "gh-changelogen": "^0.2.8",
213
- "jiti": "^2.5.1",
214
- "knip": "^5.62.0",
215
- "lint-staged": "^16.1.2",
218
+ "jiti": "^2.6.0",
219
+ "knip": "^5.64.0",
220
+ "lint-staged": "^16.2.0",
216
221
  "prettier": "^3.6.2",
217
- "svelte": "^5.37.1",
218
- "tsdown": "^0.13.0",
219
- "typescript": "^5.8.3",
220
- "typescript-eslint": "^8.38.0",
222
+ "svelte": "^5.39.6",
223
+ "tsdown": "^0.15.4",
224
+ "typescript": "^5.9.2",
225
+ "typescript-eslint": "^8.44.1",
221
226
  "vitest": "^3.2.4"
222
227
  },
223
228
  "prettier": "@kazupon/prettier-config",
@@ -239,11 +244,11 @@
239
244
  "build:inspector": "pnpm build && pnpx @eslint/config-inspector build",
240
245
  "changelog": "gh-changelogen --repo=kazupon/eslint-config",
241
246
  "dev": "pnpx @eslint/config-inspector --config eslint.config.ts",
242
- "fix": "pnpm run --parallel --color \"/^fix:/\"",
247
+ "fix": "pnpm run --color \"/^fix:/\"",
243
248
  "fix:eslint": "eslint . --fix",
244
249
  "fix:knip": "knip --fix --no-exit-code",
245
250
  "fix:prettier": "prettier . --write --experimental-cli",
246
- "lint": "pnpm run --parallel --color \"/^lint:/\"",
251
+ "lint": "pnpm run --color \"/^lint:/\"",
247
252
  "lint:eslint": "eslint .",
248
253
  "lint:knip": "knip",
249
254
  "lint:prettier": "prettier . --check --experimental-cli",