Skip to content

Commit cd5ad89

Browse files
committed
chore: setup ESLint and Prettier
1 parent b57f3d8 commit cd5ad89

File tree

2 files changed

+29
-8
lines changed

2 files changed

+29
-8
lines changed

.prettierrc.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

package.json

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,34 @@
33
"workspaces": ["src/*/Resources/assets"],
44
"scripts": {
55
"build": "yarn workspaces run build",
6-
"test": "yarn workspaces run test"
6+
"test": "yarn workspaces run test",
7+
"lint": "eslint src/*/Resources/assets/{src,test}/*.js --fix",
8+
"format": "prettier src/*/Resources/assets/{src,test}/*.js {,src/*/}*.{json,md} --write",
9+
"check-lint": "yarn lint --no-fix",
10+
"check-format": "yarn format --no-write --check"
11+
},
12+
"devDependencies": {
13+
"eslint": "^7.15.0",
14+
"@babel/eslint-parser": "^7.12.1",
15+
"eslint-config-prettier": "^6.15.0",
16+
"prettier": "^2.2.1"
17+
},
18+
"eslintConfig": {
19+
"root": true,
20+
"parserOptions": {
21+
"sourceType": "module",
22+
"ecmaVersion": 11
23+
},
24+
"extends": [
25+
"eslint:recommended",
26+
"prettier"
27+
]
28+
},
29+
"prettier": {
30+
"printWidth": 120,
31+
"trailingComma": "es5",
32+
"tabWidth": 4,
33+
"jsxBracketSameLine": true,
34+
"singleQuote": true
735
}
836
}

0 commit comments

Comments
 (0)