eslint-plugin-th-rules 1.18.0 β†’ 1.19.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 CHANGED
@@ -1,3 +1,10 @@
1
+ # [1.19.0](https://github.com/tomerh2001/eslint-plugin-th-rules/compare/v1.18.0...v1.19.0) (2026-01-05)
2
+
3
+
4
+ ### Features
5
+
6
+ * Added force for jsdoc in recommended configs ([6729b7a](https://github.com/tomerh2001/eslint-plugin-th-rules/commit/6729b7a4804f8a63356aff9e2ceef57119b7075d))
7
+
1
8
  # [1.18.0](https://github.com/tomerh2001/eslint-plugin-th-rules/compare/v1.17.1...v1.18.0) (2026-01-05)
2
9
 
3
10
 
package/README.md CHANGED
@@ -12,17 +12,19 @@ This repository contains custom ESLint rules to enhance code quality and consist
12
12
 
13
13
  πŸ’Ό Configurations enabled in.\
14
14
  βœ… Set in the `recommended` configuration.\
15
+ βš›οΈ Set in the `recommended-react` configuration.\
16
+ 🟦 Set in the `recommended-typescript` configuration.\
15
17
  πŸ”§ Automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/user-guide/command-line-interface#--fix).
16
18
 
17
- | NameΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  | Description | πŸ’Ό | πŸ”§ |
18
- | :--------------------------------------------------------------- | :------------------------------------------------------------------------------------- | :--------------------------------------------------------------- | :- |
19
- | [no-comments](docs/rules/no-comments.md) | Disallow comments except for specified allowed patterns. | βœ… ![badge-recommended-react][] ![badge-recommended-typescript][] | πŸ”§ |
20
- | [no-default-export](docs/rules/no-default-export.md) | Convert unnamed default exports to named default exports based on the file name. | βœ… ![badge-recommended-react][] ![badge-recommended-typescript][] | πŸ”§ |
21
- | [no-destructuring](docs/rules/no-destructuring.md) | Disallow destructuring that does not meet certain conditions | βœ… ![badge-recommended-react][] ![badge-recommended-typescript][] | |
22
- | [schemas-in-schemas-file](docs/rules/schemas-in-schemas-file.md) | Require Zod schema declarations to be placed in a .schemas.ts file | βœ… ![badge-recommended-react][] ![badge-recommended-typescript][] | |
23
- | [styles-in-styles-file](docs/rules/styles-in-styles-file.md) | Require React-Native StyleSheet.create(...) to be placed in a .styles.ts file | βœ… ![badge-recommended-react][] ![badge-recommended-typescript][] | |
24
- | [top-level-functions](docs/rules/top-level-functions.md) | Require all top-level functions to be named/regular functions. | βœ… ![badge-recommended-react][] ![badge-recommended-typescript][] | πŸ”§ |
25
- | [types-in-dts](docs/rules/types-in-dts.md) | Require TypeScript type declarations (type/interface/enum) to be placed in .d.ts files | βœ… ![badge-recommended-react][] ![badge-recommended-typescript][] | |
19
+ | NameΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β  | Description | πŸ’Ό | πŸ”§ |
20
+ | :--------------------------------------------------------------- | :------------------------------------------------------------------------------------- | :------ | :- |
21
+ | [no-comments](docs/rules/no-comments.md) | Disallow comments except for specified allowed patterns. | βœ… βš›οΈ 🟦 | πŸ”§ |
22
+ | [no-default-export](docs/rules/no-default-export.md) | Convert unnamed default exports to named default exports based on the file name. | βœ… βš›οΈ 🟦 | πŸ”§ |
23
+ | [no-destructuring](docs/rules/no-destructuring.md) | Disallow destructuring that does not meet certain conditions | βœ… βš›οΈ 🟦 | |
24
+ | [schemas-in-schemas-file](docs/rules/schemas-in-schemas-file.md) | Require Zod schema declarations to be placed in a .schemas.ts file | βœ… βš›οΈ 🟦 | |
25
+ | [styles-in-styles-file](docs/rules/styles-in-styles-file.md) | Require React-Native StyleSheet.create(...) to be placed in a .styles.ts file | βœ… βš›οΈ 🟦 | |
26
+ | [top-level-functions](docs/rules/top-level-functions.md) | Require all top-level functions to be named/regular functions. | βœ… βš›οΈ 🟦 | πŸ”§ |
27
+ | [types-in-dts](docs/rules/types-in-dts.md) | Require TypeScript type declarations (type/interface/enum) to be placed in .d.ts files | βœ… βš›οΈ 🟦 | |
26
28
 
27
29
  <!-- end auto-generated rules list -->
28
30
 
@@ -1,6 +1,8 @@
1
- # Disallow comments except for specified allowed patterns (`th-rules/no-comments`)
1
+ # th-rules/no-comments
2
2
 
3
- πŸ’Ό This rule is enabled in the following configs: βœ… `recommended`, `recommended-react`, `recommended-typescript`.
3
+ πŸ“ Disallow comments except for specified allowed patterns.
4
+
5
+ πŸ’Ό This rule is enabled in the following configs: βœ… `recommended`, βš›οΈ `recommended-react`, 🟦 `recommended-typescript`.
4
6
 
5
7
  πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
6
8
 
@@ -1,6 +1,8 @@
1
- # Convert unnamed default exports to named default exports based on the file name (`th-rules/no-default-export`)
1
+ # th-rules/no-default-export
2
2
 
3
- πŸ’Ό This rule is enabled in the following configs: βœ… `recommended`, `recommended-react`, `recommended-typescript`.
3
+ πŸ“ Convert unnamed default exports to named default exports based on the file name.
4
+
5
+ πŸ’Ό This rule is enabled in the following configs: βœ… `recommended`, βš›οΈ `recommended-react`, 🟦 `recommended-typescript`.
4
6
 
5
7
  πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
6
8
 
@@ -1,6 +1,8 @@
1
- # Disallow destructuring that does not meet certain conditions (`th-rules/no-destructuring`)
1
+ # th-rules/no-destructuring
2
2
 
3
- πŸ’Ό This rule is enabled in the following configs: βœ… `recommended`, `recommended-react`, `recommended-typescript`.
3
+ πŸ“ Disallow destructuring that does not meet certain conditions.
4
+
5
+ πŸ’Ό This rule is enabled in the following configs: βœ… `recommended`, βš›οΈ `recommended-react`, 🟦 `recommended-typescript`.
4
6
 
5
7
  <!-- end auto-generated rule header -->
6
8
 
@@ -1,6 +1,8 @@
1
- # Require Zod schema declarations to be placed in a .schemas.ts file (`th-rules/schemas-in-schemas-file`)
1
+ # th-rules/schemas-in-schemas-file
2
2
 
3
- πŸ’Ό This rule is enabled in the following configs: βœ… `recommended`, `recommended-react`, `recommended-typescript`.
3
+ πŸ“ Require Zod schema declarations to be placed in a .schemas.ts file.
4
+
5
+ πŸ’Ό This rule is enabled in the following configs: βœ… `recommended`, βš›οΈ `recommended-react`, 🟦 `recommended-typescript`.
4
6
 
5
7
  <!-- end auto-generated rule header -->
6
8
 
@@ -1,6 +1,8 @@
1
- # Require React-Native StyleSheet.create(...) to be placed in a .styles.ts file (`th-rules/styles-in-styles-file`)
1
+ # th-rules/styles-in-styles-file
2
2
 
3
- πŸ’Ό This rule is enabled in the following configs: βœ… `recommended`, `recommended-react`, `recommended-typescript`.
3
+ πŸ“ Require React-Native StyleSheet.create(...) to be placed in a .styles.ts file.
4
+
5
+ πŸ’Ό This rule is enabled in the following configs: βœ… `recommended`, βš›οΈ `recommended-react`, 🟦 `recommended-typescript`.
4
6
 
5
7
  <!-- end auto-generated rule header -->
6
8
 
@@ -1,6 +1,8 @@
1
- # Require all top-level functions to be named/regular functions (`th-rules/top-level-functions`)
1
+ # th-rules/top-level-functions
2
2
 
3
- πŸ’Ό This rule is enabled in the following configs: βœ… `recommended`, `recommended-react`, `recommended-typescript`.
3
+ πŸ“ Require all top-level functions to be named/regular functions.
4
+
5
+ πŸ’Ό This rule is enabled in the following configs: βœ… `recommended`, βš›οΈ `recommended-react`, 🟦 `recommended-typescript`.
4
6
 
5
7
  πŸ”§ This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
6
8
 
@@ -1,6 +1,8 @@
1
- # Require TypeScript type declarations (type/interface/enum) to be placed in .d.ts files (`th-rules/types-in-dts`)
1
+ # th-rules/types-in-dts
2
2
 
3
- πŸ’Ό This rule is enabled in the following configs: βœ… `recommended`, `recommended-react`, `recommended-typescript`.
3
+ πŸ“ Require TypeScript type declarations (type/interface/enum) to be placed in .d.ts files.
4
+
5
+ πŸ’Ό This rule is enabled in the following configs: βœ… `recommended`, βš›οΈ `recommended-react`, 🟦 `recommended-typescript`.
4
6
 
5
7
  <!-- end auto-generated rule header -->
6
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-th-rules",
3
- "version": "1.18.0",
3
+ "version": "1.19.0",
4
4
  "description": "A List of custom ESLint rules created by Tomer Horowitz",
5
5
  "keywords": [
6
6
  "eslint",
@@ -15,46 +15,46 @@
15
15
  "lint:eslint-docs": "npm-run-all \"update:eslint-docs -- --check\"",
16
16
  "lint:js": "eslint .",
17
17
  "test": "xo && mocha tests --recursive",
18
- "update:eslint-docs": "eslint-doc-generator"
18
+ "update:eslint-docs": "eslint-doc-generator --config-emoji \"recommended,βœ…\" --config-emoji \"recommended-react,βš›οΈ\" --config-emoji \"recommended-typescript,🟦\""
19
19
  },
20
20
  "dependencies": {
21
- "@babel/eslint-parser": "^7.25.9",
21
+ "@babel/eslint-parser": "^7.28.5",
22
22
  "eslint-config-jsdoc": "^15.4.0",
23
- "eslint-config-xo": "^0.46.0",
24
- "eslint-config-xo-react": "^0.27.0",
25
- "eslint-plugin-jsdoc": "^50.6.1",
26
- "eslint-plugin-react": "^7.37.3",
27
- "eslint-plugin-react-hooks": "^5.1.0",
23
+ "eslint-config-xo": "^0.49.0",
24
+ "eslint-config-xo-react": "^0.29.0",
25
+ "eslint-plugin-jsdoc": "^61.5.0",
26
+ "eslint-plugin-react": "^7.37.5",
27
+ "eslint-plugin-react-hooks": "^7.0.1",
28
28
  "eslint-plugin-react-native": "^5.0.0",
29
29
  "eslint-plugin-security": "^3.0.1",
30
- "eslint-plugin-sonarjs": "^3.0.1",
30
+ "eslint-plugin-sonarjs": "^3.0.5",
31
31
  "requireindex": "^1.2.0"
32
32
  },
33
33
  "devDependencies": {
34
- "@codedependant/semantic-release-docker": "^5.1.0",
35
- "@eslint/js": "^9.17.0",
34
+ "@codedependant/semantic-release-docker": "^5.1.1",
35
+ "@eslint/js": "^9.39.2",
36
36
  "@semantic-release/changelog": "^6.0.3",
37
- "@semantic-release/commit-analyzer": "^13.0.0",
37
+ "@semantic-release/commit-analyzer": "^13.0.1",
38
38
  "@semantic-release/git": "^10.0.1",
39
- "@semantic-release/github": "^11.0.1",
40
- "@semantic-release/npm": "^12.0.1",
39
+ "@semantic-release/github": "^12.0.2",
40
+ "@semantic-release/npm": "^13.1.3",
41
41
  "@semantic-release/release-notes-generator": "^14.0.2",
42
42
  "@types/eslint-plugin-security": "^3.0.0",
43
- "@types/eslint__js": "^8.42.3",
43
+ "@types/eslint__js": "^9.14.0",
44
44
  "@types/requireindex": "^1.2.4",
45
45
  "@types/xo": "^0.39.9",
46
46
  "bun-types": "latest",
47
47
  "eslint": "^9.17.0",
48
- "eslint-doc-generator": "^2.0.2",
49
- "eslint-plugin-eslint-plugin": "^6.4.0",
48
+ "eslint-doc-generator": "^3.0.2",
49
+ "eslint-plugin-eslint-plugin": "^7.2.0",
50
50
  "eslint-plugin-node": "^11.1.0",
51
- "eslint-plugin-sonarjs": "^3.0.1",
52
- "eslint-plugin-th-rules": "1.15.6",
53
- "eslint-plugin-unicorn": "^56.0.1",
54
- "mocha": "^11.0.1",
51
+ "eslint-plugin-sonarjs": "^3.0.5",
52
+ "eslint-plugin-th-rules": "1.18.0",
53
+ "eslint-plugin-unicorn": "^62.0.0",
54
+ "mocha": "^11.7.5",
55
55
  "npm-run-all": "^4.1.5",
56
- "typescript": "^5.7.2",
57
- "typescript-eslint": "^8.19.0",
56
+ "typescript": "^5.9.3",
57
+ "typescript-eslint": "^8.51.0",
58
58
  "xo": "^0.60.0"
59
59
  },
60
60
  "peerDependencies": {
package/src/index.js CHANGED
@@ -9,10 +9,12 @@ const configs = {
9
9
  plugins: [
10
10
  'th-rules',
11
11
  'sonarjs',
12
+ 'jsdoc',
12
13
  ],
13
14
  extends: [
14
15
  'plugin:sonarjs/recommended-legacy',
15
16
  'plugin:security/recommended-legacy',
17
+ 'plugin:jsdoc/recommended',
16
18
  ],
17
19
  rules: {
18
20
  'th-rules/no-destructuring': 'error',
@@ -22,6 +24,7 @@ const configs = {
22
24
  'th-rules/styles-in-styles-file': 'error',
23
25
  'th-rules/schemas-in-schemas-file': 'error',
24
26
  'th-rules/types-in-dts': 'error',
27
+
25
28
  'unicorn/prefer-module': 'warn',
26
29
  'unicorn/filename-case': 'off',
27
30
  'unicorn/no-array-callback-reference': 'off',
@@ -53,7 +56,10 @@ for (const configName of Object.keys(configs)) {
53
56
  extends: [
54
57
  'plugin:@typescript-eslint/strict-type-checked',
55
58
  'plugin:@typescript-eslint/stylistic-type-checked',
56
- ...configs[configName].extends,
59
+
60
+ ...configs[configName].extends
61
+ .filter(x => x !== 'plugin:jsdoc/recommended'),
62
+ 'plugin:jsdoc/recommended-typescript',
57
63
  ],
58
64
  rules: {
59
65
  ...configs[configName].rules,
@@ -69,13 +75,13 @@ for (const configName of Object.keys(configs)) {
69
75
  '@typescript-eslint/no-unsafe-argument': 'off',
70
76
  },
71
77
  };
78
+
72
79
  configs[`${configName}-react`] = {
73
80
  ...configs[configName],
74
81
  extends: [
75
82
  'plugin:react/recommended',
76
83
  'plugin:react-hooks/recommended',
77
84
  ...configs[configName].extends,
78
-
79
85
  ],
80
86
  rules: {
81
87
  ...configs[configName].rules,
@@ -22,7 +22,7 @@ const meta = {
22
22
  ],
23
23
  messages: {
24
24
  moveToDts:
25
- 'Type declarations must be moved to a .d.ts file.',
25
+ 'Type declarations must be defined in a a .d.ts file.',
26
26
  },
27
27
  };
28
28
 
package/bun.lockb DELETED
Binary file