Skip to content

Commit e1e0cdd

Browse files
authored
chore: update prettier (#145)
* chore: update prettier * apply format * fix * retry
1 parent 89f0f9d commit e1e0cdd

File tree

6 files changed

+3379
-3580
lines changed

6 files changed

+3379
-3580
lines changed

.githooks/pre-commit

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
npx --no-install lint-staged

.github/workflows/test.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,8 @@ jobs:
1717
node-version: ${{ matrix.node-version }}
1818
- name: Install
1919
run: yarn install
20-
- name: Test
21-
run: yarn test
20+
- uses: nick-fields/retry@v2
21+
with:
22+
timeout_minutes: 10
23+
max_attempts: 3
24+
command: yarn test

package.json

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,15 @@
2020
"build": "textlint-scripts build",
2121
"lint": "eslint --fix src test",
2222
"unittest": "textlint-scripts test",
23-
"prettier": "prettier --write \"**/*.{js,json,md}\"",
24-
"prepublish": "npm run --if-present build",
23+
"prepublish": "yarn run --if-present build",
2524
"test": "npm-run-all lint unittest",
26-
"watch": "textlint-scripts build --watch"
27-
},
28-
"husky": {
29-
"hooks": {
30-
"pre-commit": "lint-staged"
31-
}
25+
"watch": "textlint-scripts build --watch",
26+
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,css}\"",
27+
"prepare": "git config --local core.hooksPath .githooks"
3228
},
3329
"lint-staged": {
34-
"*.js": [
35-
"prettier",
36-
"git add"
37-
],
38-
"*.json": [
39-
"prettier",
40-
"git add"
30+
"*.{js,jsx,ts,tsx,css}": [
31+
"prettier --write"
4132
]
4233
},
4334
"dependencies": {
@@ -50,21 +41,26 @@
5041
"textlint-rule-helper": "^2.1.1"
5142
},
5243
"devDependencies": {
53-
"eslint": "^6.5.1",
54-
"eslint-config-airbnb-base": "^14.0.0",
55-
"eslint-config-prettier": "^6.4.0",
44+
"eslint": "^8.25.0",
45+
"eslint-config-airbnb-base": "^15.0.0",
46+
"eslint-config-prettier": "^8.5.0",
5647
"eslint-plugin-immutable": "^1.0.0",
57-
"eslint-plugin-import": "^2.18.2",
58-
"husky": "^3.0.9",
59-
"lint-staged": "^9.4.2",
48+
"eslint-plugin-import": "^2.26.0",
49+
"lint-staged": "^13.0.3",
6050
"npm-run-all": "^4.1.5",
61-
"prettier": "^1.18.2",
62-
"textlint": "^11.4.0",
63-
"textlint-scripts": "^3.0.0",
64-
"textlint-tester": "^5.1.10"
51+
"prettier": "^2.7.1",
52+
"textlint": "^12.2.2",
53+
"textlint-scripts": "^12.2.2",
54+
"textlint-tester": "^12.2.2"
6555
},
6656
"engines": {
6757
"node": ">=4"
6858
},
69-
"packageManager": "[email protected]"
59+
"packageManager": "[email protected]",
60+
"prettier": {
61+
"singleQuote": false,
62+
"printWidth": 120,
63+
"tabWidth": 4,
64+
"trailingComma": "none"
65+
}
7066
}

0 commit comments

Comments
 (0)