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

Add eslint-plugin-import #241

Open
Mouvedia opened this issue Oct 17, 2023 · 5 comments
Open

Add eslint-plugin-import #241

Mouvedia opened this issue Oct 17, 2023 · 5 comments
Labels
status: ask to implement ask before implementing as may no longer be relevant

Comments

@Mouvedia
Copy link
Member

Mouvedia commented Oct 17, 2023

What is the problem you're trying to solve?

  1. ordering imports, exports last, etc.
  2. establishing guidelines
  3. not having to enforce them—anymore—during code reviews

What solution would you like to see?

eslint-plugin-import - order or https://github.com/lydell/eslint-plugin-simple-import-sort/
https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/exports-last.md
https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-unused-modules.md

after v16
https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-commonjs.md

see also

stylelint/stylelint#6995
stylelint/stylelint#7211 (comment)

@ybiquitous
Copy link
Member

Thanks for opening the issue. Sounds good to me. 👍🏼

@Mouvedia
Copy link
Member Author

Mouvedia commented Oct 17, 2023

@ybiquitous stylelint/stylelint#6942
Should it remain stylelint specific? If so this issue can be closed.
If not it will have to be removed on stylelint side.

@ybiquitous
Copy link
Member

ybiquitous commented Oct 18, 2023

Should it remain stylelint specific?

I think we should use the same rule for importing within the organization. So, this proposal makes sense.

But adding the importing rules to stylelint first is a good try. If so, people can realize the value of the new rules.
(stylelint has already used eslint-plugin-import in the v16 branch)

@Mouvedia
Copy link
Member Author

  1. stylelint/stylelint: PR
  2. after merge, pick the ones relevant for the org
  3. PR here
  4. stylelint/stylelint: update dependency
  5. stylelint/stylelint: removal of the duplicates

Sounds good?

@ybiquitous
Copy link
Member

Yes, but can you please wait for PRs (rewriting to ESM) into the v16 branch? Probably, so many conflicts would occur.

@jeddy3 jeddy3 changed the title proposal: add eslint-plugin-import Add eslint-plugin-import Nov 5, 2023
@jeddy3 jeddy3 added type: refactor status: ask to implement ask before implementing as may no longer be relevant and removed status: needs discussion triage needs further discussion type: refactor labels Jan 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ask to implement ask before implementing as may no longer be relevant
Projects
None yet
Development

No branches or pull requests

3 participants