Skip to content

Commit 64eca93

Browse files
authored
Merge pull request #16 from alexrecuenco/feature/re-add-prettier
Adding prettier again
2 parents 3d3a5f0 + b2a9548 commit 64eca93

20 files changed

+740
-391
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ dist/
55
.vscode/
66
node_modules/
77
coverage/
8+
report/
89
!*.js
910
!*.ts
1011
!.vscode/*.json
12+
package-lock.json

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* text=auto eol=lf
1+
* text=auto eol=lf

.github/workflows/main.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,28 @@
11
name: Node.js CI
22

3-
on: [push]
3+
on:
4+
pull_request:
5+
push:
6+
branches: [main]
47

58
jobs:
9+
pre-commit:
10+
env:
11+
# Disabled because: [error] Cannot find package 'prettier-plugin-jsdoc' imported from /app/noop.js
12+
SKIP: prettier
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-python@v4
17+
with:
18+
cache: 'pip'
19+
- uses: pre-commit/[email protected]
20+
621
build:
722
runs-on: ubuntu-latest
823

924
strategy:
1025
matrix:
11-
# Current versions not in maintainance
1226
node-version: [18.x, 20.x]
1327

1428
steps:
@@ -21,5 +35,6 @@ jobs:
2135
- run: npm ci
2236
- run: npm test
2337
- run: npm run lint
38+
- run: npm run format
2439
- run: npm run build:debug
2540
- run: npm run build:prod

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,4 +394,4 @@ $RECYCLE.BIN/
394394
# Windows shortcuts
395395
*.lnk
396396

397-
# End of https://www.gitignore.io/api/git,node,linux,macos,python,pycharm,windows,visualstudiocode
397+
# End of https://www.gitignore.io/api/git,node,linux,macos,python,pycharm,windows,visualstudiocode

.pre-commit-config.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,15 @@ repos: #The order matters, we want prospector to run after all the sorting was d
1414
- id: check-toml
1515
- id: check-xml
1616
- id: check-yaml
17-
- id: detect-aws-credentials
17+
# - id: detect-aws-credentials
1818
- id: detect-private-key
1919
# File normalization
2020
- id: end-of-file-fixer
2121
- id: trailing-whitespace
22+
- repo: https://github.com/pre-commit/mirrors-prettier
23+
rev: 'v3.1.0'
24+
hooks:
25+
- id: prettier
26+
additional_dependencies:
27+
28+

.prettierignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
**/.git
2+
**/.svn
3+
**/.hg
4+
**/node_modules
5+
package-lock.json
6+
lib/
7+
build/
8+
build-*/
9+
dist/
10+
.vscode/
11+
node_modules/
12+
coverage/
13+
report/
14+
!*.js
15+
!*.ts
16+
!.vscode/*.json

.vscode/extensions.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
22
"recommendations": [
33
"dbaeumer.vscode-eslint",
4+
"esbenp.prettier-vscode",
45
"ghmcadams.lintlens",
56
"visualstudioexptteam.vscodeintellicode",
67
"wix.vscode-import-cost",
78
"pmneo.tsimporter",
8-
"orta.vscode-jest"
9-
]
9+
"orta.vscode-jest",
10+
],
1011
}

.vscode/launch.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"preLaunchTask": "tsc: build - tsconfig.json",
1414
"outFiles": ["${workspaceFolder}/build/**/*.js"],
1515
"env": { "DEBUG": "*", "NODE_ENV": "development" },
16-
"showAsyncStacks": true
16+
"showAsyncStacks": true,
1717
},
1818
{
1919
"type": "node",
@@ -27,8 +27,8 @@
2727
"disableOptimisticBPs": true,
2828
"showAsyncStacks": true,
2929
"windows": {
30-
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
31-
}
30+
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
31+
},
3232
},
3333
{
3434
"type": "node",
@@ -42,8 +42,8 @@
4242
"disableOptimisticBPs": true,
4343
"showAsyncStacks": true,
4444
"windows": {
45-
"program": "${workspaceFolder}/node_modules/jest/bin/jest"
46-
}
47-
}
48-
]
45+
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
46+
},
47+
},
48+
],
4949
}

.vscode/settings.json

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,18 @@
11
{
2-
"eslint.validate": [
3-
"typescript",
4-
"typescriptreact"
5-
],
2+
"eslint.validate": ["typescript", "typescriptreact"],
63
"editor.formatOnSave": true,
7-
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
4+
"editor.defaultFormatter": "esbenp.prettier-vscode",
85
"editor.codeActionsOnSave": {
9-
"source.organizeImports": "never"
6+
"source.organizeImports": "never",
107
},
11-
"[javascript,typescript]": {
12-
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
13-
"editor.codeActionsOnSave": {
14-
"source.organizeImports": "never"
15-
},
8+
"editor.formatOnSaveMode": "modificationsIfAvailable",
9+
"[javascript,typescript,jsonc,json]": {
10+
"editor.defaultFormatter": "esbenp.prettier-vscode",
11+
"editor.formatOnSaveMode": "modificationsIfAvailable",
1612
},
1713
"eslint.experimental.useFlatConfig": true,
1814
"jest.jestCommandLine": "npm test -- ",
1915
"jest.runMode": {
20-
"type": "on-demand"
21-
}
16+
"type": "on-demand",
17+
},
2218
}

.vscode/tasks.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,31 @@
77
"type": "npm",
88
"script": "build",
99
"group": "build",
10-
"problemMatcher": []
10+
"problemMatcher": [],
1111
},
1212
{
1313
"type": "npm",
1414
"script": "lint",
15-
"problemMatcher": []
15+
"problemMatcher": [],
1616
},
1717
{
1818
"type": "npm",
1919
"script": "start",
20-
"problemMatcher": []
20+
"problemMatcher": [],
2121
},
2222
{
2323
"type": "typescript",
2424
"tsconfig": "tsconfig.json",
2525
"problemMatcher": ["$tsc"],
26-
"group": "build"
26+
"group": "build",
2727
},
2828
{
2929
"label": "tsc: watch",
3030
"type": "typescript",
3131
"tsconfig": "tsconfig.json",
3232
"option": "watch",
3333
"problemMatcher": ["$tsc-watch"],
34-
"group": "build"
35-
}
36-
]
34+
"group": "build",
35+
},
36+
],
3737
}

0 commit comments

Comments
 (0)