Add linting for markdown files (#3646)

I also reworked the Linters section in `CONTRIBUTING.md` a bit and
switched the `prettier` config to a flat config.

Co-authored-by: Veeck <github@veeck.de>
This commit is contained in:
Kristjan ESPERANTO
2024-12-07 10:12:28 +01:00
committed by GitHub
parent 19bd76ab93
commit 5b7b76c877
11 changed files with 252 additions and 22 deletions

View File

@@ -6,22 +6,28 @@ We hold our code to standard, and these standards are documented below.
## Linters
We use prettier for automatic linting of all our files: `npm run lint:prettier`.
We use [prettier](https://prettier.io/) for automatic formatting a lot all our files. The configuration is in our `prettier.config.mjs` file.
To run prettier, use `npm run lint:prettier`.
### JavaScript: Run ESLint
We use [ESLint](https://eslint.org) on our JavaScript files.
The ESLint configuration is in our `eslint.config.mjs` file.
We use [ESLint](https://eslint.org) to lint our JavaScript files. The configuration is in our `eslint.config.mjs` file.
To run ESLint, use `npm run lint:js`.
### CSS: Run StyleLint
We use [StyleLint](https://stylelint.io) to lint our CSS. Our configuration is in our `.stylelintrc` file.
We use [StyleLint](https://stylelint.io) to lint our CSS. The configuration is in our `.stylelintrc.json` file.
To run StyleLint, use `npm run lint:css`.
### Markdown: Run markdownlint
We use [markdownlint-cli2](https://github.com/DavidAnson/markdownlint-cli2) to lint our markdown files. The configuration is in our `.markdownlint.json` file.
To run markdownlint, use `npm run markdownlint:css`.
## Testing
We use [Jest](https://jestjs.io) for JavaScript testing.

View File

@@ -39,4 +39,5 @@ jobs:
npm run test:prettier
npm run test:js
npm run test:css
npm run test:markdown
npm run test