Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

Is it possible to include a config portion for import plugin in recommended settings? #275

Closed
kirill-konshin opened this issue Jan 5, 2019 · 8 comments

Comments

@kirill-konshin
Copy link

It would be useful if plugin:typescript/recommended would include a section for eslint-plugin-import (as recommended in their docs: https://github.com/benmosher/eslint-plugin-import#importextensions):

{
  "settings": {
    "import/resolver": {
      "node": {
        "extensions": [
          ".js",
          ".jsx",
          ".ts",
          ".tsx"
        ]
      }
    }
}

This code does not force user to install the plugin, but it will produce an effect if the plugin is used.

@j-f1
Copy link
Collaborator

j-f1 commented Jan 5, 2019

Feel free to open a PR!

@armano2
Copy link
Contributor

armano2 commented Jan 5, 2019

@kirill-konshin not everyone uses it, if you think that its good idea, consider making config package

@kirill-konshin
Copy link
Author

So should I open PR or not ))) it won't harm those who don't use it. How about a section named plugin:typescript/import or something? Or maybe having a TS config in import plugin makes more sense?

@corbinu
Copy link
Contributor

corbinu commented Jan 7, 2019

@kirill-konshin I do use it also. I would say I think it makes more sense to see if import is willing to have this. I know it is a bit complicated trying to tell where this all should sit.

I do also maintain my own package (https://www.npmjs.com/package/@corbinu/eslint-plugin-corbinu) for my own very complicated eslint config for my own use as @armano2 suggested so that is where I handle this

@j-f1
Copy link
Collaborator

j-f1 commented Jan 7, 2019

I agree. Although it won’t be useful for everyone, it won’t hurt people who don’t use eslint-plugin-import and it’ll be helpful for people who do.

@armano2
Copy link
Contributor

armano2 commented Jan 7, 2019

cases when it can break:

  • when api/rules change in eslint-plugin-import
  • when someone is using old version of plugin

i think it will be better if config like this will be provided by eslint-plugin-import instead of adding more and more external configs in here.

@kirill-konshin
Copy link
Author

On a second thought, this belongs more to import... so I've already created a ticket and PR for import plugin as well: import-js/eslint-plugin-import#1256, it's currently blocked by broken CI.

@bradzacher
Copy link
Owner

Alrighty, well if it's going to be handled over in eslint-plugin-import, I'll close this issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants