Skip to content

Commit

Permalink
feat: add linter to the ci (anoma#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszjasiuk authored Apr 4, 2023
1 parent c2d7410 commit 901627e
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 7 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/deploy-wallet-at-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,20 @@ on:
env:
CI: false
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install dependencies
run: yarn

- name: Run ESLint
run: yarn lint:ci

unit-tests-js:
needs: lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down Expand Up @@ -54,6 +67,7 @@ jobs:
${{ secrets.SLACK_WEBHOOK_WALLET_PR }}
unit-tests-wasm:
needs: lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down
1 change: 1 addition & 0 deletions apps/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"build:firefox": "yarn clean:firefox && NODE_ENV=production TARGET=firefox webpack && web-ext build --s ./build/firefox -a ./build/firefox",
"lint": "npx eslint src --ext .ts",
"lint:fix": "yarn lint -- --fix",
"lint:ci": "yarn lint --max-warnings 0",
"start": "yarn start:chrome",
"start:chrome": "yarn clean:chrome && export NODE_ENV=development; export TARGET=chrome && webpack --watch",
"start:firefox": "yarn clean:firefox && export NODE_ENV=development; export TARGET=firefox webpack --watch",
Expand Down
1 change: 1 addition & 0 deletions apps/namada-interface/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"build": "export NODE_ENV=production && yarn wasm:build && webpack",
"lint": "npx eslint src --ext .ts,.tsx",
"lint:fix": "yarn lint -- --fix",
"lint:ci": "yarn lint --max-warnings 0",
"test": "yarn wasm:build-node && yarn jest",
"test:watch": "yarn wasm:build-node && yarn jest --watchAll=true",
"test:coverage": "yarn wasm:build-node && yarn test --coverage",
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"test:ci": "wsrun --serial --exclude-missing -c test:ci",
"test-wasm:ci": "wsrun --serial --exclude-missing -c test-wasm:ci",
"lint": "wsrun --serial --exclude-missing -c lint",
"lint:fix": "wsrun --serial --exclude-missing -c lint:fix"
"lint:fix": "wsrun --serial --exclude-missing -c lint:fix",
"lint:ci": "wsrun --serial --exclude-missing -c lint:ci"
},
"dependencies": {
"@cosmjs/encoding": "^0.27.1",
Expand Down
3 changes: 2 additions & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"private": false,
"scripts": {
"lint": "npx eslint src --ext .ts,.tsx",
"lint:fix": "yarn lint -- --fix"
"lint:fix": "yarn lint -- --fix",
"lint:ci": "yarn lint --max-warnings 0"
},
"dependencies": {
"@anoma/utils": "0.1.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/integrations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"test:watch": "yarn wasm:build && jest --watchAll",
"test:ci": "jest",
"lint": "npx eslint src --ext .ts",
"lint:fix": "yarn lint -- --fix"
"lint:fix": "yarn lint -- --fix",
"lint:ci": "yarn lint --max-warnings 0"
},
"devDependencies": {
"@types/jest": "^28.1.8",
Expand Down
3 changes: 2 additions & 1 deletion packages/rpc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"private": false,
"scripts": {
"lint": "npx eslint src --ext .ts",
"lint:fix": "yarn lint -- --fix"
"lint:fix": "yarn lint -- --fix",
"lint:ci": "yarn lint --max-warnings 0"
},
"dependencies": {
"@anoma/utils": "0.1.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"private": false,
"scripts": {
"lint": "npx eslint src --ext .ts",
"lint:fix": "yarn lint -- --fix"
"lint:fix": "yarn lint -- --fix",
"lint:ci": "yarn lint --max-warnings 0"
},
"dependencies": {
"typescript": "^4.8.2"
Expand Down
3 changes: 2 additions & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"private": false,
"scripts": {
"lint": "npx eslint src --ext .ts",
"lint:fix": "yarn lint -- --fix"
"lint:fix": "yarn lint -- --fix",
"lint:ci": "yarn lint --max-warnings 0"
},
"dependencies": {
"bn.js": "^5.2.1",
Expand Down
3 changes: 2 additions & 1 deletion packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"private": false,
"scripts": {
"lint": "npx eslint src --ext .ts",
"lint:fix": "yarn lint -- --fix"
"lint:fix": "yarn lint -- --fix",
"lint:ci": "yarn lint --max-warnings 0"
},
"dependencies": {
"@cosmjs/json-rpc": "^0.27.1",
Expand Down

0 comments on commit 901627e

Please sign in to comment.