eslint-plugin-th-rules 1.20.6 → 2.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 +19 -0
- package/package.json +2 -1
- package/src/index.js +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
# [2.0.0](https://github.com/tomerh2001/eslint-plugin-th-rules/compare/v1.21.0...v2.0.0) (2026-01-07)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* moved to flat ESLint config ([4b8df27](https://github.com/tomerh2001/eslint-plugin-th-rules/commit/4b8df27d291afad906e2527c96b707c2703c64a3))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### BREAKING CHANGES
|
|
10
|
+
|
|
11
|
+
* moved to flat ESLint config
|
|
12
|
+
|
|
13
|
+
# [1.21.0](https://github.com/tomerh2001/eslint-plugin-th-rules/compare/v1.20.6...v1.21.0) (2026-01-07)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* add eslint-plugin-lodash as a dependency and integrate it into the configuration ([6d32f3d](https://github.com/tomerh2001/eslint-plugin-th-rules/commit/6d32f3d3dde6dab55cfcd13a7c85146c61eaf522))
|
|
19
|
+
|
|
1
20
|
## [1.20.6](https://github.com/tomerh2001/eslint-plugin-th-rules/compare/v1.20.5...v1.20.6) (2026-01-06)
|
|
2
21
|
|
|
3
22
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-th-rules",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.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
|
@@ -10,6 +10,7 @@ const {FlatCompat} = require('@eslint/eslintrc');
|
|
|
10
10
|
const reactPlugin = require('eslint-plugin-react');
|
|
11
11
|
const reactHooks = require('eslint-plugin-react-hooks');
|
|
12
12
|
const tseslint = require('typescript-eslint');
|
|
13
|
+
const lodashPlugin = require('eslint-plugin-lodash');
|
|
13
14
|
|
|
14
15
|
const nPlugin = require('eslint-plugin-n');
|
|
15
16
|
const sonarjsPlugin = require('eslint-plugin-sonarjs');
|
|
@@ -38,6 +39,7 @@ const baseRecommended = {
|
|
|
38
39
|
n: nPlugin,
|
|
39
40
|
sonarjs: sonarjsPlugin,
|
|
40
41
|
security: securityPlugin,
|
|
42
|
+
lodash: lodashPlugin,
|
|
41
43
|
|
|
42
44
|
// Included so consumers can use react/react-hooks rules as well
|
|
43
45
|
react: reactPlugin,
|
|
@@ -54,6 +56,7 @@ const baseRecommended = {
|
|
|
54
56
|
},
|
|
55
57
|
settings: {
|
|
56
58
|
react: {version: 'detect'},
|
|
59
|
+
lodash: {version: 4, pragma: '_'},
|
|
57
60
|
},
|
|
58
61
|
rules: {
|
|
59
62
|
'th-rules/no-destructuring': 'error',
|
|
@@ -85,7 +88,7 @@ const baseRecommended = {
|
|
|
85
88
|
/** @type {import('eslint').Linter.FlatConfig[]} */
|
|
86
89
|
plugin.configs.recommended = flatConfigs(
|
|
87
90
|
// Legacy configs -> convert them
|
|
88
|
-
compat.extends('plugin:sonarjs/recommended-legacy', 'plugin:security/recommended-legacy'),
|
|
91
|
+
compat.extends('plugin:sonarjs/recommended-legacy', 'plugin:security/recommended-legacy', 'plugin:lodash/recommended'),
|
|
89
92
|
baseRecommended,
|
|
90
93
|
);
|
|
91
94
|
|