File tree Expand file tree Collapse file tree 5 files changed +2327
-6352
lines changed
packages/eslint-config-react Expand file tree Collapse file tree 5 files changed +2327
-6352
lines changed Original file line number Diff line number Diff line change 1616 {
1717 "parser": "@babel/eslint-parser",
1818 "files": ["*.js", "*.mjs"],
19- "extends": "@scaleway/react/index.js "
19+ "extends": "@scaleway/react"
2020 },
2121 {
2222 "files": ["*.ts", "*.tsx"],
2323 "parserOptions": {
2424 "project": ["tsconfig.json"]
2525 },
26- "extends": ["@scaleway/react/typescript.js "]
26+ "extends": ["@scaleway/react/typescript"]
2727 }
2828 ]
2929}
Original file line number Diff line number Diff line change @@ -18,17 +18,25 @@ Add to your `.eslintrc`
1818
1919``` json
2020{
21- "extends" : " @scaleway/react"
21+ "extends" : [ " @scaleway/react] "
2222}
2323```
2424
2525Or for Typescript
2626
2727```json
2828{
29- "extends" : " @scaleway/react/typescript" ,
29+ "extends" : [ " @scaleway/react/typescript" ] ,
3030 "parserOptions" : {
3131 "project" : " ./path/to/tsconfig.json"
3232 }
3333}
3434```
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 1717 },
1818 "license" : " MIT" ,
1919 "dependencies" : {
20+ "@emotion/eslint-plugin" : " 11.10.0" ,
2021 "@typescript-eslint/eslint-plugin" : " 5.46.1" ,
2122 "@typescript-eslint/parser" : " 5.46.1" ,
2223 "eslint-config-airbnb" : " 19.0.4" ,
You can’t perform that action at this time.
0 commit comments