Skip to content

Commit

Permalink
chore: run lint:check in CI
Browse files Browse the repository at this point in the history
Also ensures all packages have a lint:check, and places the
lint:fix and lint:check scripts in the order in which they are run by yarn lint
  • Loading branch information
maurelian committed May 5, 2021
1 parent 7bb1672 commit f4b69d4
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ts-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,4 @@ jobs:
run: yarn install

- name: Lint
run: yarn lint
run: yarn lint:check
2 changes: 1 addition & 1 deletion integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"license": "MIT",
"scripts": {
"lint": "yarn lint:fix && yarn lint:check",
"lint:check": "tslint --format stylish --project .",
"lint:fix": "prettier --config ./.prettierrc.json --write 'test/**/*.ts'",
"lint:check": "tslint --format stylish --project .",
"build:integration": "./scripts/build.sh",
"build:contracts": "hardhat compile",
"build:contracts:ovm": "hardhat compile --network optimism",
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"test": "yarn lerna run test --parallel",
"test:coverage": "yarn lerna run test:coverage --parallel",
"lint": "yarn lerna run lint",
"lint:check": "yarn lerna run lint:check",
"lint:fix": "yarn lerna run lint:fix",
"postinstall": "patch-package",
"release": "yarn build && yarn changeset publish"
Expand Down
2 changes: 1 addition & 1 deletion packages/batch-submitter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"build": "tsc -p ./tsconfig.build.json",
"clean": "rimraf cache/ dist/ ./tsconfig.build.tsbuildinfo",
"lint": "yarn lint:fix && yarn lint:check",
"lint:check": "tslint --format stylish --project .",
"lint:fix": "prettier --config .prettierrc.json --write \"hardhat.config.ts\" \"{src,exec,test}/**/*.ts\"",
"lint:check": "tslint --format stylish --project .",
"test": "hardhat test --show-stack-traces"
},
"keywords": [
Expand Down
5 changes: 3 additions & 2 deletions packages/common-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
"all": "yarn clean && yarn build && yarn test && yarn lint:fix && yarn lint",
"build": "tsc -p tsconfig.build.json",
"clean": "rimraf dist/ ./tsconfig.build.tsbuildinfo",
"lint": "tslint --format stylish --project .",
"lint:fix": "prettier --config .prettierrc.json --write '{src,test}/**/*.ts'"
"lint": "yarn lint:fix && yarn lint:check",
"lint:fix": "prettier --config .prettierrc.json --write '{src,test}/**/*.ts'",
"lint:check": "tslint --format stylish --project ."
},
"devDependencies": {
"@types/pino": "^6.3.6",
Expand Down
5 changes: 3 additions & 2 deletions packages/contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@
"test:contracts": "hardhat test --show-stack-traces",
"test:gas": "hardhat test \"test/contracts/OVM/execution/OVM_StateManager.gas-spec.ts\" --no-compile --show-stack-traces",
"test:coverage": "NODE_OPTIONS=--max_old_space_size=8192 hardhat coverage",
"lint": "yarn run lint:typescript",
"lint:typescript": "tslint --format stylish --project .",
"lint": "yarn lint:fix && yarn lint:check",
"lint:fix": "yarn run lint:fix:typescript",
"lint:fix:typescript": "prettier --config .prettierrc.json --write \"hardhat.config.ts\" \"{src,test}/**/*.ts\"",
"lint:check": "yarn run lint:typescript",
"lint:typescript": "tslint --format stylish --project .",
"clean": "rm -rf ./dist ./artifacts ./artifacts-ovm ./cache ./cache-ovm ./tsconfig.build.tsbuildinfo",
"deploy": "./bin/deploy.ts && yarn generate-markdown",
"serve": "./bin/serve_dump.sh",
Expand Down
3 changes: 2 additions & 1 deletion packages/core-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
"all": "yarn clean && yarn build && yarn test && yarn lint:fix && yarn lint",
"build": "tsc -p tsconfig.build.json",
"clean": "rimraf dist/ ./tsconfig.build.tsbuildinfo",
"lint": "tslint --format stylish --project .",
"lint": "yarn lint:fix && yarn lint:check",
"lint:fix": "prettier --config .prettierrc.json --write '{src,test}/**/*.ts'",
"lint:check": "tslint --format stylish --project .",
"test": "ts-mocha test/**/*.spec.ts"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/data-transport-layer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"clean": "rimraf ./dist ./tsconfig.build.tsbuildinfo",
"clean:db": "rimraf ./db",
"lint": "yarn run lint:fix && yarn run lint:check",
"lint:check": "tslint --format stylish --project .",
"lint:fix": "prettier --config .prettierrc.json --write \"{src,exec,test}/**/*.ts\"",
"lint:check": "tslint --format stylish --project .",
"start": "ts-node ./src/services/run.ts",
"start:local": "ts-node ./src/services/run.ts | pino-pretty",
"test": "hardhat --config test/config/hardhat.config.ts test",
Expand Down
4 changes: 2 additions & 2 deletions packages/hardhat-ovm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"clean": "rimraf tsconfig.build.tsbuildinfo dist",
"build": "tsc -p tsconfig.build.json",
"lint": "yarn run lint:fix && yarn run lint:check",
"lint:check": "tslint --format stylish --project .",
"lint:fix": "prettier --config .prettierrc.json --write \"{src,test}/**/*.ts\""
"lint:fix": "prettier --config .prettierrc.json --write \"{src,test}/**/*.ts\"",
"lint:check": "tslint --format stylish --project ."
},
"dependencies": {
"node-fetch": "^2.6.1"
Expand Down
4 changes: 2 additions & 2 deletions packages/message-relayer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"build": "tsc -p ./tsconfig.build.json",
"clean": "rimraf dist/ ./tsconfig.build.tsbuildinfo",
"lint": "yarn lint:fix && yarn lint:check",
"lint:check": "tslint --format stylish --project .",
"lint:fix": "prettier --config .prettierrc.json --write \"{src,exec,test}/**/*.ts\""
"lint:fix": "prettier --config .prettierrc.json --write \"{src,exec,test}/**/*.ts\"",
"lint:check": "tslint --format stylish --project ."
},
"keywords": [
"optimism",
Expand Down
2 changes: 1 addition & 1 deletion packages/smock/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"build": "tsc -p tsconfig.build.json",
"test": "hardhat test --show-stack-traces",
"lint": "yarn lint:fix && yarn lint:check",
"lint:check": "tslint --format stylish --project .",
"lint:fix": "prettier --config ./.prettierrc.json --write \"hardhat.config.ts\" \"{src,test}/**/*.ts\"",
"lint:check": "tslint --format stylish --project .",
"clean": "rimraf ./artifacts ./cache ./dist ./tsconfig.build.tsbuildinfo"
},
"peerDependencies": {
Expand Down
3 changes: 2 additions & 1 deletion specs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"prettier": "2.2.1"
},
"scripts": {
"lint": "yarn lint:fix && yarn lint:check",
"lint:fix": "yarn prettier --write \"{l2geth,protocol}/**/*.md\"",
"lint": "yarn prettier --check \"{l2geth,protocol}/**/*.md\""
"lint:check": "yarn prettier --check \"{l2geth,protocol}/**/*.md\""
}
}

0 comments on commit f4b69d4

Please sign in to comment.