eslint-config-agent 3.0.1 → 3.0.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/CHANGELOG.md CHANGED
@@ -4,6 +4,23 @@ All notable changes to this project will be documented in this file. See [Conven
4
4
 
5
5
 
6
6
 
7
+ ## [3.0.2](https://github.com/tupe12334/eslint-config-agent/compare/v3.0.0...v3.0.2) (2026-04-26)
8
+
9
+ ### Features
10
+
11
+ * **jsdoc:** upgrade to recommended-typescript-error config ([2ecc02e](https://github.com/tupe12334/eslint-config-agent/commit/2ecc02e9031d42263c01f926a1adfed2424355b6))
12
+ * **plugins:** add eslint-plugin-jsdoc recommended config ([ff9fb97](https://github.com/tupe12334/eslint-config-agent/commit/ff9fb97dbaa88db3486b08904a31d9002bdec59d))
13
+ * **settings:** add additional WebFetch domains to permissions ([3a94e18](https://github.com/tupe12334/eslint-config-agent/commit/3a94e18b5128c6901b72e88218e12928d965dbc3))
14
+ * **settings:** add GitHub API permission to settings ([529c09d](https://github.com/tupe12334/eslint-config-agent/commit/529c09da004e2e369e3f639edbe6401d11f944b0))
15
+
16
+ ### Bug Fixes
17
+
18
+ * **ci:** publish to npm after workflow_dispatch releases ([4267e8a](https://github.com/tupe12334/eslint-config-agent/commit/4267e8a3be526c8700ca843c9c6f421e5a6608ea))
19
+ * **deps:** downgrade cspell to v9.8.0 for Node 20 compatibility ([ececdb2](https://github.com/tupe12334/eslint-config-agent/commit/ececdb297843f3317a431aa3075a148659e7659e))
20
+ * **jsdoc:** add missing parameters and fix tag formatting ([07bafcc](https://github.com/tupe12334/eslint-config-agent/commit/07bafcc6cb307e3646a29305ad70c848836ba766))
21
+ * **jsdoc:** escape inline [@typescript](https://github.com/typescript) tag in spec file comments ([f4918e5](https://github.com/tupe12334/eslint-config-agent/commit/f4918e5b3f9f3192884ddf99aa05328f98a4a5a6))
22
+ * **knip:** update configuration for knip v6 compatibility ([75967d6](https://github.com/tupe12334/eslint-config-agent/commit/75967d6a224910ca7c3f78b70e86e5d77074f3a8))
23
+
7
24
  ## 3.0.0 (2026-04-02)
8
25
 
9
26
  * feat: add centy configuration and update claude agent/command definitions ([6f656c5](https://github.com/tupe12334/eslint-config-agent/commit/6f656c5))
@@ -20,6 +20,9 @@ export const configFilesConfig = [
20
20
  'max-lines-per-function': 'off', // Allow long functions in config files
21
21
  'max-lines': 'off', // Allow long files in config files
22
22
  'ddd/require-spec-file': 'off', // Config files don't need spec files
23
+ 'jsdoc/require-jsdoc': 'off', // Config files don't need JSDoc
24
+ 'jsdoc/require-param': 'off',
25
+ 'jsdoc/require-returns': 'off',
23
26
  },
24
27
  },
25
28
  ]
@@ -83,6 +83,10 @@ export const examplesConfig = [
83
83
  // Relax file/function length limits for concise examples
84
84
  'max-lines-per-function': 'off',
85
85
  'max-lines': 'off',
86
+ // Examples don't need JSDoc
87
+ 'jsdoc/require-jsdoc': 'off',
88
+ 'jsdoc/require-param': 'off',
89
+ 'jsdoc/require-returns': 'off',
86
90
  },
87
91
  },
88
92
  ]
@@ -200,6 +200,26 @@ export const testFilesConfig = [
200
200
  'error/no-generic-error': 'off',
201
201
  'error/require-custom-error': 'off',
202
202
  'error/no-throw-literal': 'off',
203
+ // Disable JSDoc rules for non-test script files
204
+ 'jsdoc/require-jsdoc': 'off',
205
+ 'jsdoc/require-param': 'off',
206
+ 'jsdoc/require-returns': 'off',
207
+ },
208
+ },
209
+
210
+ // Disable JSDoc rules for test files
211
+ {
212
+ files: [
213
+ '**/*.test.{js,jsx,ts,tsx}',
214
+ '**/*.spec.{js,jsx,ts,tsx}',
215
+ '**/test/**/*.{js,jsx,ts,tsx}',
216
+ '**/tests/**/*.{js,jsx,ts,tsx}',
217
+ '**/__tests__/**/*.{js,jsx,ts,tsx}',
218
+ ],
219
+ rules: {
220
+ 'jsdoc/require-jsdoc': 'off',
221
+ 'jsdoc/require-param': 'off',
222
+ 'jsdoc/require-returns': 'off',
203
223
  },
204
224
  },
205
225
 
package/index.js CHANGED
@@ -2,6 +2,7 @@ import js from '@eslint/js'
2
2
  import earlyReturn from 'eslint-plugin-early-return'
3
3
  import switchCase from 'eslint-plugin-switch-case'
4
4
  import jsxClassname from 'eslint-plugin-jsx-classname'
5
+ import jsdoc from 'eslint-plugin-jsdoc'
5
6
  import reactHooks from 'eslint-plugin-react-hooks'
6
7
  import { defineConfig } from 'eslint/config'
7
8
  import tseslint from 'typescript-eslint'
@@ -96,15 +97,27 @@ const tsOnlyRestrictedSyntax = [
96
97
  ]
97
98
 
98
99
  const config = defineConfig([
99
- // Global ignores for non-JS/TS files
100
+ // Global ignores for non-JS/TS files and build outputs
100
101
  {
101
- ignores: ['**/*.json', '**/*.md', '**/*.yaml', '**/*.yml'],
102
+ ignores: [
103
+ '**/*.json',
104
+ '**/*.md',
105
+ '**/*.yaml',
106
+ '**/*.yml',
107
+ 'dist/**',
108
+ 'coverage/**',
109
+ ],
102
110
  },
103
111
  // Global plugin definitions
104
112
  {
105
113
  plugins,
106
114
  },
107
- reactHooks.configs['recommended-latest'],
115
+ {
116
+ rules: {
117
+ 'react-hooks/rules-of-hooks': 'error',
118
+ 'react-hooks/exhaustive-deps': 'warn',
119
+ },
120
+ },
108
121
  js.configs.recommended,
109
122
  ...tseslint.configs.strictTypeChecked,
110
123
  ...tseslint.configs.stylisticTypeChecked,
@@ -121,6 +134,7 @@ const config = defineConfig([
121
134
  ...tseslint.configs.disableTypeChecked,
122
135
  },
123
136
  earlyReturn.configs.recommended,
137
+ jsdoc.configs['flat/recommended-typescript-error'],
124
138
  { plugins: { 'switch-case': switchCase }, ...switchCase.configs.recommended },
125
139
 
126
140
  // Base plugin strict configs (error, default, guard-clauses)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-agent",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "description": "ESLint configuration package with TypeScript support",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -73,16 +73,17 @@
73
73
  },
74
74
  "packageManager": "pnpm@10.18.2",
75
75
  "devDependencies": {
76
- "@commitlint/cli": "^20.1.0",
77
- "@commitlint/config-conventional": "^20.0.0",
76
+ "@commitlint/cli": "^20.5.2",
77
+ "@commitlint/config-conventional": "^20.5.0",
78
78
  "@eslint/eslintrc": "^3.3.1",
79
79
  "@eslint/js": "^9.37.0",
80
- "@release-it/conventional-changelog": "^10.0.1",
80
+ "@release-it/conventional-changelog": "^11.0.0",
81
81
  "@typescript-eslint/eslint-plugin": "^8.46.1",
82
82
  "@typescript-eslint/parser": "^8.46.1",
83
- "@typescript-eslint/rule-tester": "^8.46.1",
84
- "cspell": "^9.3.1",
83
+ "@typescript-eslint/rule-tester": "^8.59.0",
84
+ "cspell": "^9.8.0",
85
85
  "eslint": "^9.37.0",
86
+ "eslint-import-resolver-typescript": "^4.4.4",
86
87
  "eslint-plugin-class-export": "^1.0.1",
87
88
  "eslint-plugin-import": "^2.32.0",
88
89
  "eslint-plugin-n": "^17.23.1",
@@ -92,35 +93,36 @@
92
93
  "eslint-plugin-security": "^3.0.1",
93
94
  "eslint-plugin-storybook": "^9.1.10",
94
95
  "husky": "^9.1.7",
95
- "knip": "^5.70.2",
96
- "lint-staged": "^16.2.6",
97
- "prettier": "^3.6.2",
98
- "release-it": "^19.0.5",
96
+ "knip": "^6.7.0",
97
+ "lint-staged": "^16.4.0",
98
+ "prettier": "^3.8.3",
99
+ "release-it": "^20.0.1",
99
100
  "typescript-eslint": "^8.46.1"
100
101
  },
101
102
  "dependencies": {
102
- "@eslint/eslintrc": "^3.3.1",
103
- "@eslint/js": "^9.34.0",
104
- "@typescript-eslint/eslint-plugin": "^8.40.0",
105
- "@typescript-eslint/parser": "^8.40.0",
106
- "eslint": "^9.34.0",
103
+ "@eslint/eslintrc": "^3.3.5",
104
+ "@eslint/js": "^9.39.4",
105
+ "@typescript-eslint/eslint-plugin": "^8.59.0",
106
+ "@typescript-eslint/parser": "^8.59.0",
107
+ "eslint": "^9.39.4",
107
108
  "eslint-plugin-class-export": "^1.0.1",
108
109
  "eslint-plugin-ddd": "^0.5.2",
109
110
  "eslint-plugin-default": "^1.1.0",
110
- "eslint-plugin-early-return": "^1.0.0",
111
+ "eslint-plugin-early-return": "^1.1.0",
111
112
  "eslint-plugin-error": "^1.3.0",
112
113
  "eslint-plugin-import": "^2.32.0",
114
+ "eslint-plugin-jsdoc": "^62.9.0",
113
115
  "eslint-plugin-jsx-classname": "^1.0.1",
114
- "eslint-plugin-n": "^17.21.3",
116
+ "eslint-plugin-n": "^17.24.0",
115
117
  "eslint-plugin-preact": "^0.1.0",
116
118
  "eslint-plugin-react": "^7.37.5",
117
119
  "eslint-plugin-react-hooks": "^5.2.0",
118
120
  "eslint-plugin-required-exports": "^0.2.0",
119
- "eslint-plugin-security": "^3.0.1",
121
+ "eslint-plugin-security": "^4.0.0",
120
122
  "eslint-plugin-single-export": "^1.1.2",
121
- "eslint-plugin-storybook": "^9.1.5",
122
- "eslint-plugin-switch-case": "^3.0.1",
123
- "globals": "^16.4.0",
124
- "typescript-eslint": "^8.40.0"
123
+ "eslint-plugin-storybook": "^10.3.5",
124
+ "eslint-plugin-switch-case": "^4.0.0",
125
+ "globals": "^17.5.0",
126
+ "typescript-eslint": "^8.59.0"
125
127
  }
126
128
  }
package/plugins/index.js CHANGED
@@ -6,6 +6,7 @@
6
6
  */
7
7
 
8
8
  import reactPlugin from 'eslint-plugin-react'
9
+ import reactHooksPlugin from 'eslint-plugin-react-hooks'
9
10
  import importPlugin from 'eslint-plugin-import'
10
11
  import securityPlugin from 'eslint-plugin-security'
11
12
  import nPlugin from 'eslint-plugin-n'
@@ -22,6 +23,7 @@ import { noDefaultClassExportRule } from '../rules/no-default-class-export/index
22
23
  // Centralized plugin configuration
23
24
  export const plugins = {
24
25
  react: reactPlugin,
26
+ 'react-hooks': reactHooksPlugin,
25
27
  import: importPlugin,
26
28
  security: securityPlugin,
27
29
  n: nPlugin,
@@ -7,6 +7,8 @@
7
7
 
8
8
  /**
9
9
  * Check if a class declaration extends Error or another Error class
10
+ * @param node - The AST node to check
11
+ * @returns True if the node extends Error
10
12
  */
11
13
  function extendsError(node) {
12
14
  if (!node.superClass) {
@@ -29,9 +31,11 @@ function extendsError(node) {
29
31
 
30
32
  /**
31
33
  * Check if the file only contains error class exports
34
+ * @param context - The ESLint rule context
35
+ * @returns True if file only exports error classes
32
36
  */
33
37
  function isErrorOnlyFile(context) {
34
- const sourceCode = context.sourceCode || context.getSourceCode()
38
+ const sourceCode = context.sourceCode
35
39
  const ast = sourceCode.ast
36
40
 
37
41
  let hasExports = false
@@ -124,7 +128,7 @@ export const errorOnlyExportsRule = {
124
128
  }
125
129
 
126
130
  // Check if the file already has the eslint-disable comment
127
- const sourceCode = context.sourceCode || context.getSourceCode()
131
+ const sourceCode = context.sourceCode
128
132
  const comments = sourceCode.getAllComments()
129
133
 
130
134
  const hasDisableComment = comments.some(
@@ -5,7 +5,6 @@
5
5
  * smaller, more maintainable files and better separation of concerns.
6
6
  *
7
7
  * Warnings at >70 lines, errors at >100 lines
8
- *
9
8
  * @see https://eslint.org/docs/latest/rules/max-lines
10
9
  */
11
10
 
@@ -5,7 +5,6 @@
5
5
  * smaller, more maintainable functions.
6
6
  *
7
7
  * Warnings at >50 lines, errors at >70 lines
8
- *
9
8
  * @see https://eslint.org/docs/latest/rules/max-lines-per-function
10
9
  */
11
10
 
@@ -31,7 +31,7 @@ export const noDefaultClassExportRule = {
31
31
  schema: [],
32
32
  },
33
33
  create(context) {
34
- const sourceCode = context.getSourceCode()
34
+ const sourceCode = context.sourceCode
35
35
 
36
36
  return {
37
37
  ExportDefaultDeclaration(node) {
@@ -11,7 +11,6 @@
11
11
  * - ✅ type Status = 'active' | 'inactive'; function foo(status: Status) {}
12
12
  * - ✅ type Role = 'admin' | 'user'; interface User { role: Role; }
13
13
  * - ✅ type Mode = 'dev' | 'prod'; class Config { mode: Mode; }
14
- *
15
14
  * @see https://eslint.org/docs/latest/rules/no-restricted-syntax
16
15
  */
17
16
 
@@ -9,7 +9,6 @@
9
9
  * - ❌ process.env.PORT
10
10
  * - ✅ validate(process.env)
11
11
  * - ✅ const { NODE_ENV } = process.env
12
- *
13
12
  * @see https://eslint.org/docs/latest/rules/no-restricted-syntax
14
13
  */
15
14
 
@@ -16,7 +16,6 @@
16
16
  * - ✅ interface UserInfo { name: string; age: string; }
17
17
  * - ✅ type Status = { active: boolean; }
18
18
  * - ✅ Record<string, unknown> (generic keys are allowed)
19
- *
20
19
  * @see https://eslint.org/docs/latest/rules/no-restricted-syntax
21
20
  * @see https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type
22
21
  */
@@ -2,7 +2,6 @@
2
2
  * Rule configuration for no-trailing-spaces
3
3
  *
4
4
  * This rule disallows trailing whitespace (spaces and tabs) at the end of lines.
5
- *
6
5
  * @see https://eslint.org/docs/latest/rules/no-trailing-spaces
7
6
  */
8
7
 
@@ -54,7 +54,6 @@
54
54
  * // Type references with generics
55
55
  * type ListOfUsers = Array<User>;
56
56
  * ```
57
- *
58
57
  * @see https://eslint.org/docs/latest/rules/no-restricted-syntax
59
58
  * @see ./examples/invalid.js for more invalid examples
60
59
  * @see ./examples/valid.js for more valid examples
@@ -10,7 +10,6 @@
10
10
  * - ❌ obj as { name: string }
11
11
  * - ✅ { mode: 'prod' } as const
12
12
  * - ✅ ['a', 'b'] as const
13
- *
14
13
  * @see https://eslint.org/docs/latest/rules/no-restricted-syntax
15
14
  */
16
15
 
@@ -13,7 +13,6 @@
13
13
  * - ❌ const name = user?.name ?? 'Anonymous'
14
14
  * - ✅ const result = value !== null && value !== undefined ? value : 'default'
15
15
  * - ✅ const name = user?.name !== undefined ? user.name : 'Anonymous'
16
- *
17
16
  * @see https://eslint.org/docs/latest/rules/no-restricted-syntax
18
17
  * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing
19
18
  */
@@ -3,7 +3,6 @@
3
3
  *
4
4
  * This plugin enforces consistent class export patterns to improve code organization
5
5
  * and import consistency across the codebase.
6
- *
7
6
  * @see https://www.npmjs.com/package/eslint-plugin-class-export
8
7
  */
9
8
 
@@ -3,7 +3,6 @@
3
3
  *
4
4
  * This rule disallows the use of process.env to encourage centralized configuration
5
5
  * management instead of scattered environment variable access throughout the codebase.
6
- *
7
6
  * @see https://github.com/eslint-community/eslint-plugin-n/blob/HEAD/docs/rules/no-process-env.md
8
7
  */
9
8