Skip to content

Commit 5af3a5a

Browse files
authored
refactor: update eslint-config-eslint (#229)
* chore: update eslint-config-eslint * fix lint errors * simplify @import pattern * keep multiline var() fallbacks
1 parent f2ee3fd commit 5af3a5a

File tree

5 files changed

+5
-4
lines changed

5 files changed

+5
-4
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
"compute-baseline": "^0.3.1",
9595
"dedent": "^1.5.3",
9696
"eslint": "^9.31.0",
97-
"eslint-config-eslint": "^11.0.0",
97+
"eslint-config-eslint": "^12.0.0",
9898
"eslint-plugin-eslint-plugin": "^6.3.2",
9999
"got": "^14.4.2",
100100
"lint-staged": "^15.2.7",

src/languages/css-source-code.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import { visitorKeys } from "./css-visitor-keys.js";
3333
const commentParser = new ConfigCommentParser();
3434

3535
const INLINE_CONFIG =
36-
/^\s*(?:eslint(?:-enable|-disable(?:(?:-next)?-line)?)?)(?:\s|$)/u;
36+
/^\s*eslint(?:-enable|-disable(?:(?:-next)?-line)?)?(?:\s|$)/u;
3737

3838
/**
3939
* A class to represent a step in the traversal process.

src/rules/no-invalid-properties.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import { isSyntaxMatchError, isSyntaxReferenceError } from "../util.js";
2828
/**
2929
* Regex to match var() functional notation with optional fallback.
3030
*/
31+
// eslint-disable-next-line regexp/no-super-linear-backtracking -- TODO: fix \s*(.+) to match newline characters
3132
const varFunctionPattern = /var\(\s*(--[^,\s)]+)\s*(?:,\s*(.+))?\)/iu;
3233

3334
/**

tools/dedupe-types.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import fs from "node:fs";
2020
//-----------------------------------------------------------------------------
2121

2222
const importRegExp =
23-
/^\s*\*\s*@import\s*\{\s*(?<ids>[^,}]+(?:\s*,\s*[^,}]+)*)\s*\}\s*from\s*"(?<source>[^"]+)"/u;
23+
/^\s*\*\s*@import\s*\{(?<ids>[^,}]+(?:,[^,}]+)*)\}\s*from\s*"(?<source>[^"]+)"/u;
2424

2525
// read files from the command line
2626
const files = process.argv.slice(2);

tools/update-readme.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const allSponsors = await fetchSponsorsMarkdown();
4444
const readme = readFileSync(README_FILE_PATH, "utf8");
4545

4646
let newReadme = readme.replace(
47-
/<!--sponsorsstart-->[\w\W]*?<!--sponsorsend-->/u,
47+
/<!--sponsorsstart-->[\s\S]*?<!--sponsorsend-->/u,
4848
`<!--sponsorsstart-->\n\n${allSponsors}\n<!--sponsorsend-->`,
4949
);
5050

0 commit comments

Comments
 (0)