Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: migrate to eslint v9 #150

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

6 changes: 0 additions & 6 deletions .eslintrc

This file was deleted.

9 changes: 9 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import unjs from "eslint-config-unjs";

export default unjs({
ignores: ["dist", "node_modules", "src/_parser.ts", "coverage"],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure dist and node_modules are already ignored (otherwise, we should ignore them in the shared config).

coverage should be ignore in the shared config.

Why ignoring src/_parser.ts.

Copy link
Author

@shinGangan shinGangan Jul 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @Barbapapazes , thank you for your comment.

I checked the settings for dist and coverage in eslint-config-unjs. Therefore, I will delete it.

However, with the current settings, node_modules was not included in this (I don't know why).

src/_parser.ts was defined in the deleted .eslintignore.
I don't know why I added it, so I left it as is.

rules: {
// https://github.com/sindresorhus/eslint-plugin-unicorn
"unicorn/no-process-exit": 0,
},
});
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"scripts": {
"build": "unbuild",
"dev": "vitest dev",
"lint": "eslint --cache --ext .ts,.js,.mjs,.cjs . && prettier -c src test",
"lint:fix": "eslint --cache --ext .ts,.js,.mjs,.cjs . --fix && prettier -c src test -w",
"lint": "eslint . && prettier -c src test",
"lint:fix": "eslint . --fix && prettier -c src test -w",
"prepack": "pnpm run build",
"play": "jiti ./playground/cli.ts",
"release": "pnpm test && changelogen --release --push && npm publish",
Expand All @@ -33,12 +33,12 @@
"consola": "^3.2.3"
},
"devDependencies": {
"@types/node": "^20.12.7",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is not related to this PR.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reverted in this commit: 4c0688c

"@types/node": "^20.14.2",
"@vitest/coverage-v8": "^1.5.2",
"automd": "^0.3.7",
"changelogen": "^0.5.5",
"eslint": "^8.57.0",
"eslint-config-unjs": "^0.2.1",
"eslint": "^9.4.0",
"eslint-config-unjs": "^0.3.2",
"jiti": "^1.21.0",
"prettier": "^3.2.5",
"scule": "^1.3.0",
Expand Down
Loading