feedback5 R6: add a correctness-only eslint
Flat config for Node and the browser, with unused names as warnings. The run is clean of errors after three small fixes: the lobby spectate path imports ERR, a disable comment for a rule that is not installed is gone, and two atlas regexes spell the BOM as an escape.
This commit is contained in:
1 parent
6b489b1776
commit
babc35b72a
6 files changed
+1035
-5
No files matched your search
@@ -29,7 +29,7 @@ function splitEntry(line) {
|
||||
* @returns {{ lines: string[], pages: AtlasPage[] }}
|
||||
*/
|
||||
export function parseAtlas(text) {
|
||||
const lines = String(text).replace(/^/, '').replace(/\r\n?/g, '\n').split('\n');
|
||||
const lines = String(text).replace(/^\uFEFF/, '').replace(/\r\n?/g, '\n').split('\n');
|
||||
/** @type {AtlasPage[]} */
|
||||
const pages = [];
|
||||
let page = null;
|
||||
@@ -108,7 +108,7 @@ export function normalizeAtlas(text, { pageSize, pma = false, renamePage = null
|
||||
}
|
||||
}
|
||||
const result = out.join('\n');
|
||||
const original = String(text).replace(/^/, '').replace(/\r\n?/g, '\n');
|
||||
const original = String(text).replace(/^\uFEFF/, '').replace(/\r\n?/g, '\n');
|
||||
return { text: result, changed: result !== original, pages: pages.map((p) => (replace.get(p.line) ?? p.name)), missingSize, fixedSize };
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user