@scaleway/eslint-config-react 3.11.2 → 3.12.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 CHANGED
@@ -3,6 +3,18 @@
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.12.1](https://github.com/scaleway/scaleway-lib/compare/@scaleway/eslint-config-react@3.12.0...@scaleway/eslint-config-react@3.12.1) (2022-12-19)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **eslint-config-react/typescript:** disable useless fragment when expression ([#1123](https://github.com/scaleway/scaleway-lib/issues/1123)) ([e876488](https://github.com/scaleway/scaleway-lib/commit/e8764881f605aded9bf33a406fef26f1c0f211be))
11
+
12
+ ## 3.12.0 (2022-12-19)
13
+
14
+ ### Features
15
+
16
+ - **eslint-config-react:** add standalone emotion configuration ([#1121](https://github.com/scaleway/scaleway-lib/issues/1121)) ([4aa5474](https://github.com/scaleway/scaleway-lib/commit/4aa5474f357c8a00e9c81d6be7591da3002c0ddc))
17
+
6
18
  ## [3.11.2](https://github.com/scaleway/scaleway-lib/compare/@scaleway/eslint-config-react@3.11.1...@scaleway/eslint-config-react@3.11.2) (2022-12-14)
7
19
 
8
20
  ### Bug Fixes
package/README.md CHANGED
@@ -18,7 +18,7 @@ Add to your `.eslintrc`
18
18
 
19
19
  ```json
20
20
  {
21
- "extends": "@scaleway/react"
21
+ "extends": ["@scaleway/react]"
22
22
  }
23
23
  ```
24
24
 
@@ -26,9 +26,17 @@ Or for Typescript
26
26
 
27
27
  ```json
28
28
  {
29
- "extends": "@scaleway/react/typescript",
29
+ "extends": ["@scaleway/react/typescript"],
30
30
  "parserOptions": {
31
31
  "project": "./path/to/tsconfig.json"
32
32
  }
33
33
  }
34
34
  ```
35
+
36
+ We also have a standalong emotion configuration
37
+
38
+ ```json
39
+ {
40
+ "extends": ["@scaleway/react", "@scaleway/react/emotion"]
41
+ }
42
+ ```
package/emotion.js ADDED
@@ -0,0 +1,15 @@
1
+ module.exports = {
2
+ plugins: ['@emotion'],
3
+ rules: {
4
+ 'react/no-unknown-property': [
5
+ 'error',
6
+ {
7
+ ignore: ['css'],
8
+ },
9
+ ],
10
+ '@emotion/import-from-emotion': 'error',
11
+ '@emotion/no-vanilla': 'error',
12
+ '@emotion/styled-import': 'error',
13
+ '@emotion/syntax-preference': ['error', 'string'],
14
+ },
15
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/eslint-config-react",
3
- "version": "3.11.2",
3
+ "version": "3.12.1",
4
4
  "description": "Scaleway React eslint shared config",
5
5
  "keywords": [
6
6
  "eslint",
@@ -17,6 +17,7 @@
17
17
  },
18
18
  "license": "MIT",
19
19
  "dependencies": {
20
+ "@emotion/eslint-plugin": "11.10.0",
20
21
  "@typescript-eslint/eslint-plugin": "5.46.1",
21
22
  "@typescript-eslint/parser": "5.46.1",
22
23
  "eslint-config-airbnb": "19.0.4",
@@ -36,5 +37,5 @@
36
37
  "eslint": "8.29.0",
37
38
  "typescript": "4.9.3"
38
39
  },
39
- "gitHead": "7c8d69c4378565ee25dd85f78f50642d651580a1"
40
+ "gitHead": "444dc1de3aa1bc70a0e84a8ee973bd7cb2d24d93"
40
41
  }
package/typescript.js CHANGED
@@ -26,5 +26,6 @@ module.exports = {
26
26
  // https://react-typescript-cheatsheet.netlify.app/docs/basic/getting-started/default_props/#you-may-not-need-defaultprops
27
27
  // https://twitter.com/dan_abramov/status/1133878326358171650
28
28
  'react/require-default-props': 'off',
29
+ 'react/jsx-no-useless-fragment': ['error', { allowExpressions: true }],
29
30
  },
30
31
  }