Updates prettier configuration and adds prettier workflow

This commit is contained in:
Heinous Tugboat 2022-10-01 10:39:03 -04:00
parent dc8bb0eed7
commit 9ec96d6393
4 changed files with 27 additions and 14 deletions

View file

@ -24,20 +24,20 @@ jobs:
# run: npm ci
# - name: Run linter
# run: npm run lint:report
# prettier:
# name: Prettier
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: Use Node.js 16.13.1
# uses: actions/setup-node@v2
# with:
# node-version: 16.13.1
# cache: "npm"
# - name: Install npm dependencies
# run: npm ci
# - name: Run prettier check
# run: npm run format:report
prettier:
name: Prettier
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 16.13.1
uses: actions/setup-node@v2
with:
node-version: 16.13.1
cache: "npm"
- name: Install npm dependencies
run: npm ci
- name: Run prettier check
run: npm run format:report
test:
name: Test
runs-on: ubuntu-latest

2
.prettierignore Normal file
View file

@ -0,0 +1,2 @@
node_modules
dist

10
.vscode/settings.json vendored Normal file
View file

@ -0,0 +1,10 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}

View file

@ -7,6 +7,7 @@
"main": "./npx/bitburner-filesync.ts",
"scripts": {
"format": "prettier -w .",
"format:report": "prettier -c .",
"test:all": "mocha --recursive test",
"test:single": "mocha",
"start": "npx/bitburner-filesync.ts"