Skip to content

Commit

Permalink
chore: update to eslint v9
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed May 1, 2024
1 parent 2f22dea commit c11d953
Show file tree
Hide file tree
Showing 16 changed files with 618 additions and 1,310 deletions.
6 changes: 0 additions & 6 deletions .eslintignore

This file was deleted.

12 changes: 0 additions & 12 deletions .eslintrc

This file was deleted.

4 changes: 2 additions & 2 deletions bin/jiti.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/usr/bin/env node

const { resolve } = require("path");
const { resolve } = require("node:path");

const script = process.argv.splice(2, 1)[0];

if (!script) {
// eslint-disable-next-line no-console
console.error("Usage: jiti <path> [...arguments]");
process.exit(1);
}
Expand Down
10 changes: 10 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import unjs from "eslint-config-unjs";

export default unjs({
ignores: [
"test/fixtures/error-*"
],
rules: {
"unicorn/no-null": 0
},
});
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ function onError(err) {
throw err; /* ↓ Check stack trace ↓ */
}

module.exports = function (filename, opts) {
module.exports = function jiti(filename, opts) {
const jiti = require("../dist/jiti");

opts = { onError, ...opts };
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"dev": "pnpm clean && pnpm webpack --watch",
"jiti": "JITI_DEBUG=1 JITI_CACHE=false JITI_REQUIRE_CACHE=false ./bin/jiti.js",
"jiti:legacy": "JITI_DEBUG=1 npx node@12 ./bin/jiti.js",
"lint": "eslint --ext .ts,.js . && prettier -c src lib test stubs",
"lint:fix": "eslint --fix --ext .ts,.js . && prettier -w src lib test stubs",
"lint": "eslint . && prettier -c src lib test stubs",
"lint:fix": "eslint --fix . && prettier -w src lib test stubs",
"release": "pnpm build && pnpm test && changelogen --release --push && npm publish",
"test": "pnpm lint && vitest run --coverage && pnpm test:bun",
"test:bun": "bun --bun test test/bun"
Expand Down Expand Up @@ -53,8 +53,8 @@
"create-require": "^1.1.1",
"destr": "^2.0.3",
"escape-string-regexp": "^5.0.0",
"eslint": "^8.57.0",
"eslint-config-unjs": "^0.2.1",
"eslint": "^9.1.1",
"eslint-config-unjs": "0.3.0-rc.7",
"esm": "^3.2.25",
"estree-walker": "^3.0.3",
"execa": "^8.0.1",
Expand All @@ -78,4 +78,4 @@
"webpack-cli": "^5.1.4"
},
"packageManager": "pnpm@8.15.8"
}
}
Loading

0 comments on commit c11d953

Please sign in to comment.