chore: migrate eslint to flat config, use antfu configs#266
Draft
chore: migrate eslint to flat config, use antfu configs#266
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR migrates the project from traditional ESLint configuration to ESLint flat config using Antfu's opinionated ESLint configuration. This modernizes the linting setup and simplifies configuration management.
- Replaced legacy
.eslintrc.ymlwith moderneslint.config.mjsflat config format - Updated ESLint from v8 to v9 and adopted
@antfu/eslint-configinstead of custom config - Updated ESLint rule references to match new naming conventions (e.g.,
ts/no-var-requires)
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
eslint.config.mjs |
New flat config file with Antfu configuration, React support, and project-specific ignores |
package.json |
Updated ESLint to v9, added Antfu config and React plugins, removed old TypeScript ESLint dependencies |
packages/core/src/index.ts |
Updated ESLint disable comment to use new rule naming convention |
.eslintrc.yml |
Removed legacy ESLint configuration file |
.prettierignore |
Removed file (likely consolidated into ESLint config ignores) |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
PR HealthBuild ✅Detailsesbuild: packages/core/src/index.ts -> packages/core/lib/index.js
esbuild: packages/danbooru/src/index.ts -> packages/danbooru/lib/index.js
esbuild: packages/derpibooru/src/index.ts -> packages/derpibooru/lib/index.js
esbuild: packages/e621/src/index.ts -> packages/e621/lib/index.js
esbuild: packages/gelbooru/src/index.ts -> packages/gelbooru/lib/index.js
esbuild: packages/konachan/src/index.ts -> packages/konachan/lib/index.js
esbuild: packages/local/src/index.ts -> packages/local/lib/index.js
esbuild: packages/lolibooru/src/index.ts -> packages/lolibooru/lib/index.js
esbuild: packages/lolicon/src/index.ts -> packages/lolicon/lib/index.js
esbuild: packages/moehu/src/index.ts -> packages/moehu/lib/index.js
esbuild: packages/pixiv/src/index.ts -> packages/pixiv/lib/index.js
esbuild: packages/safebooru/src/index.ts -> packages/safebooru/lib/index.js
esbuild: packages/sankaku/src/index.ts -> packages/sankaku/lib/index.js
esbuild: packages/yande/src/index.ts -> packages/yande/lib/index.jsLint ❌DetailsOops! Something went wrong! :(
ESLint: 9.32.0
RangeError: Maximum call stack size exceeded
Occurred while linting /home/runner/work/koishi-plugin-booru/koishi-plugin-booru/packages/pixiv/src/utils.tsx:2
Rule: "style/indent"
at Map.get (<anonymous>)
at TokenInfo.getFirstTokenOfLine (file:///home/runner/work/koishi-plugin-booru/koishi-plugin-booru/node_modules/@stylistic/eslint-plugin/dist/rules/indent.js:187:40)
at OffsetStorage.getDesiredIndent (file:///home/runner/work/koishi-plugin-booru/koishi-plugin-booru/node_modules/@stylistic/eslint-plugin/dist/rules/indent.js:245:79)
at OffsetStorage.getDesiredIndent (file:///home/runner/work/koishi-plugin-booru/koishi-plugin-booru/node_modules/@stylistic/eslint-plugin/dist/rules/indent.js:245:46)
at OffsetStorage.getDesiredIndent (file:///home/runner/work/koishi-plugin-booru/koishi-plugin-booru/node_modules/@stylistic/eslint-plugin/dist/rules/indent.js:245:46)
at OffsetStorage.getDesiredIndent (file:///home/runner/work/koishi-plugin-booru/koishi-plugin-booru/node_modules/@stylistic/eslint-plugin/dist/rules/indent.js:245:46)
at OffsetStorage.getDesiredIndent (file:///home/runner/work/koishi-plugin-booru/koishi-plugin-booru/node_modules/@stylistic/eslint-plugin/dist/rules/indent.js:245:46)
at OffsetStorage.getDesiredIndent (file:///home/runner/work/koishi-plugin-booru/koishi-plugin-booru/node_modules/@stylistic/eslint-plugin/dist/rules/indent.js:245:46)
at OffsetStorage.getDesiredIndent (file:///home/runner/work/koishi-plugin-booru/koishi-plugin-booru/node_modules/@stylistic/eslint-plugin/dist/rules/indent.js:245:46)
at OffsetStorage.getDesiredIndent (file:///home/runner/work/koishi-plugin-booru/koishi-plugin-booru/node_modules/@stylistic/eslint-plugin/dist/rules/indent.js:245:46) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.