File tree 5 files changed +2327
-6352
lines changed
packages/eslint-config-react
5 files changed +2327
-6352
lines changed Original file line number Diff line number Diff line change 16
16
{
17
17
"parser": "@babel/eslint-parser",
18
18
"files": ["*.js", "*.mjs"],
19
- "extends": "@scaleway/react/index.js "
19
+ "extends": "@scaleway/react"
20
20
},
21
21
{
22
22
"files": ["*.ts", "*.tsx"],
23
23
"parserOptions": {
24
24
"project": ["tsconfig.json"]
25
25
},
26
- "extends": ["@scaleway/react/typescript.js "]
26
+ "extends": ["@scaleway/react/typescript"]
27
27
}
28
28
]
29
29
}
Original file line number Diff line number Diff line change @@ -18,17 +18,25 @@ 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
25
25
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
+ ```
Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change 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" ,
You can’t perform that action at this time.
0 commit comments