eslint-config-agent 2.0.1 → 3.0.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/CHANGELOG.md +26 -0
- package/configs/examples.js +0 -1
- package/configs/overrides.js +0 -1
- package/configs/test-files.js +0 -1
- package/index.js +16 -2
- package/package.json +2 -1
- package/rules/index.js +0 -3
- package/rules/no-class-property-defaults/index.js +0 -37
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,32 @@ All notable changes to this project will be documented in this file. See [Conven
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
+
## 3.0.0 (2026-04-02)
|
|
8
|
+
|
|
9
|
+
* feat: add centy configuration and update claude agent/command definitions ([6f656c5](https://github.com/tupe12334/eslint-config-agent/commit/6f656c5))
|
|
10
|
+
* feat: move peerDependencies to dependencies for single-install experience ([80f5998](https://github.com/tupe12334/eslint-config-agent/commit/80f5998))
|
|
11
|
+
* feat(ci): migrate to OIDC trusted publishing and single CI/CD workflow ([d69b81a](https://github.com/tupe12334/eslint-config-agent/commit/d69b81a))
|
|
12
|
+
* feat(commands): add tupe Claude slash commands and update centy config ([5a8f4a0](https://github.com/tupe12334/eslint-config-agent/commit/5a8f4a0))
|
|
13
|
+
* feat(config): add eslint-plugin-early-return recommended config ([1fc0e45](https://github.com/tupe12334/eslint-config-agent/commit/1fc0e45))
|
|
14
|
+
* feat(config): add git diff and pnpm install permissions to settings ([d544eb7](https://github.com/tupe12334/eslint-config-agent/commit/d544eb7))
|
|
15
|
+
* feat(config): add git push and WebFetch permissions to settings ([8485f43](https://github.com/tupe12334/eslint-config-agent/commit/8485f43))
|
|
16
|
+
* feat(config): add pnpm knip and git restore permissions to settings ([ffac7cd](https://github.com/tupe12334/eslint-config-agent/commit/ffac7cd))
|
|
17
|
+
* feat(manifest): update centyVersion to 0.8.4 and clean up timestamps ([d735642](https://github.com/tupe12334/eslint-config-agent/commit/d735642))
|
|
18
|
+
* feat(rules): add eslint-plugin-switch-case with recommended config ([d938695](https://github.com/tupe12334/eslint-config-agent/commit/d938695))
|
|
19
|
+
* feat(rules): remove no-class-property-defaults rule ([0f606c5](https://github.com/tupe12334/eslint-config-agent/commit/0f606c5))
|
|
20
|
+
* feat(rules): replace tseslint recommended with strict-type-checked and stylistic-type-checked ([651ed7b](https://github.com/tupe12334/eslint-config-agent/commit/651ed7b))
|
|
21
|
+
* feat(settings): add 'Bash(ls:*)' permission to settings ([2a23685](https://github.com/tupe12334/eslint-config-agent/commit/2a23685))
|
|
22
|
+
* feat(settings): add additional Bash commands for formatting and testing ([27175fd](https://github.com/tupe12334/eslint-config-agent/commit/27175fd))
|
|
23
|
+
* feat(settings): add additional WebFetch permissions to settings ([cac497c](https://github.com/tupe12334/eslint-config-agent/commit/cac497c))
|
|
24
|
+
* feat(settings): add git stash and GitHub workflow permissions ([255513e](https://github.com/tupe12334/eslint-config-agent/commit/255513e))
|
|
25
|
+
* fix(rules): suppress no-empty-function in RuleTester no-op callbacks ([56ca34f](https://github.com/tupe12334/eslint-config-agent/commit/56ca34f))
|
|
26
|
+
* chore: remove eslint-plugin-preact from knip ignoreDependencies ([032a085](https://github.com/tupe12334/eslint-config-agent/commit/032a085))
|
|
27
|
+
* chore: remove kiro settings configuration files ([80baec6](https://github.com/tupe12334/eslint-config-agent/commit/80baec6))
|
|
28
|
+
* chore(config): remove empty hooks array from config.json ([750cc28](https://github.com/tupe12334/eslint-config-agent/commit/750cc28))
|
|
29
|
+
* chore(release): bump version to 2.0.0 ([982c1d9](https://github.com/tupe12334/eslint-config-agent/commit/982c1d9))
|
|
30
|
+
* chore(release): bump version to 2.1.0 ([5dc4711](https://github.com/tupe12334/eslint-config-agent/commit/5dc4711))
|
|
31
|
+
* refactor(classname): replace custom rule with eslint-plugin-jsx-classname strict config ([9da02c0](https://github.com/tupe12334/eslint-config-agent/commit/9da02c0))
|
|
32
|
+
|
|
7
33
|
## <small>1.9.3 (2026-01-10)</small>
|
|
8
34
|
|
|
9
35
|
* chore: update eslint-plugin-ddd to v0.5.2 ([27e8654](https://github.com/tupe12334/eslint-config/commit/27e8654))
|
package/configs/examples.js
CHANGED
|
@@ -55,7 +55,6 @@ const tsOnlyRestrictedSyntax = [
|
|
|
55
55
|
...noRecordLiteralTypesConfigs,
|
|
56
56
|
...noInlineUnionTypesConfigs,
|
|
57
57
|
allRules.noTypeAssertionsConfig,
|
|
58
|
-
allRules.noClassPropertyDefaultsConfig,
|
|
59
58
|
{
|
|
60
59
|
selector: 'TSAsExpression:has(> TSIndexedAccessType > TSTypeQuery)',
|
|
61
60
|
message:
|
package/configs/overrides.js
CHANGED
|
@@ -79,7 +79,6 @@ export const overridesConfig = (
|
|
|
79
79
|
'Type assertions with indexed access types like "as (typeof X)[number]" are not allowed. Use a named type instead.',
|
|
80
80
|
},
|
|
81
81
|
allRules.noTypeAssertionsConfig,
|
|
82
|
-
allRules.noClassPropertyDefaultsConfig,
|
|
83
82
|
allRules.noProcessEnvPropertiesConfig,
|
|
84
83
|
allRules.noExportSpecifiersConfig,
|
|
85
84
|
],
|
package/configs/test-files.js
CHANGED
|
@@ -70,7 +70,6 @@ const tsOnlyRestrictedSyntax = [
|
|
|
70
70
|
...noRecordLiteralTypesConfigs,
|
|
71
71
|
...noInlineUnionTypesConfigs,
|
|
72
72
|
allRules.noTypeAssertionsConfig,
|
|
73
|
-
allRules.noClassPropertyDefaultsConfig,
|
|
74
73
|
{
|
|
75
74
|
selector: 'TSAsExpression:has(> TSIndexedAccessType > TSTypeQuery)',
|
|
76
75
|
message:
|
package/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import js from '@eslint/js'
|
|
2
2
|
import earlyReturn from 'eslint-plugin-early-return'
|
|
3
|
+
import switchCase from 'eslint-plugin-switch-case'
|
|
3
4
|
import jsxClassname from 'eslint-plugin-jsx-classname'
|
|
4
5
|
import reactHooks from 'eslint-plugin-react-hooks'
|
|
5
6
|
import { defineConfig } from 'eslint/config'
|
|
@@ -86,7 +87,6 @@ const tsOnlyRestrictedSyntax = [
|
|
|
86
87
|
...noRecordLiteralTypesConfigs,
|
|
87
88
|
...noInlineUnionTypesConfigs,
|
|
88
89
|
allRules.noTypeAssertionsConfig,
|
|
89
|
-
allRules.noClassPropertyDefaultsConfig,
|
|
90
90
|
{
|
|
91
91
|
selector: 'TSAsExpression:has(> TSIndexedAccessType > TSTypeQuery)',
|
|
92
92
|
message:
|
|
@@ -108,8 +108,22 @@ const config = defineConfig([
|
|
|
108
108
|
},
|
|
109
109
|
reactHooks.configs['recommended-latest'],
|
|
110
110
|
js.configs.recommended,
|
|
111
|
-
...tseslint.configs.
|
|
111
|
+
...tseslint.configs.strictTypeChecked,
|
|
112
|
+
...tseslint.configs.stylisticTypeChecked,
|
|
113
|
+
{
|
|
114
|
+
files: ['**/*.{ts,tsx}'],
|
|
115
|
+
languageOptions: {
|
|
116
|
+
parserOptions: {
|
|
117
|
+
projectService: true,
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
files: ['**/*.{js,jsx,mjs,cjs}'],
|
|
123
|
+
...tseslint.configs.disableTypeChecked,
|
|
124
|
+
},
|
|
112
125
|
earlyReturn.configs.recommended,
|
|
126
|
+
{ plugins: { 'switch-case': switchCase }, ...switchCase.configs.recommended },
|
|
113
127
|
|
|
114
128
|
// Base plugin strict configs (error, default, guard-clauses)
|
|
115
129
|
...basePluginsConfig,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-agent",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "ESLint configuration package with TypeScript support",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -120,6 +120,7 @@
|
|
|
120
120
|
"eslint-plugin-security": "^3.0.1",
|
|
121
121
|
"eslint-plugin-single-export": "^1.1.2",
|
|
122
122
|
"eslint-plugin-storybook": "^9.1.5",
|
|
123
|
+
"eslint-plugin-switch-case": "^3.0.1",
|
|
123
124
|
"globals": "^16.4.0",
|
|
124
125
|
"typescript-eslint": "^8.40.0"
|
|
125
126
|
}
|
package/rules/index.js
CHANGED
|
@@ -20,7 +20,6 @@ import {
|
|
|
20
20
|
import { noProcessEnvPropertiesConfig } from './no-process-env-properties/index.js'
|
|
21
21
|
import { noTypeAssertionsConfig } from './no-type-assertions/index.js'
|
|
22
22
|
import { noExportSpecifiersConfig } from './no-empty-exports/index.js'
|
|
23
|
-
import { noClassPropertyDefaultsConfig } from './no-class-property-defaults/index.js'
|
|
24
23
|
import { noDefaultClassExportRules } from './no-default-class-export/index.js'
|
|
25
24
|
import { noNullishCoalescingConfig } from './nullish-coalescing/index.js'
|
|
26
25
|
import { switchStatementsReturnTypeConfigs } from './switch-statements-return-type/index.js'
|
|
@@ -46,7 +45,6 @@ const allRules = {
|
|
|
46
45
|
noProcessEnvPropertiesConfig,
|
|
47
46
|
noTypeAssertionsConfig,
|
|
48
47
|
noExportSpecifiersConfig,
|
|
49
|
-
noClassPropertyDefaultsConfig,
|
|
50
48
|
noDefaultClassExportRules,
|
|
51
49
|
noNullishCoalescingConfig,
|
|
52
50
|
switchStatementsReturnTypeConfigs,
|
|
@@ -75,7 +73,6 @@ export {
|
|
|
75
73
|
noProcessEnvPropertiesConfig,
|
|
76
74
|
noTypeAssertionsConfig,
|
|
77
75
|
noExportSpecifiersConfig,
|
|
78
|
-
noClassPropertyDefaultsConfig,
|
|
79
76
|
noDefaultClassExportRules,
|
|
80
77
|
noNullishCoalescingConfig,
|
|
81
78
|
switchStatementsReturnTypeConfigs,
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Rule configuration for no-class-property-defaults
|
|
3
|
-
*
|
|
4
|
-
* This rule disallows class properties from having default values.
|
|
5
|
-
* Forces explicit initialization in constructor or through methods.
|
|
6
|
-
*
|
|
7
|
-
* Examples:
|
|
8
|
-
* - ❌ class User { name = 'default'; }
|
|
9
|
-
* - ❌ class User { count = 0; }
|
|
10
|
-
* - ❌ class User { items = []; }
|
|
11
|
-
* - ✅ class User { name; constructor() { this.name = 'default'; } }
|
|
12
|
-
* - ✅ class User { count; initialize() { this.count = 0; } }
|
|
13
|
-
*
|
|
14
|
-
* @see https://eslint.org/docs/latest/rules/no-restricted-syntax
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
const rule = 'error'
|
|
18
|
-
|
|
19
|
-
const selector = 'PropertyDefinition[value]'
|
|
20
|
-
|
|
21
|
-
const message =
|
|
22
|
-
'Class properties cannot have default values. Initialize properties in the constructor or through methods instead.'
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Export the complete rule configuration for no-restricted-syntax
|
|
26
|
-
* Can be used in ESLint config as part of no-restricted-syntax rules:
|
|
27
|
-
* "no-restricted-syntax": ["error", ...otherRules, noClassPropertyDefaultsConfig]
|
|
28
|
-
*/
|
|
29
|
-
const noClassPropertyDefaultsConfig = {
|
|
30
|
-
selector,
|
|
31
|
-
message,
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
// Consolidated exports
|
|
35
|
-
export { rule, selector, message, noClassPropertyDefaultsConfig }
|
|
36
|
-
|
|
37
|
-
export default noClassPropertyDefaultsConfig
|