-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #371 from jwp-consulting/add-prettier
Format code using prettier, update node build target
- Loading branch information
Showing
8 changed files
with
109 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# EditorConfig is awesome: https://EditorConfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
[src/*.ts] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
trim_trailing_whitespace = true | ||
max_line_length = 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Lint | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
- name: Setup Node.js | ||
uses: actions/[email protected] | ||
- name: Clean NPM install | ||
run: npm clean-install | ||
- name: Check with prettier | ||
run: npm run check-prettier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,22 @@ | |
"version": "0.4.6", | ||
"description": "A WebSocket JavaScript library", | ||
"main": "dist/index.js", | ||
"contributors": [ | ||
{ | ||
"name": "Paul Jensen", | ||
"email": "[email protected]", | ||
"url": "https://paulbjensen.co.uk" | ||
}, | ||
{ | ||
"name": "Chris Lajoie", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Justus Perlwitz", | ||
"email": "[email protected]", | ||
"url": "https://www.jwpconsulting.net" | ||
} | ||
], | ||
"devDependencies": { | ||
"@babel/parser": "^7.22.5", | ||
"@babel/types": "^7.22.5", | ||
|
@@ -17,14 +33,17 @@ | |
"jsdom": "^22.1.0", | ||
"mock-socket": "^9.2.1", | ||
"npm-upgrade": "^3.1.0", | ||
"prettier": "^3.0.3", | ||
"ts-jest": "^29.1.0", | ||
"typescript": "^5.1.3" | ||
}, | ||
"scripts": { | ||
"build": "npx tsc --project tsconfig.json", | ||
"watch": "npx tsc --project tsconfig.json --watch", | ||
"cover": "npx jest --coverage --coverageReporters=text-lcov | coveralls", | ||
"test": "npx jest --coverage" | ||
"test": "npx jest --coverage", | ||
"prettier": "prettier src --write", | ||
"check-prettier": "prettier src --check" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters