eslint-plugin-th-rules 1.20.4 → 1.20.5

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.
@@ -3,16 +3,16 @@ name: Semantic Versioning
3
3
  on:
4
4
  push:
5
5
  branches:
6
- - main # or master, or whichever branch you want this to run on
6
+ - main
7
7
 
8
8
  jobs:
9
9
  release:
10
10
  runs-on: ubuntu-latest
11
11
  permissions:
12
- contents: write # to be able to publish a GitHub release
13
- issues: write # to be able to comment on released issues
14
- pull-requests: write # to be able to comment on released pull requests
15
- id-token: write # to enable use of OIDC for npm provenance
12
+ contents: write
13
+ issues: write
14
+ pull-requests: write
15
+ id-token: write
16
16
 
17
17
  steps:
18
18
  - name: Checkout
@@ -20,15 +20,18 @@ jobs:
20
20
 
21
21
  - name: Setup Bun
22
22
  uses: oven-sh/setup-bun@v1
23
-
24
- - name: Install Dependencies
25
- run: bun i --dev
26
23
 
27
24
  - name: Setup Node.js environment
28
- uses: actions/setup-node@v4.0.2
25
+ uses: actions/setup-node@v4
29
26
  with:
30
- node-version: "20.x"
31
-
27
+ node-version: "22.x"
28
+
29
+ - name: Install Dependencies
30
+ run: bun install --dev
31
+
32
+ - name: Verify ESLint flat configs
33
+ run: node ./scripts/verify.mjs
34
+
32
35
  - name: Semantic Release
33
36
  run: bunx semantic-release
34
37
  env:
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [1.20.5](https://github.com/tomerh2001/eslint-plugin-th-rules/compare/v1.20.4...v1.20.5) (2026-01-06)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * update GitHub Actions workflow and add ESLint verification script ([9e3c40e](https://github.com/tomerh2001/eslint-plugin-th-rules/commit/9e3c40ee1c5500589e5463d997c832165666e6f6))
7
+
1
8
  ## [1.20.4](https://github.com/tomerh2001/eslint-plugin-th-rules/compare/v1.20.3...v1.20.4) (2026-01-06)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-th-rules",
3
- "version": "1.20.4",
3
+ "version": "1.20.5",
4
4
  "description": "A List of custom ESLint rules created by Tomer Horowitz",
5
5
  "keywords": [
6
6
  "eslint",
@@ -19,15 +19,20 @@
19
19
  },
20
20
  "dependencies": {
21
21
  "@babel/eslint-parser": "^7.28.5",
22
+ "@eslint/eslintrc": "^3.3.3",
22
23
  "eslint-config-jsdoc": "^15.4.0",
23
24
  "eslint-config-xo": "^0.49.0",
24
25
  "eslint-config-xo-react": "^0.29.0",
26
+ "eslint-plugin-import": "^2.32.0",
25
27
  "eslint-plugin-jsdoc": "^61.5.0",
28
+ "eslint-plugin-n": "^17.23.1",
26
29
  "eslint-plugin-react": "^7.37.5",
27
30
  "eslint-plugin-react-hooks": "^7.0.1",
28
31
  "eslint-plugin-react-native": "^5.0.0",
29
32
  "eslint-plugin-security": "^3.0.1",
30
33
  "eslint-plugin-sonarjs": "^3.0.5",
34
+ "eslint-plugin-unicorn": "^62.0.0",
35
+ "globals": "^17.0.0",
31
36
  "requireindex": "^1.2.0"
32
37
  },
33
38
  "devDependencies": {
@@ -48,9 +53,7 @@
48
53
  "eslint-doc-generator": "^3.0.2",
49
54
  "eslint-plugin-eslint-plugin": "^7.2.0",
50
55
  "eslint-plugin-node": "^11.1.0",
51
- "eslint-plugin-sonarjs": "^3.0.5",
52
56
  "eslint-plugin-th-rules": "1.19.3",
53
- "eslint-plugin-unicorn": "^62.0.0",
54
57
  "mocha": "^11.7.5",
55
58
  "npm-run-all": "^4.1.5",
56
59
  "typescript": "^5.9.3",
@@ -0,0 +1,16 @@
1
+ import {ESLint} from 'eslint';
2
+ import thRules from '../src/index.js';
3
+
4
+ const run = async (name, config) => {
5
+ const eslint = new ESLint({
6
+ overrideConfigFile: true,
7
+ overrideConfig: config,
8
+ });
9
+
10
+ const results = await eslint.lintText('const x = 1;\n', {filePath: 'fixtures/test.js'});
11
+ console.log(`OK: ${name} (${results[0].messages.length} messages)`);
12
+ };
13
+
14
+ await run('recommended', thRules.configs.recommended);
15
+ await run('recommended-typescript', thRules.configs['recommended-typescript']);
16
+ await run('recommended-react', thRules.configs['recommended-react']);
package/src/index.js CHANGED
@@ -69,7 +69,6 @@ const baseRecommended = {
69
69
  'th-rules/schemas-in-schemas-file': 'error',
70
70
  'th-rules/types-in-dts': 'error',
71
71
 
72
- 'unicorn/prefer-module': 'warn',
73
72
  'unicorn/filename-case': 'off',
74
73
  'unicorn/no-array-callback-reference': 'off',
75
74
  'import/extensions': 'off',