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: sort import by ESLint #134

Merged
merged 5 commits into from
Feb 11, 2025
Merged

Conversation

Debbl
Copy link
Contributor

@Debbl Debbl commented Feb 10, 2025

image

根据文档要求使用 ESLint 格式化 import 语句

相关文档 https://perfectionist.dev/rules/sort-imports

具体格式化规则

"perfectionist/sort-imports": [
  "error",
  {
    "groups": [
      ["builtin", "external"],
      "shared",
      "src",
      "unknown"
    ],
    "customGroups": { 
      "value": {
        "shared": ["^@/"],
        "src": ["#/*"]
      }
     }
  }
]

["builtin", "external"] Node 原生模块和 node_modules 模块
"shared" 自定义模块,以 @/ 开头
"src" 自定义模块,以 #/ 开头
"unknown" 其他没有在 groups 里的

Copy link

vercel bot commented Feb 10, 2025

@Debbl is attempting to deploy a commit to the OpenBuild Team on Vercel.

A member of the Team first needs to authorize it.

@ourai ourai self-requested a review February 11, 2025 05:26
@ourai ourai self-assigned this Feb 11, 2025
@ourai ourai added the enhancement New feature or request label Feb 11, 2025
@ourai ourai added this to the 2025W07 milestone Feb 11, 2025
@ourai ourai merged commit 5a09537 into openbuildxyz:test Feb 11, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants