How to use the ESLint annotations?
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 文档
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- eslint, github-actions, node.js, typescript
- 领域
- ci-cd, documentation
调研方向
首先查看 issue 中显示的 workflow YAML 和 package.json 脚本,尤其是 eslint:github-action 命令及其输出。检查仓库现有的文档或 action 对 ESLint 注释的行为,然后记录此设置是否应生成拉取请求注释,以及需要哪些配置。
由索引模型根据 Issue 内容生成。
描述
It's my first time using the annotations feature, so please forgive me if this issue is irrelevant.
I'm trying to have annotations in the PR, however all I can get is a simple annotation in the actions screen with irrelevant information. I'm guessing that's a problem of mine, and since there's not a lot documentation (that I could find) about this might as well ask.
That's the output of a failing eslint job. The current configuration is:
quality:
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: "12.x"
- name: Cache node modules
id: cache
uses: actions/cache@v1
with:
path: node_modules # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.os }}-node_modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
- name: Prettier
run: npm run fmt:check
- name: ESlint
run: npm run eslint:github-action
where my package.json looks like:
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^2.12.0",
"@typescript-eslint/parser": "^2.12.0",
"eslint": "^6.7.2",
"eslint-config-prettier": "^6.7.0",
"prettier": "^1.19.1",
"serverless-dynamodb-local": "^0.2.38",
"serverless-offline": "^5.12.1",
"serverless-plugin-typescript": "^1.1.9",
"typescript": "^3.7.3"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"lint": "eslint functions/**.ts",
"eslint:github-action": "eslint functions/**",
"fmt": "prettier --write ./**.{json,js,ts,yml,md}",
"fmt:check": "prettier --check ./**.{json,js,ts,yml,md}"
},
I expected that the following error would actually appear in the annotation, and hopefully in the PR too.
/home/runner/work/utom.is/utom.is/functions/a.ts
1:0 error Parsing error: Declaration or statement expected
but as you can get the from screenshot, all I have is that the process completed with error 1.
Is my expectation wrong? Or do I have something misconfigured?
Thanks
- 主要语言
- TypeScript
- 星标
- 5k
- 派生
- 1.7k
- 平均合并
- 2 天 11 小时
- 30 天内合并 PR
- 3
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
actions/setup-node 的其他 Issue
-
feature request
难度 2/5 1-3 小时 新手友好度 65/100
actions/setup-node#1531 · 1 条评论 · 4 个 reaction ·
-
feature request
难度 5/5 一周以上 新手友好度 30/100
actions/setup-node#1634 · 1 条评论 ·
-
actions/setup-node#1628 · 3 条评论 · 已指派 1 人 ·
-
`npm config get cache` fails with `EBADDEVENGINES` when requiring newer npm versions in `devEngines` 未关闭feature request
难度 4/5 3-5 天 新手友好度 52/100
actions/setup-node#1553 · 12 条评论 · 2 个 reaction ·
-
feature request
难度 3/5 1-2 天 新手友好度 38/100
actions/setup-node#1428 · 1 条评论 · 3 个 reaction ·
查看 actions/setup-node 的全部 Issue
相似的 Issue
-
VerificationGate: ATTRIBUTION quote guard never matches a normal quotation (\b around the quote) 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
danielmiessler/LifeOS#2234 ·
-
T: Bug
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 1/5 1 小时以内 新手友好度 85/100
-
Mend: dependency security vulnerability untriaged
难度 2/5 1-3 小时 新手友好度 70/100