Upgrade eslint (#1014)

It's apparently forced now to use the eslint.config.js instead of
.eslintrc

It got more strict with requiring the underscore on unused vars like
`catch(_err)` , but that was all

Closes #1012
Closes #995
Closes #992

## Launch Checklist

<!-- Thanks for the PR! Feel free to add or remove items from the
checklist. -->


 - [ ] Briefly describe the changes in this PR.
 - [ ] Link to related issues.
- [ ] Include before/after visuals or gifs if this PR includes visual
changes.
 - [ ] Write tests for all new functionality.
 - [ ] Add an entry to `CHANGELOG.md` under the `## main` section.
This commit is contained in:
Birk Skyum
2025-01-21 16:21:30 +01:00
committed by GitHub
parent b429bb16d7
commit cd7d607f13
20 changed files with 467 additions and 598 deletions

View File

@@ -1,4 +1,4 @@
// @ts-ignore - this is a fork of jsonlint
// @ts-expect-error - this is a fork of jsonlint
import jsonlint from 'jsonlint';
import CodeMirror, { MarkerRange } from 'codemirror';
import jsonToAst from 'json-to-ast';
@@ -33,7 +33,7 @@ CodeMirror.registerHelper("lint", "json", (text: string) => {
try {
jsonlint.parse(text);
}
catch(e) {
catch(_e) {
// Do nothing we catch the error above
}
return found;
@@ -55,7 +55,7 @@ CodeMirror.registerHelper("lint", "mgl", (text: string, opts: any, doc: any) =>
try {
parser.parse(text);
}
catch (e) {
catch (_e) {
// ignore errors
}

View File

@@ -1,4 +1,3 @@
// @ts-ignore
import style from './style'
export function initialStyleUrl() {