
저장을 했을 때, import 정렬이 되지 않는다.

prettier는 분명히 정상적으로 동작하고 있다.
다른 간격이라던가 tab같은 prettier 설정은 잘 동작하고 있다.
에러를 출력하는 eslint 설정
// .eslintrc.json
{
// ..
"import/order": [
"error",
{
"groups": [
["builtin", "external"],
["internal", "parent", "sibling", "index"],
["object"],
["type"]
],
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
]
}
정렬을 하는 eslint 설정
"sort-imports": [
"error",
{
"ignoreDeclarationSort": true,
"ignoreMemberSort": false
}
],
정상적으로 설정이 되어있다.
// settings.json
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "always"
},
// settings.json
"eslint.codeActionsOnSave.rules": [
"source.fixAll.eslint"
],
위 설 정을정거거하니해결이 되었다. 위 설정을 삭제하면, eslintrc 파일의 규칙대로 fix가 된다.