Page MenuHomeSealhub

Jak ustawić linting i unit testy zintegrowane z Sealhubem
Updated 170 Days AgoPublic

This article contains instructions for setting up linting using ESLint, unit testing, and integrating both of these processes with Arcanist and Phabricator.

We assume that the repository where linting is being implemented is using Typescript.

Dodawanie lintera do nowego repo

Jeżeli tworzysz własne repo, podążaj za poniższymi instrukcjami. Jeżeli nie, to zignoruj poniższe instrukcje.

Dodaj takie pliki do repo projektu:

https://hub.sealcode.org/diffusion/PLAY/browse/hotwire/.arclint
https://hub.sealcode.org/diffusion/PLAY/browse/hotwire/.arcconfig
https://hub.sealcode.org/diffusion/PLAY/browse/hotwire/.eslintrc.js

Dodaj depsy:

npm install --save-dev prettier eslint @typescript-eslint/eslint-plugin eslint-plugin-prettier@latest eslint-config-prettier eslint-plugin-prettier

Od teraz możesz sprawdzić wynik lintowania za pomocą:

arc lint

Dodatkowo, wyniki lintowania będą się wyświetlały w diffie, ułatwiając zadnaie recenzentom i autorom diffów

Last Author
kuba-orlik
Last Edited
Oct 30 2023, 14:11

Event Timeline

kuba-orlik created this object.
kuba-orlik edited the content of this document. (Show Details)
piotr-ptaszynski edited the content of this document. (Show Details)
piotr-ptaszynski edited the content of this document. (Show Details)
kuba-orlik edited the content of this document. (Show Details)
kuba-orlik edited the content of this document. (Show Details)

Dodałem te pluginy do AUR, więc jak ktoś korzysta z Archa to może sobie je pobrać.

Więc w moim przypadku instrukcja wygląda następująco

yay -S arcanist arcanist-linters-git arc-unit-mocha-git

a aktualizacja jest normalnie przez

yay

@kuba-orlik

@fraunos najs! 💪 Dodasz to do treści powyższego artykułu, aby nie umknęło?

kuba-orlik edited the content of this document. (Show Details)
kuba-orlik edited the content of this document. (Show Details)
kuba-orlik edited the content of this document. (Show Details)
kuba-orlik edited the content of this document. (Show Details)
kuba-orlik edited the content of this document. (Show Details)
kuba-orlik edited the content of this document. (Show Details)
kuba-orlik edited the content of this document. (Show Details)