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

相対import部分を修正 #2417

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jdkfx
Copy link
Contributor

@jdkfx jdkfx commented Dec 16, 2024

内容

  • 同じ親のディレクトリでない場合のimport文を修正
    • ../のように相対パスでimportしている部分を@/をつけて絶対パスにする

関連 Issue

ref #295

  • このPRでは同じ親のディレクトリなのに@/でimportしている部分は検知していない

スクリーンショット・動画など

その他

  • 修正のためにサードパーティのESLintプラグインを入れている
  • VOICEVOX内でのサードパーティプラグインの扱いがわからないため、どんなルールで修正を行なったかという共有のためにもPRに含めている

@voicevox-preview-pages
Copy link

voicevox-preview-pages bot commented Dec 16, 2024

🚀 プレビュー用ページを作成しました 🚀

更新時点でのコミットハッシュ:6f2fc37

@@ -92,6 +92,14 @@ module.exports = {
},
],
"import/order": "error",
"no-relative-import-paths/no-relative-import-paths": [
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"import/no-relative-parent-imports": "error"の設定だけで確認してみました。
見てくれる範囲を広くする方法がないか考えてみます。

eslint-plugin-importでのESLintエラー
> [email protected] lint
> eslint --ext .js,.vue,.ts,.mts *.config.* src tests build .storybook


/Users/jdkfx/Desktop/workspace/voicevox/src/components/Dialog/EngineManageDialog.vue
  270:29  error  Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move `EngineManageDialog.vue` to same directory as `../Base/BaseToggleGroup.vue` or consider making `../Base/BaseToggleGroup.vue` a package          import/no-relative-parent-imports
  271:33  error  Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move `EngineManageDialog.vue` to same directory as `../Base/BaseToggleGroupItem.vue` or consider making `../Base/BaseToggleGroupItem.vue` a package  import/no-relative-parent-imports

/Users/jdkfx/Desktop/workspace/voicevox/src/components/Menu/ContextMenu/Presentation.vue
  31:22  error  Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move `Presentation.vue` to same directory as `../MenuItem.vue` or consider making `../MenuItem.vue` a package  import/no-relative-parent-imports

/Users/jdkfx/Desktop/workspace/voicevox/src/components/Menu/MenuBar/MenuBar.vue
  33:24  error  Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move `MenuBar.vue` to same directory as `../MenuButton.vue` or consider making `../MenuButton.vue` a package  import/no-relative-parent-imports

/Users/jdkfx/Desktop/workspace/voicevox/src/components/Sing/ToolBar/ToolBar.vue
  163:37  error  Relative imports from parent directories are not allowed. Please either pass what you're importing through at runtime (dependency injection), move `ToolBar.vue` to same directory as `../PlayheadPositionDisplay.vue` or consider making `../PlayheadPositionDisplay.vue` a package  import/no-relative-parent-imports

✖ 5 problems (5 errors, 0 warnings)

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