eslint-plugin-th-rules 1.20.5 → 1.21.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 +14 -0
- package/package.json +2 -1
- package/src/index.js +4 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [1.21.0](https://github.com/tomerh2001/eslint-plugin-th-rules/compare/v1.20.6...v1.21.0) (2026-01-07)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add eslint-plugin-lodash as a dependency and integrate it into the configuration ([6d32f3d](https://github.com/tomerh2001/eslint-plugin-th-rules/commit/6d32f3d3dde6dab55cfcd13a7c85146c61eaf522))
|
|
7
|
+
|
|
8
|
+
## [1.20.6](https://github.com/tomerh2001/eslint-plugin-th-rules/compare/v1.20.5...v1.20.6) (2026-01-06)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* remove unused eslint-disable comments and plugins from index.js ([9303787](https://github.com/tomerh2001/eslint-plugin-th-rules/commit/930378752cdd44442eda4c020c1d325769aad562))
|
|
14
|
+
|
|
1
15
|
## [1.20.5](https://github.com/tomerh2001/eslint-plugin-th-rules/compare/v1.20.4...v1.20.5) (2026-01-06)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-th-rules",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.21.0",
|
|
4
4
|
"description": "A List of custom ESLint rules created by Tomer Horowitz",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"eslint-config-xo-react": "^0.29.0",
|
|
26
26
|
"eslint-plugin-import": "^2.32.0",
|
|
27
27
|
"eslint-plugin-jsdoc": "^61.5.0",
|
|
28
|
+
"eslint-plugin-lodash": "^8.0.0",
|
|
28
29
|
"eslint-plugin-n": "^17.23.1",
|
|
29
30
|
"eslint-plugin-react": "^7.37.5",
|
|
30
31
|
"eslint-plugin-react-hooks": "^7.0.1",
|
package/src/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/* eslint-disable import-x/order */
|
|
2
|
-
/* eslint-disable import-x/no-extraneous-dependencies */
|
|
3
2
|
/* eslint-disable n/no-path-concat */
|
|
4
3
|
/* eslint-disable unicorn/prefer-module */
|
|
5
4
|
|
|
@@ -11,10 +10,8 @@ const {FlatCompat} = require('@eslint/eslintrc');
|
|
|
11
10
|
const reactPlugin = require('eslint-plugin-react');
|
|
12
11
|
const reactHooks = require('eslint-plugin-react-hooks');
|
|
13
12
|
const tseslint = require('typescript-eslint');
|
|
13
|
+
const lodashPlugin = require('eslint-plugin-lodash');
|
|
14
14
|
|
|
15
|
-
// Plugins referenced by rule names in this config
|
|
16
|
-
const unicornPlugin = require('eslint-plugin-unicorn');
|
|
17
|
-
const importPlugin = require('eslint-plugin-import');
|
|
18
15
|
const nPlugin = require('eslint-plugin-n');
|
|
19
16
|
const sonarjsPlugin = require('eslint-plugin-sonarjs');
|
|
20
17
|
const securityPlugin = require('eslint-plugin-security');
|
|
@@ -39,11 +36,10 @@ const baseRecommended = {
|
|
|
39
36
|
'th-rules': plugin,
|
|
40
37
|
|
|
41
38
|
// Third-party plugins used by rule names below
|
|
42
|
-
unicorn: unicornPlugin,
|
|
43
|
-
import: importPlugin,
|
|
44
39
|
n: nPlugin,
|
|
45
40
|
sonarjs: sonarjsPlugin,
|
|
46
41
|
security: securityPlugin,
|
|
42
|
+
lodash: lodashPlugin,
|
|
47
43
|
|
|
48
44
|
// Included so consumers can use react/react-hooks rules as well
|
|
49
45
|
react: reactPlugin,
|
|
@@ -60,6 +56,7 @@ const baseRecommended = {
|
|
|
60
56
|
},
|
|
61
57
|
settings: {
|
|
62
58
|
react: {version: 'detect'},
|
|
59
|
+
lodash: {version: 4, pragma: '_'},
|
|
63
60
|
},
|
|
64
61
|
rules: {
|
|
65
62
|
'th-rules/no-destructuring': 'error',
|
|
@@ -91,7 +88,7 @@ const baseRecommended = {
|
|
|
91
88
|
/** @type {import('eslint').Linter.FlatConfig[]} */
|
|
92
89
|
plugin.configs.recommended = flatConfigs(
|
|
93
90
|
// Legacy configs -> convert them
|
|
94
|
-
compat.extends('plugin:sonarjs/recommended-legacy', 'plugin:security/recommended-legacy'),
|
|
91
|
+
compat.extends('plugin:sonarjs/recommended-legacy', 'plugin:security/recommended-legacy', 'plugin:lodash/recommended'),
|
|
95
92
|
baseRecommended,
|
|
96
93
|
);
|
|
97
94
|
|