Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 26, 2025

Enforce alphabetical ordering of import statements across the codebase using ESLint.

Changes

  • Added eslint-plugin-simple-import-sort to dev dependencies
  • Configured simple-import-sort/imports and simple-import-sort/exports rules in eslint.config.mjs
  • Applied automatic sorting to 130+ files using eslint --fix

Behavior

The plugin groups and sorts imports as follows:

// External packages, sorted alphabetically
import alertifyjs from 'alertifyjs'
import debounce from 'debounce'
import throttle from 'throttleit'

// Blank line separator

// Local imports, sorted alphabetically
import ContextMenu from '../control/ContextMenu'
import ToolBar from '../control/ToolBar'
import forwardMethods from '../forwardMethods'

Import order violations are now caught by ESLint and auto-fixable with --fix.

Original prompt

ESLintまたはそのプラグインをつかってimport文をアルファベット順に並べる


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: ledsun <1079508+ledsun@users.noreply.github.com>
Copilot AI changed the title [WIP] Add ESLint rule to sort imports alphabetically Add automatic import sorting with eslint-plugin-simple-import-sort Oct 26, 2025
Copilot AI requested a review from ledsun October 26, 2025 11:50
@ledsun ledsun marked this pull request as ready for review October 26, 2025 11:58
@ledsun ledsun merged commit 01dbaf7 into stable/4 Oct 26, 2025
2 checks passed
@ledsun ledsun deleted the copilot/sort-imports-alphabetically branch November 5, 2025 00:01
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.

2 participants