How to use the ESLint annotations?
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Documentazione
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- eslint, github-actions, node.js, typescript
- Ambito
- ci-cd, documentation
Direzione di ricerca
Inizia esaminando lo YAML del workflow e gli script di package.json mostrati nell’issue, in particolare il comando eslint:github-action e il relativo output. Controlla la documentazione esistente del repository o il comportamento dell’action per quanto riguarda le annotazioni ESLint, quindi documenta se questa configurazione dovrebbe produrre annotazioni nelle pull request e quale configurazione è necessaria.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- TypeScript
- Stelle
- 5k
- Fork
- 1.7k
- Merge medio
- 2g 11h
- PR unite (30g)
- 3
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di actions/setup-node
-
feature request
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
actions/setup-node#1531 · 1 commento · 4 reazioni ·
-
feature request
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
actions/setup-node#1634 · 1 commento ·
-
actions/setup-node#1628 · 3 commenti · 1 assegnatario ·
-
`npm config get cache` fails with `EBADDEVENGINES` when requiring newer npm versions in `devEngines` Apertafeature request
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
actions/setup-node#1553 · 12 commenti · 2 reazioni ·
-
feature request
Difficoltà 3/5 1-2 giorni Idoneità per principianti 38/100
actions/setup-node#1428 · 1 commento · 3 reazioni ·
Tutte le issue di actions/setup-node
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
safetrustcr/dApp-SafeTrust#426 ·
-
area:workflow bug ready-for-agent
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
fil-donadoni/tolaria#4409 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
Fission-AI/OpenSpec#1960 ·
-
Add dependabot Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
corsairdev/corsair#1764 ·