brandongregoryscott / eslint-plugin-collation

ESLint plugin for making your code easier to read, with autofix and TypeScript support
https://eslint-plugin-collation.brandonscott.me
Apache License 2.0
4 stars 0 forks source link

Improve `prefer-import` documentation #69

Closed brandongregoryscott closed 1 year ago

brandongregoryscott commented 1 year ago

Some things that might be helpful to call out in the documentation are...

  1. When the value of a moduleSpecifier is an array (not a singular ImportRule config), rules should be ordered from most specific to least specific, because an import specifier may match multiple patterns - only the first match is taken.
  2. Add a note about multiple import declarations being produced while the importPropsFromSameModule value is set to true (which is the default). This could be fixed in the rule implementation with a little reworking, but I don't think it's a major issue - imports/no-duplicates flags this and can auto-fix these.
brandongregoryscott commented 1 year ago

Completed via 2fa4a48