check / check (push) Waiting to run
Replaces #559, which conflicted. Model: opus-5-5
19 lines
714 B
JavaScript
19 lines
714 B
JavaScript
// ESLint configuration for static/js/. script/lint and the image build run
|
|
// ESLint in the Dockerfile's js-lint stage, never on the host.
|
|
//
|
|
// The rules are the ones the JavaScript styleguide linked from
|
|
// REPO_POLICIES.md states that a linter can check: const for everything,
|
|
// let only for a variable that is reassigned, never var.
|
|
export default [
|
|
// Alpine.js, extracted from 3p/ by make assets; not ours to lint.
|
|
{ ignores: ["static/js/alpine.min.js"] },
|
|
{
|
|
// The pages load static/js/app.js as a classic script, not a module.
|
|
languageOptions: { sourceType: "script" },
|
|
rules: {
|
|
"no-var": "error",
|
|
"prefer-const": "error",
|
|
},
|
|
},
|
|
];
|