Skip to content

feat(typescript-eslint): add no-restricted-imports rule#98

Open
dev-cruz wants to merge 3 commits into
mainfrom
feat/add-no-restricted-imports-rule
Open

feat(typescript-eslint): add no-restricted-imports rule#98
dev-cruz wants to merge 3 commits into
mainfrom
feat/add-no-restricted-imports-rule

Conversation

@dev-cruz

@dev-cruz dev-cruz commented Aug 8, 2024

Copy link
Copy Markdown
Contributor
  • O que esta PR faz / Porque nós precisamos fazer isso?
    Adiciona a regra no-restricted-imports para proibir imports relativos pois deixam muito difícil de localizar o arquivo dentro do projeto e dificultam quando movemos um arquivo.

  • Que tipo de mudança foi introduzida?

  • Bugfix 🐛
  • Feature ✨
  • Refactor 🔨
  • Build-Mudança relatada 🔖
  • Outro, por favor descrever:
  • Que tipo de teste foi implementado? ✅
  • Unitário
  • Integração/Headless
  • Nenhum, porque:

Em caso de dúvidas consultar a documentação.

@dev-cruz
dev-cruz requested review from vhoyer August 8, 2024 16:33
@dev-cruz dev-cruz added the ask Solution hasn't been fully figured out, the developer feels uncertain about it, requiring review label Aug 8, 2024
@dev-cruz
dev-cruz requested a review from lourencogui August 8, 2024 16:34
Comment on lines +26 to +28
"no-restricted-imports": ["error", {
"patterns": [".*"]
}],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

qualquer import relativo realmente é ruim?
eu gostaria de conseguir pelo menos manter o ./* e proibir ../* e ./**/*.

Acha que faz sentido?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Faz sentido, acho que no front é mais comum os imports com ./*

@dev-cruz
dev-cruz requested a review from vitebo August 8, 2024 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ask Solution hasn't been fully figured out, the developer feels uncertain about it, requiring review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants