@foray1010/eslint-config 9.0.1 → 9.1.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 +13 -0
- package/package.json +3 -3
- package/presets/base.cjs +12 -0
- package/presets/react.cjs +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,19 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [9.1.0](https://github.com/foray1010/common-presets/compare/@foray1010/eslint-config@9.0.1...@foray1010/eslint-config@9.1.0) (2022-12-21)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **eslint-config:** make sure private class members are in-use ([8d01342](https://github.com/foray1010/common-presets/commit/8d01342664696ab6bff9cc2f703bc53a81995ed5))
|
|
11
|
+
- **eslint-config:** prefer `const` when the variable won't be reassigned ([e6b18a1](https://github.com/foray1010/common-presets/commit/e6b18a1dcc023ea346d96288f4c709b77578b2af))
|
|
12
|
+
- **eslint-config:** prefer explicitly convert type for readability ([2b5f647](https://github.com/foray1010/common-presets/commit/2b5f64740415361173f0ca16a91c2714af72ed02))
|
|
13
|
+
- **eslint-config:** require button type to avoid unexpected form submits ([891ff50](https://github.com/foray1010/common-presets/commit/891ff506217da96accd030fbbbea680569f4573b))
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
- **deps:** update dependency eslint-plugin-unicorn to v45 ([cde868a](https://github.com/foray1010/common-presets/commit/cde868a7c95aaa4dad3acedb07a763ccc64582c9))
|
|
18
|
+
|
|
6
19
|
## [9.0.1](https://github.com/foray1010/common-presets/compare/@foray1010/eslint-config@9.0.0...@foray1010/eslint-config@9.0.1) (2022-11-07)
|
|
7
20
|
|
|
8
21
|
### Reverts
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package",
|
|
3
3
|
"name": "@foray1010/eslint-config",
|
|
4
|
-
"version": "9.0
|
|
4
|
+
"version": "9.1.0",
|
|
5
5
|
"homepage": "https://github.com/foray1010/common-presets/tree/master/packages/eslint-config#readme",
|
|
6
6
|
"bugs": "https://github.com/foray1010/common-presets/issues",
|
|
7
7
|
"repository": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"eslint-plugin-react-hooks": "^4.2.0",
|
|
44
44
|
"eslint-plugin-simple-import-sort": "^8.0.0",
|
|
45
45
|
"eslint-plugin-testing-library": "^5.9.1",
|
|
46
|
-
"eslint-plugin-unicorn": "^
|
|
46
|
+
"eslint-plugin-unicorn": "^45.0.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/confusing-browser-globals": "1.0.0",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"publishConfig": {
|
|
60
60
|
"access": "public"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "7b07434790f3f2c119d1106c379ab07bd715372e"
|
|
63
63
|
}
|
package/presets/base.cjs
CHANGED
|
@@ -137,8 +137,20 @@ module.exports = {
|
|
|
137
137
|
'jsdoc/require-jsdoc': 'off',
|
|
138
138
|
// does not work well with TypeScript https://github.com/gajus/eslint-plugin-jsdoc/issues/145
|
|
139
139
|
'jsdoc/valid-types': 'off',
|
|
140
|
+
// prefer explicitly convert type for readability
|
|
141
|
+
'no-implicit-coercion': 'error',
|
|
142
|
+
// make sure private class members are in-use
|
|
143
|
+
'no-unused-private-class-members': 'error',
|
|
140
144
|
// avoid assigning anonymous function to object key which is harder to trace when debug
|
|
141
145
|
'object-shorthand': ['error', 'always'],
|
|
146
|
+
// prefer `const` when the variable won't be reassigned
|
|
147
|
+
'prefer-const': [
|
|
148
|
+
'error',
|
|
149
|
+
{
|
|
150
|
+
// if one of the variables will be reassigned, do not enforce `const`
|
|
151
|
+
destructuring: 'all',
|
|
152
|
+
},
|
|
153
|
+
],
|
|
142
154
|
// use with `unicorn/throw-new-error`
|
|
143
155
|
// disallow builtins to be created without `new` operator, to be consistent with es6 class syntax
|
|
144
156
|
'unicorn/new-for-builtins': 'error',
|