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

What does settings."import-x/resolver".typescript: true do ? #77

Closed
Samuel-Therrien-Beslogic opened this issue May 1, 2024 · 1 comment
Labels
question Further information is requested

Comments

@Samuel-Therrien-Beslogic
Copy link

Samuel-Therrien-Beslogic commented May 1, 2024

https://github.com/un-ts/eslint-plugin-import-x#typescript suggests doing (translated to js/json):

"settings": {
  "import-x/resolver": {
    "typescript": true
  }
}

but also links to https://github.com/import-js/eslint-import-resolver-typescript#configuration which tells me to do (after changing import/ to import-x/:

"settings": {
  "import-x/parsers": { // Updated to import-x
    "@typescript-eslint/parser": [".ts", ".tsx"]
  },
  "import-x/resolver": { // Updated to import-x
    "typescript": {
      "alwaysTryTypes": true,
      "project": [ // I'm using my @typescript-eslint/parser projects configs for this example
          "tsconfig?(.*).json",
          // From our Angular preset
          "projects/*/tsconfig?(.*).json",
          "*/tsconfig?(.*).json" // For example: e2e/tsconfig.json
        ]
    }
  }
}

It is unclear to me what "typescript": true does and why it differs from the linked documentation.

@JounQin JounQin added the question Further information is requested label May 16, 2024
@JounQin
Copy link
Member

JounQin commented May 16, 2024

It's same as typescript: {} which use default options for the resolver.

@JounQin JounQin closed this as completed May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants