Skip to content

Commit e4f46f8

Browse files
authored
Add prettier as an npm dev dependency (#18044)
For this initial commit I only chose to apply the formatting to a single JS file.
1 parent c6b31a3 commit e4f46f8

File tree

6 files changed

+293
-184
lines changed

6 files changed

+293
-184
lines changed

.circleci/config.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,9 @@ jobs:
318318
steps:
319319
- checkout
320320
- npm-install
321-
- run: npm run lint
321+
- run: |
322+
npm run lint
323+
npm run check
322324
test-sanity:
323325
executor: bionic
324326
steps:

.eslintrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ env:
33
es2020: true
44
node: true
55
extends:
6-
- google
6+
- prettier
77
parserOptions:
88
ecmaVersion: 12
99
ignorePatterns:

.prettierrc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
singleQuote: true
2+
bracketSpacing: false
3+
arrowParens: avoid
4+
printWidth: 100

package-lock.json

Lines changed: 12 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"devDependencies": {
44
"es-check": "^6.2.1",
55
"eslint": "^8.16.0",
6-
"eslint-config-google": "^0.14.0",
6+
"eslint-config-prettier": "^8.5.0",
7+
"prettier": "^2.7.1",
78
"source-map": "0.7.3",
89
"ws": "^8.6.0"
910
},
@@ -14,6 +15,8 @@
1415
"wasm2c": "1.0.0"
1516
},
1617
"scripts": {
17-
"lint": "eslint ."
18+
"lint": "eslint .",
19+
"fmt": "prettier --write tools/acorn-optimizer.js",
20+
"check": "prettier --check tools/acorn-optimizer.js"
1821
}
1922
}

0 commit comments

Comments
 (0)