Skip to content

Comments

chore: migrate eslint to flat config, use antfu configs#266

Draft
MaikoTan wants to merge 3 commits intomainfrom
chore/eslint-flat-config
Draft

chore: migrate eslint to flat config, use antfu configs#266
MaikoTan wants to merge 3 commits intomainfrom
chore/eslint-flat-config

Conversation

@MaikoTan
Copy link
Member

@MaikoTan MaikoTan commented Aug 2, 2025

No description provided.

@MaikoTan MaikoTan requested a review from Copilot August 2, 2025 02:10
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.yml with modern eslint.config.mjs flat config format
  • Updated ESLint from v8 to v9 and adopted @antfu/eslint-config instead 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>
@github-actions
Copy link

github-actions bot commented Aug 2, 2025

PR Health

Build ✅

Details
esbuild: 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.js

Lint ❌

Details
Oops! 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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant