diff options
| author | bors <bors@rust-lang.org> | 2023-07-22 16:53:21 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-07-22 16:53:21 +0000 |
| commit | c99bb3c782a9c110edc906bb4a01f4bea173d48e (patch) | |
| tree | 71c4a92a073c38a5388c605efcffa11562a3dd69 /editors/code/package.json | |
| parent | b17be2720a2752f210796809355461d71770401e (diff) | |
| parent | 5cca093fa856aafb0d6608d0fedbc40b731d855e (diff) | |
| download | rust-c99bb3c782a9c110edc906bb4a01f4bea173d48e.tar.gz rust-c99bb3c782a9c110edc906bb4a01f4bea173d48e.zip | |
Auto merge of #15281 - tetsuharuohzeki:split-ci-steps, r=lnicola
editor/code: Break down CI steps to know what is failing easily This do the thing I mentioned in https://github.com/rust-lang/rust-analyzer/pull/15265#issuecomment-1634424385 This aims to improve CI status check more readable. I tried to use [`jobs.<job_id>.if`](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idif) to make the configuration more shortly once. But it could not fire the `end-success` or `end-failure` status if some jobs in the workflow were skipped. This causes an integration problem with bors. By their reasons, this patch still uses `jobs.<job_id>.steps[*].if`. --- To do this change, we reorganize npm-script. | previous | after | |--------------------|----------------------------------------| | `npm run lint` | `npm run lint && npm run format:check` | | `npm run fix` | `npm run lint:fix && npm run format` | The previous `npm run fix` sometimes does not complete fix automatically because ESLint's autofix doees not follow prettier's formatting. So we need to run `npm run lint:fix && npm run format` by this order.
Diffstat (limited to 'editors/code/package.json')
| -rw-r--r-- | editors/code/package.json | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/editors/code/package.json b/editors/code/package.json index ffb5dd9079a..31c483beb63 100644 --- a/editors/code/package.json +++ b/editors/code/package.json @@ -35,9 +35,12 @@ "build-base": "esbuild ./src/main.ts --bundle --outfile=out/main.js --external:vscode --format=cjs --platform=node --target=node16", "build": "npm run build-base -- --sourcemap", "watch": "npm run build-base -- --sourcemap --watch", - "lint": "prettier --check . && eslint -c .eslintrc.js --ext ts ./src ./tests", - "fix": "prettier --write . && eslint -c .eslintrc.js --ext ts ./src ./tests --fix", - "pretest": "tsc && npm run build", + "format": "prettier --write .", + "format:check": "prettier --check .", + "lint": "eslint -c .eslintrc.js --ext ts ./src ./tests", + "lint:fix": "npm run lint -- --fix", + "typecheck": "tsc", + "pretest": "npm run typecheck && npm run build", "test": "node ./out/tests/runTests.js" }, "dependencies": { |
