stylelint / eslint-config-stylelint

Stylelint org's shareable config for eslint
MIT License
62 stars 9 forks source link

Add `eslint-plugin-import` #241

Open Mouvedia opened 1 year ago

Mouvedia commented 1 year ago

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 https://github.com/stylelint/stylelint/pull/7211#discussion_r1361407396

ybiquitous commented 1 year ago

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

Mouvedia commented 1 year ago

@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 commented 1 year ago

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 commented 1 year ago
  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 commented 1 year ago

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