Skip to content

Commit

Permalink
refactor: switch to eslint-config-eslint v11 (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjermanovic authored Jun 10, 2024
1 parent 6736f3d commit 3b7c0af
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion bin/create-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { ConfigGenerator } from "../lib/config-generator.js";
import { findPackageJson } from "../lib/utils/npm-utils.js";
import process from "process";
import process from "node:process";


const cwd = process.cwd();
Expand Down
4 changes: 3 additions & 1 deletion 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";

export default [
{
Expand All @@ -7,5 +8,6 @@ export default [
"tests/fixtures/"
]
},
...eslintConfigESLint
...eslintConfigESLint,
eslintConfigESLintFormatting
];
8 changes: 4 additions & 4 deletions lib/config-generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
* @fileoverview to generate config files.
* @author 唯然<[email protected]>
*/
import process from "process";
import path from "path";
import { spawnSync } from "child_process";
import { writeFile } from "fs/promises";
import process from "node:process";
import path from "node:path";
import { spawnSync } from "node:child_process";
import { writeFile } from "node:fs/promises";
import enquirer from "enquirer";
import { isPackageTypeModule, installSyncSaveDev, fetchPeerDependencies, findPackageJson } from "./utils/npm-utils.js";
import { getShorthandName } from "./utils/naming.js";
Expand Down
4 changes: 2 additions & 2 deletions lib/utils/npm-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
// Requirements
//------------------------------------------------------------------------------

import fs from "fs";
import fs from "node:fs";
import spawn from "cross-spawn";

import path from "path";
import path from "node:path";
import * as log from "./logging.js";

//------------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
},
"devDependencies": {
"@vitest/coverage-v8": "^1.3.1",
"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",
"lint-staged": "^12.1.2",
"memfs": "^3.4.0",
Expand Down
2 changes: 1 addition & 1 deletion tests/_utils/in-memory-fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// Requirements
//-----------------------------------------------------------------------------

import path from "path";
import path from "node:path";
import memfs from "memfs";

const { Volume, createFsFromVolume } = memfs;
Expand Down
2 changes: 1 addition & 1 deletion tests/config-snapshots.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import { ConfigGenerator } from "../lib/config-generator.js";
import { expect, describe, test } from "vitest";
import { fileURLToPath } from "node:url";
import { join } from "path";
import { join } from "node:path";

const __filename = fileURLToPath(import.meta.url); // eslint-disable-line no-underscore-dangle -- commonjs convention

Expand Down
2 changes: 1 addition & 1 deletion tests/utils/npm-utils.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
} from "../../lib/utils/npm-utils.js";
import { defineInMemoryFs } from "../_utils/in-memory-fs.js";
import { assert, describe, afterEach, it } from "vitest";
import fs from "fs";
import fs from "node:fs";

//------------------------------------------------------------------------------
// Helpers
Expand Down

0 comments on commit 3b7c0af

Please sign in to comment.