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

feat: support flat config and eslint v9 #1073

Merged
merged 13 commits into from Apr 18, 2024
Merged

Conversation

kazupon
Copy link
Contributor

@kazupon kazupon commented Mar 26, 2024

background

The flat config will be supported officially in eslint v9 release, and the current config style will be removed in eslint v10.
We can already use flat config in recent versions of eslint v8.

https://eslint.org/docs/latest/use/configure/configuration-files-new

And some deprecated APIs was dropped :

https://eslint.org/blog/2023/09/preparing-custom-rules-eslint-v9/

about implementation

This PR supports the existing config style while also supporting flat config, and eslint v9 support

PS

I've just supported eslint v9 and eslint v8.x compatibility: 2024-04-11

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -1,6 +1,6 @@
import { defineLoader } from "vitepress";
import recommended from "../../src/configs/recommended";
import { rules } from "../.vitepress/rulesForSidebar";
import { rules as baseRules } from "../../src/configs/base.js";
Copy link
Contributor Author

Choose a reason for hiding this comment

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

vitepress support only esm, so require is not available. I’ve changed rules are imported.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've referenced eslint-plugin-vue for implementation.
vuejs/eslint-plugin-vue#2407
vuejs/eslint-plugin-vue#2436

@@ -6,6 +6,7 @@
"strict": true,
"esModuleInterop": true,
"resolveJsonModule": true,
"declaration": true,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

To support DX in flat config, types are now also generated.

@kazupon kazupon changed the title feat: support flat config feat: support flat config and eslint v9 Apr 11, 2024
@kazupon
Copy link
Contributor Author

kazupon commented Apr 11, 2024

I've just supported eslint v9 and eslint v8.x compatibility

@vhoyer vhoyer merged commit 3edcbc0 into vue-a11y:main Apr 18, 2024
2 checks passed
@vhoyer
Copy link
Collaborator

vhoyer commented Apr 18, 2024

release on 2.3.0

@kazupon
Copy link
Contributor Author

kazupon commented Apr 19, 2024

Thanks!

@kazupon kazupon deleted the feat/flat-config branch April 19, 2024 04:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants