Skip to content

Commit

Permalink
chore: switch to eslint-config-eslint v11
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjermanovic committed Jun 10, 2024
1 parent 7d906e6 commit 79f1634
Show file tree
Hide file tree
Showing 18 changed files with 33 additions and 31 deletions.
2 changes: 2 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import eslintConfigESLint from "eslint-config-eslint";
import eslintConfigESLintFormatting from "eslint-config-eslint/formatting";
import globals from "globals";

export default [
Expand All @@ -11,6 +12,7 @@ export default [
]
},
...eslintConfigESLint,
eslintConfigESLintFormatting,
{
files: ["tests/lib/**"],
languageOptions: {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
"@rollup/plugin-node-resolve": "^11.2.0",
"c8": "^7.11.0",
"chai": "^4.3.6",
"eslint": "^9.1.1",
"eslint-config-eslint": "^10.0.0",
"eslint": "^9.4.0",
"eslint-config-eslint": "^11.0.0",
"eslint-release": "^3.2.0",
"esprima-fb": "^8001.2001.0-dev-harmony-fb",
"globals": "^15.1.0",
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/acorn-after-espree.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
//------------------------------------------------------------------------------

import * as acorn from "acorn";
import assert from "assert";
import assert from "node:assert";


//------------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/commonjs.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
// Requirements
//------------------------------------------------------------------------------

const assert = require("assert");
const assert = require("node:assert");
const espree = require("../../dist/espree.cjs");


Expand Down
6 changes: 3 additions & 3 deletions tests/lib/ecma-features.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
// Requirements
//------------------------------------------------------------------------------

import assert from "assert";
import path from "path";
import assert from "node:assert";
import path from "node:path";
import * as espree from "../../espree.js";
import shelljs from "shelljs";
import { fileURLToPath, pathToFileURL } from "url";
import { fileURLToPath, pathToFileURL } from "node:url";
import tester from "./tester.js";


Expand Down
8 changes: 4 additions & 4 deletions tests/lib/ecma-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
// Requirements
//------------------------------------------------------------------------------

import fs from "fs";
import path from "path";
import fs from "node:fs";
import path from "node:path";
import shelljs from "shelljs";
import tester from "./tester.js";
import * as espree from "../../espree.js";
import assert from "assert";
import { fileURLToPath, pathToFileURL } from "url";
import assert from "node:assert";
import { fileURLToPath, pathToFileURL } from "node:url";


// eslint-disable-next-line no-underscore-dangle -- Conventional
Expand Down
8 changes: 4 additions & 4 deletions tests/lib/libraries.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
// Requirements
//------------------------------------------------------------------------------

import path from "path";
import path from "node:path";
import shelljs from "shelljs";
import tester from "./tester.js";
import * as espree from "../../espree.js";
import assert from "assert";
import { fileURLToPath } from "url";
import { readFile } from "fs/promises";
import assert from "node:assert";
import { fileURLToPath } from "node:url";
import { readFile } from "node:fs/promises";

// eslint-disable-next-line no-underscore-dangle -- Conventional
const __dirname = path.dirname(fileURLToPath(import.meta.url));
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// Requirements
//------------------------------------------------------------------------------

import assert from "assert";
import assert from "node:assert";
import { normalizeOptions, getLatestEcmaVersion } from "../../lib/options.js";


Expand Down
4 changes: 2 additions & 2 deletions tests/lib/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
// Requirements
//------------------------------------------------------------------------------

import fs from "fs";
import fs from "node:fs";
import tester from "./tester.js";
import * as espree from "../../espree.js";
import assert from "assert";
import assert from "node:assert";


const allPiecesJson = JSON.parse(fs.readFileSync("./tests/fixtures/parse/all-pieces.json", "utf8"));
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/supported-ecmaversions.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// Requirements
//------------------------------------------------------------------------------

import assert from "assert";
import assert from "node:assert";
import * as espree from "../../espree.js";


Expand Down
2 changes: 1 addition & 1 deletion tests/lib/syntax.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Requirements
//------------------------------------------------------------------------------

import assert from "assert";
import assert from "node:assert";
import * as espree from "../../espree.js";


Expand Down
2 changes: 1 addition & 1 deletion tests/lib/tester-test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import assert from "assert";
import assert from "node:assert";
import tester from "./tester.js";

const { getRaw, getAstCode } = tester;
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/tester.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// Requirements
//------------------------------------------------------------------------------

import assert from "assert";
import assert from "node:assert";
import * as espree from "../../espree.js";


Expand Down
2 changes: 1 addition & 1 deletion tests/lib/tokenize.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

import tester from "./tester.js";
import * as espree from "../../espree.js";
import assert from "assert";
import assert from "node:assert";
import letResult from "../fixtures/tokenize/let-result.tokens.js";
import constResultTokens from "../fixtures/tokenize/const-result.tokens.js";
import regexpUResultTokens from "../fixtures/tokenize/regexp-u-result.tokens.js";
Expand Down
4 changes: 2 additions & 2 deletions tools/create-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

import shelljs from "shelljs";
import { parse } from "../espree.js";
import path from "path";
import { fileURLToPath } from "url";
import path from "node:path";
import { fileURLToPath } from "node:url";

//------------------------------------------------------------------------------
// Initialization
Expand Down
6 changes: 3 additions & 3 deletions tools/update-ecma-version-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
// Imports
//------------------------------------------------------------------------------

import path from "path";
import { fileURLToPath } from "url";
import util from "util";
import path from "node:path";
import { fileURLToPath } from "node:url";
import util from "node:util";
import shelljs from "shelljs";
import tester from "../tests/lib/tester.js";

Expand Down
4 changes: 2 additions & 2 deletions tools/update-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

import shelljs from "shelljs";
import tester from "../tests/lib/tester.js";
import path from "path";
import { fileURLToPath } from "url";
import path from "node:path";
import { fileURLToPath } from "node:url";

//------------------------------------------------------------------------------
// Helpers
Expand Down
2 changes: 1 addition & 1 deletion tools/update-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @author Nicholas C. Zakas
*/

import fs from "fs";
import fs from "node:fs";

/*
* IMPORTANT: This must be run *before* Rollup so the built package will have
Expand Down

0 comments on commit 79f1634

Please sign in to comment.