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

Introduce additional config for TypeScript #1256

Closed
kirill-konshin opened this issue Jan 7, 2019 · 3 comments · Fixed by #1257
Closed

Introduce additional config for TypeScript #1256

kirill-konshin opened this issue Jan 7, 2019 · 3 comments · Fixed by #1257

Comments

@kirill-konshin
Copy link
Contributor

In addition to config portion for React (https://github.com/benmosher/eslint-plugin-import/blob/master/config/react.js) I suggest to create a portion for TypeScript in a separate file:

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

In this case instead of endless copy-paste of this section users would simply add something like plugin:import/typescript to their configs.

kirill-konshin added a commit to kirill-konshin/eslint-plugin-import that referenced this issue Jan 7, 2019
@kirill-konshin
Copy link
Contributor Author

Pull created #1257.

@ACVis
Copy link

ACVis commented Jan 29, 2019

Forgive my ignorance, but I don't see any documentation on this. Would we use this, by adding the following in our .eslintrc.js?

module.exports = {
    extends: [
        "plugin:import/typescript",
    ]
}

In which case, solely adding that would be enough configuration for the typescript use case?
Also, I know vaguely, that this is how shareable configs work, I just don't see any mentions of these incredibly useful configs in the readme/docs, even though they exist in the repository.

kirill-konshin added a commit to kirill-konshin/eslint-plugin-import that referenced this issue Jan 29, 2019
@kirill-konshin
Copy link
Contributor Author

PR created #1277

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants