Skip to content

Commit 68445fa

Browse files
committed
Fix ESLint config
1 parent acc8345 commit 68445fa

File tree

5 files changed

+27
-5
lines changed

5 files changed

+27
-5
lines changed

Diff for: eslint.config.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import js from "@eslint/js";
22
import vitest from "@vitest/eslint-plugin";
3+
import globals from "globals";
34

45
export default [
56
{
@@ -15,8 +16,13 @@ export default [
1516
plugins: {
1617
vitest,
1718
},
19+
languageOptions: {
20+
globals: {
21+
...globals.node,
22+
},
23+
},
1824
rules: {
19-
...js.recommended,
25+
...js.configs.recommended.rules,
2026
...vitest.configs.recommended.rules,
2127
"arrow-body-style": "error",
2228
curly: "error",

Diff for: package-lock.json

+17-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: package.json

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"coffeescript": "2.7.0",
1515
"eslint": "9.20.0",
1616
"everything.js": "1.0.3",
17+
"globals": "15.15.0",
1718
"prettier": "3.4.2",
1819
"test262-parser-tests": "0.0.5",
1920
"tsd": "0.31.2",

Diff for: test/index.test.js

+1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ function printInvisibles(string) {
7171
.replace(/\r/g, "␍")
7272
.replace(/\n/g, "␊")
7373
.replace(
74+
// eslint-disable-next-line no-control-regex
7475
/[\x00-\x1f]/g,
7576
(char) =>
7677
`\\x${char.charCodeAt(0).toString(16).padStart(2, "0").toUpperCase()}`,

Diff for: test/very-long-tokens.test.js

+1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ describe("Very long tokens", () => {
7575
// `eval(`2${"0".repeat(308)}`)` gives `Infinity`, and that’s not even close
7676
// to getting a `Maximum call stack size exceeded`. And you can’t have that
7777
// many decimals either.
78+
// eslint-disable-next-line no-loss-of-precision
7879
expect(2e308).toBe(Infinity);
7980
expect(run(`2${"0".repeat(308)}`)).toBe("NumericLiteral");
8081
expect(() =>

0 commit comments

Comments
 (0)