You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many times specific named exports are deprecated in a module, while other named exports are not deprecated. That means we can't use the existing 'deprecate/import' rule because its only parts of the module that are deprecated, not the entire module.
If we create a new eslint rule that allows us to name specific named exports to deprecate in a specific module, that would be super useful
Then this javascript code would produce the following errors:
// Produces the error: // navigate from module gatsby is deprecated. Use utils/navigate insteadimport{navigate}from'gatsby';// Produces the error:// navigate from module gatsby is deprecated. Use utils/navigate insteadimport{gql,navigate,Link}from'gatsby';// Produces no errorimport{gql}from'gatsby';
While this feature request is similar to #3, this rule would be linting the import of a method, not the usage of a method. Since it has become best practice to import specific names instead of the entire module, I feel this rule would be more useful than #3.
The text was updated successfully, but these errors were encountered:
Many times specific named exports are deprecated in a module, while other named exports are not deprecated. That means we can't use the existing 'deprecate/import' rule because its only parts of the module that are deprecated, not the entire module.
If we create a new eslint rule that allows us to name specific named exports to deprecate in a specific module, that would be super useful
If the eslint ruleset looked like this:
Then this javascript code would produce the following errors:
While this feature request is similar to #3, this rule would be linting the import of a method, not the usage of a method. Since it has become best practice to import specific names instead of the entire module, I feel this rule would be more useful than #3.
The text was updated successfully, but these errors were encountered: