@scaleway/eslint-config-react 3.13.8 → 3.14.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 +9 -0
- package/package.json +6 -6
- package/shared.js +4 -0
- package/typescript.js +20 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,15 @@
|
|
|
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
|
+
## [3.14.0](https://github.com/scaleway/scaleway-lib/compare/@scaleway/eslint-config-react@3.13.8...@scaleway/eslint-config-react@3.14.0) (2023-01-16)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### :gear: Features
|
|
10
|
+
|
|
11
|
+
* **eslint-config:** harden eslint config ([#1157](https://github.com/scaleway/scaleway-lib/issues/1157)) ([8087ac8](https://github.com/scaleway/scaleway-lib/commit/8087ac8cf8b06c23bbbf9f13d001468b61313cd6))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
6
15
|
## 3.13.8 (2023-01-16)
|
|
7
16
|
|
|
8
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/eslint-config-react",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.14.0",
|
|
4
4
|
"description": "Scaleway React eslint shared config",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -25,17 +25,17 @@
|
|
|
25
25
|
"eslint-config-prettier": "8.6.0",
|
|
26
26
|
"eslint-plugin-deprecation": "1.3.3",
|
|
27
27
|
"eslint-plugin-eslint-comments": "3.2.0",
|
|
28
|
-
"eslint-plugin-import": "2.
|
|
29
|
-
"eslint-plugin-jsx-a11y": "6.7.
|
|
30
|
-
"eslint-plugin-react": "7.
|
|
28
|
+
"eslint-plugin-import": "2.27.4",
|
|
29
|
+
"eslint-plugin-jsx-a11y": "6.7.1",
|
|
30
|
+
"eslint-plugin-react": "7.32.0",
|
|
31
31
|
"eslint-plugin-react-hooks": "4.6.0"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"eslint": ">= 8.5"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"eslint": "8.
|
|
37
|
+
"eslint": "8.32.0",
|
|
38
38
|
"typescript": "4.9.4"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "223f265da52e3fe1041611f971a8de128e92cf16"
|
|
41
41
|
}
|
package/shared.js
CHANGED
|
@@ -98,6 +98,10 @@ module.exports = {
|
|
|
98
98
|
'react/no-adjacent-inline-elements': 'error', // https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-adjacent-inline-elements.md
|
|
99
99
|
'prefer-object-has-own': 'error', // https://eslint.org/docs/rules/prefer-object-has-own
|
|
100
100
|
|
|
101
|
+
// Prevent uneeded rerender with object as default props
|
|
102
|
+
// https://github.com/jsx-eslint/eslint-plugin-react/blob/c8f2813758dea1759ba5ab8caf1920cae9417a43/docs/rules/no-object-type-as-default-prop.md
|
|
103
|
+
'react/no-object-type-as-default-prop': 'error',
|
|
104
|
+
|
|
101
105
|
// We don't use babel-preset-airbnb so we can make those changes
|
|
102
106
|
'react/static-property-placement': ['error', 'static public field'],
|
|
103
107
|
'react/state-in-constructor': ['error', 'never'],
|
package/typescript.js
CHANGED
|
@@ -9,6 +9,26 @@ module.exports = {
|
|
|
9
9
|
plugins: ['deprecation', '@typescript-eslint'],
|
|
10
10
|
rules: {
|
|
11
11
|
'deprecation/deprecation': 'warn',
|
|
12
|
+
// Enforce T[] instead of Array<T>
|
|
13
|
+
'@typescript-eslint/array-type': [
|
|
14
|
+
'error',
|
|
15
|
+
{
|
|
16
|
+
default: 'array',
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
// Avoid toString which are going to generate [object Object]
|
|
20
|
+
'@typescript-eslint/no-base-to-string': 'error',
|
|
21
|
+
// (someCondition === true) => (someCondition)
|
|
22
|
+
'@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
|
|
23
|
+
'@typescript-eslint/no-unnecessary-condition': 'error',
|
|
24
|
+
'@typescript-eslint/no-unnecessary-type-arguments': 'error',
|
|
25
|
+
'@typescript-eslint/no-unsafe-declaration-merging': 'error',
|
|
26
|
+
'@typescript-eslint/prefer-for-of': 'error',
|
|
27
|
+
'@typescript-eslint/prefer-includes': 'error',
|
|
28
|
+
'@typescript-eslint/prefer-optional-chain': 'error',
|
|
29
|
+
'@typescript-eslint/prefer-reduce-type-parameter': 'error',
|
|
30
|
+
'@typescript-eslint/prefer-string-starts-ends-with': 'error',
|
|
31
|
+
'@typescript-eslint/prefer-ts-expect-error': 'error',
|
|
12
32
|
// https://github.com/typescript-eslint/typescript-eslint/issues/4619
|
|
13
33
|
'@typescript-eslint/no-misused-promises': [
|
|
14
34
|
'error',
|