eslint-plugin-th-rules 1.4.0 → 1.4.1
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/README.md +3 -3
- package/bun.lockb +0 -0
- package/lib/index.js +12 -7
- package/lib/rules/{no-unamed-default-export.js → no-default-export.js} +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [1.4.1](https://github.com/tomerh2001/eslint-plugin-th-rules/compare/v1.4.0...v1.4.1) (2024-02-26)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* fixed a bug with the no-default-export auto fix ([fabd4bd](https://github.com/tomerh2001/eslint-plugin-th-rules/commit/fabd4bdc51d7290baf6807e8255acdfd90e81f03))
|
|
7
|
+
|
|
1
8
|
# [1.4.0](https://github.com/tomerh2001/eslint-plugin-th-rules/compare/v1.3.2...v1.4.0) (2024-02-23)
|
|
2
9
|
|
|
3
10
|
|
package/README.md
CHANGED
|
@@ -51,7 +51,7 @@ This rule checks for:
|
|
|
51
51
|
|
|
52
52
|
### 2. Name-Export Rule
|
|
53
53
|
|
|
54
|
-
**Rule ID:** `eslint-plugin-th-rules/no-
|
|
54
|
+
**Rule ID:** `eslint-plugin-th-rules/no-default-export`
|
|
55
55
|
|
|
56
56
|
#### Description
|
|
57
57
|
|
|
@@ -65,7 +65,7 @@ This rule targets unnamed default exports and automatically generates a named ex
|
|
|
65
65
|
```json
|
|
66
66
|
{
|
|
67
67
|
"rules": {
|
|
68
|
-
"eslint-plugin-th-rules/no-
|
|
68
|
+
"eslint-plugin-th-rules/no-default-export": "error"
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
71
|
```
|
|
@@ -78,7 +78,7 @@ This rule targets unnamed default exports and automatically generates a named ex
|
|
|
78
78
|
],
|
|
79
79
|
"rules": {
|
|
80
80
|
"eslint-plugin-th-rules/no-destructuring": "error",
|
|
81
|
-
"eslint-plugin-th-rules/no-
|
|
81
|
+
"eslint-plugin-th-rules/no-default-export": "error"
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
```
|
package/bun.lockb
CHANGED
|
Binary file
|
package/lib/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/* eslint-disable n/no-path-concat */
|
|
2
|
+
/* eslint-disable unicorn/prefer-module */
|
|
3
|
+
|
|
1
4
|
/**
|
|
2
5
|
* @fileoverview A List of custom ESLint rules created by Tomer Horowitz
|
|
3
6
|
* @author Tomer Horowitz
|
|
@@ -15,13 +18,15 @@ const requireIndex = require('requireindex');
|
|
|
15
18
|
//------------------------------------------------------------------------------
|
|
16
19
|
|
|
17
20
|
// import all rules in lib/rules
|
|
18
|
-
module.exports
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
module.exports = {
|
|
22
|
+
rules: requireIndex(`${__dirname}/rules`),
|
|
23
|
+
configs: {
|
|
24
|
+
all: {
|
|
25
|
+
plugins: ['th-rules'],
|
|
26
|
+
rules: {
|
|
27
|
+
'th-rules/no-destructuring': 'error',
|
|
28
|
+
'th-rules/no-default-export': 'error',
|
|
29
|
+
},
|
|
25
30
|
},
|
|
26
31
|
},
|
|
27
32
|
};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/* eslint-disable unicorn/prefer-module */
|
|
2
|
+
|
|
1
3
|
const path = require('node:path');
|
|
2
4
|
|
|
3
5
|
const meta = {
|
|
@@ -22,9 +24,7 @@ function create(context) {
|
|
|
22
24
|
|
|
23
25
|
return match.toUpperCase();
|
|
24
26
|
})
|
|
25
|
-
.replaceAll(/[-_]/g, '')
|
|
26
|
-
.replaceAll('<', '')
|
|
27
|
-
.replaceAll('>', '');
|
|
27
|
+
.replaceAll(/[-_<>\\. ]/g, '');
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
return {
|