-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Move testing dependencies to devDependencies * Add prettier and pre-commit hooks * Tight up lint rules * Remove unused dependencies * Added github action for linter * Jobs naming updated Co-authored-by: Djordje Kovacevic <[email protected]>
- Loading branch information
1 parent
4c45cd6
commit 470ffd3
Showing
10 changed files
with
14,515 additions
and
290 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
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,33 @@ | ||
name: CHECK-lint | ||
|
||
#todo this test should be execute when opening PR to prerelease/release branches | ||
on: [pull_request] | ||
env: | ||
NODE_ENV: test | ||
ARTIFACTS_DIR: artifacts | ||
CUCUMBER_ARTIFACTS_DIR: artifacts/cucumber | ||
jobs: | ||
check-lint: | ||
#todo think about locking the version - version should be the same as the one in official documentation | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [16.x] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm install | ||
- run: mkdir -p $ARTIFACTS_DIR | ||
- run: cp .origintrail_noderc.tests .origintrail_noderc | ||
- run: sudo chmod -R 777 $ARTIFACTS_DIR | ||
- run: mkdir -p $CUCUMBER_ARTIFACTS_DIR | ||
- run: sudo chmod -R 777 $CUCUMBER_ARTIFACTS_DIR | ||
- run: npm run lint; | ||
- uses: actions/upload-artifact@v2 | ||
if: ${{ always() }} | ||
with: | ||
name: my-artifact | ||
path: /home/runner/work/ot-node/ot-node/artifacts |
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
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 @@ | ||
_ |
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,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
#npm run lint-staged |
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,3 @@ | ||
{ | ||
"*.{js, json}": ["prettier --write", "eslint"] | ||
} |
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,9 @@ | ||
{ | ||
"semi": true, | ||
"printWidth": 100, | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"arrowParens": "always", | ||
"tabWidth": 4, | ||
"bracketSpacing": true | ||
} |
Oops, something went wrong.