eslint-plugin-th-rules 1.5.1 → 1.5.2
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 +7 -0
- package/bun.lockb +0 -0
- package/package.json +1 -1
- package/src/index.js +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.5.2](https://github.com/tomerh2001/eslint-plugin-th-rules/compare/v1.5.1...v1.5.2) (2024-02-26)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* Update environment configuration in index.js ([277871c](https://github.com/tomerh2001/eslint-plugin-th-rules/commit/277871cc4ff71659fa1e476fd463c39893878797))
|
|
7
|
+
|
|
1
8
|
## [1.5.1](https://github.com/tomerh2001/eslint-plugin-th-rules/compare/v1.5.0...v1.5.1) (2024-02-26)
|
|
2
9
|
|
|
3
10
|
|
package/bun.lockb
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -15,7 +15,7 @@ const requireIndex = require('requireindex');
|
|
|
15
15
|
* @property {string[]} plugins - The list of plugins.
|
|
16
16
|
* @property {string[]} extends - The list of extended configurations.
|
|
17
17
|
* @property {Object} rules - The rules configuration.
|
|
18
|
-
* @property {Object}
|
|
18
|
+
* @property {Object} env - The environment configuration.
|
|
19
19
|
*/
|
|
20
20
|
const basic = {
|
|
21
21
|
plugins: ['th-rules'],
|
|
@@ -24,7 +24,7 @@ const basic = {
|
|
|
24
24
|
'th-rules/no-destructuring': 'error',
|
|
25
25
|
'th-rules/no-default-export': 'error',
|
|
26
26
|
},
|
|
27
|
-
|
|
27
|
+
env: {},
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
/**
|
|
@@ -33,7 +33,7 @@ const basic = {
|
|
|
33
33
|
*/
|
|
34
34
|
const recommended = {
|
|
35
35
|
...basic,
|
|
36
|
-
|
|
36
|
+
env: {
|
|
37
37
|
node: true,
|
|
38
38
|
ES2024: true,
|
|
39
39
|
jest: true,
|
|
@@ -60,15 +60,15 @@ const all = {
|
|
|
60
60
|
/**
|
|
61
61
|
* Represents an object containing all React-related configurations.
|
|
62
62
|
* @typedef {Object} allReact
|
|
63
|
-
* @property {Object}
|
|
64
|
-
* @property {boolean}
|
|
63
|
+
* @property {Object} env - The environment configurations.
|
|
64
|
+
* @property {boolean} env.browser - Indicates if the browser environment is enabled.
|
|
65
65
|
* @property {Object} rules - The rule configurations.
|
|
66
66
|
* @property {string} rules['react/no-array-index-key'] - The configuration for the 'react/no-array-index-key' rule.
|
|
67
67
|
* @property {string[]} extends - The list of extended configurations.
|
|
68
68
|
*/
|
|
69
69
|
const allReact = {
|
|
70
70
|
...all,
|
|
71
|
-
|
|
71
|
+
env: {...all.env, node: false, browser: true},
|
|
72
72
|
rules: {...all.rules, 'react/no-array-index-key': 'off'},
|
|
73
73
|
extends: [...all.extends, 'xo-react'],
|
|
74
74
|
};
|