Move eslint/stylelint to static-code tests

stylelint 16 causes a deadlock/crash in esbuild [1]. There's no movement
on that issue, and we want stylelint 16 to be able to support the
Browser Baseline 2023.

Follow 1a28b31828 and
move the linters into test/static-code. This also starts to lint files
which are outside of esbuild's realm, such as documentation and
examples.

[1] https://github.com/evanw/esbuild/issues/3542
This commit is contained in:
Martin Pitt 2024-02-07 18:51:46 +01:00 committed by Jelle van der Waa
parent 8256d6f18f
commit 15be883595
3 changed files with 3 additions and 18 deletions

View file

@ -77,7 +77,7 @@ remove manually the symlink:
Cockpit Starter Kit uses [ESLint](https://eslint.org/) to automatically check
JavaScript code style in `.js` and `.jsx` files.
eslint is executed within every build.
eslint is executed as part of `test/static-code`, aka. `make codecheck`.
For developer convenience, the ESLint can be started explicitly by:
@ -94,7 +94,7 @@ Rules configuration can be found in the `.eslintrc.json` file.
Cockpit uses [Stylelint](https://stylelint.io/) to automatically check CSS code
style in `.css` and `scss` files.
styleint is executed within every build.
styleint is executed as part of `test/static-code`, aka. `make codecheck`.
For developer convenience, the Stylelint can be started explicitly by:
@ -106,12 +106,6 @@ Violations of some rules can be fixed automatically by:
Rules configuration can be found in the `.stylelintrc.json` file.
During fast iterative development, you can also choose to not run eslint/stylelint.
This speeds up the build and avoids build failures due to e. g. ill-formatted
css or other issues:
$ ./build.js -es
# Running tests locally
Run `make check` to build an RPM, install it into a standard Cockpit test VM