Skip to content

Commit a4fa159

Browse files
authored
Merge pull request #702 from srliao/srl-20220810-update-prettier
add prettier and eslint
2 parents 1bca771 + eb2774e commit a4fa159

File tree

8 files changed

+3891
-52
lines changed

8 files changed

+3891
-52
lines changed

app/.eslintrc.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
module.exports = {
2+
"extends": [
3+
"airbnb",
4+
"plugin:prettier/recommended",
5+
"prettier/react"
6+
],
7+
"env": {
8+
"browser": true,
9+
"commonjs": true,
10+
"es6": true,
11+
"jest": true,
12+
"node": true
13+
},
14+
"rules": {
15+
"jsx-a11y/href-no-hash": ["off"],
16+
"react/jsx-filename-extension": ["warn", { "extensions": [".js", ".jsx"] }],
17+
"max-len": [
18+
"warn",
19+
{
20+
"code": 80,
21+
"tabWidth": 2,
22+
"comments": 80,
23+
"ignoreComments": false,
24+
"ignoreTrailingComments": true,
25+
"ignoreUrls": true,
26+
"ignoreStrings": true,
27+
"ignoreTemplateLiterals": true,
28+
"ignoreRegExpLiterals": true
29+
}
30+
]
31+
}
32+
}

app/.prettierrc.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
"printWidth": 80,
3+
"singleQuote": true,
4+
"trailingComma": "es5"
5+
}

app/package.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,22 @@
1515
"@types/react-redux": "^7.1.20",
1616
"@types/react-virtualized-auto-sizer": "1.0.1",
1717
"autoprefixer": "^10.4.0",
18+
"babel-eslint": "^10.1.0",
1819
"buffer": "^6.0.3",
1920
"cssnano": "^5.0.10",
21+
"eslint": "^8.21.0",
22+
"eslint-config-airbnb": "^19.0.4",
23+
"eslint-config-prettier": "^8.5.0",
24+
"eslint-plugin-import": "^2.26.0",
25+
"eslint-plugin-jsx-a11y": "^6.6.1",
26+
"eslint-plugin-prettier": "^4.2.1",
27+
"eslint-plugin-react": "^7.30.1",
2028
"genshin-db": "^4.1.0",
2129
"parcel-reporter-static-files-copy": "^1.3.4",
2230
"parcel-resolver-ignore": "^2.0.0",
2331
"postcss": "^8.3.11",
2432
"postcss-import": "^14.0.2",
33+
"prettier": "^2.7.1",
2534
"process": "^0.11.10",
2635
"tailwindcss": "^3.0.23",
2736
"ts-json-schema-generator": "^0.98.0"

app/yarn.lock

Lines changed: 1287 additions & 13 deletions
Large diffs are not rendered by default.

services/worker/.eslintrc.js

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
module.exports = {
2+
"extends": [
3+
"airbnb",
4+
"plugin:prettier/recommended",
5+
"prettier/react"
6+
],
7+
"env": {
8+
"browser": true,
9+
"commonjs": true,
10+
"es6": true,
11+
"jest": true,
12+
"node": true
13+
},
14+
"rules": {
15+
"jsx-a11y/href-no-hash": ["off"],
16+
"react/jsx-filename-extension": ["warn", { "extensions": [".js", ".jsx"] }],
17+
"max-len": [
18+
"warn",
19+
{
20+
"code": 80,
21+
"tabWidth": 2,
22+
"comments": 80,
23+
"ignoreComments": false,
24+
"ignoreTrailingComments": true,
25+
"ignoreUrls": true,
26+
"ignoreStrings": true,
27+
"ignoreTemplateLiterals": true,
28+
"ignoreRegExpLiterals": true
29+
}
30+
]
31+
}
32+
}

services/worker/.prettierrc.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
"printWidth": 80,
3+
"singleQuote": true,
4+
"trailingComma": "es5"
5+
}

0 commit comments

Comments
 (0)