-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
feat: implement import-x resolver interface v3 #326
feat: implement import-x resolver interface v3 #326
Conversation
🦋 Changeset detectedLatest commit: d207c0e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
Report too large to display inline |
Thanks @SukkaW, nice work |
Love it! What about improving the import, to something like similar this (Eslint prettier example): import eslint from '@eslint/js';
import eslintPrettier from 'eslint-config-prettier';
export default tseslint.config(
eslintPrettier,
); Meaning less boilerplate for the end-user. |
If you are using |
| datasource | package | from | to | | ---------- | --------------------------------- | ----- | ----- | | npm | eslint-import-resolver-typescript | 3.6.3 | 3.7.0 | ## [v3.7.0](https://github.com/import-js/eslint-import-resolver-typescript/blob/HEAD/CHANGELOG.md#370) ##### Minor Changes - [#326](import-js/eslint-import-resolver-typescript#326) [`93ea130`](import-js/eslint-import-resolver-typescript@93ea130) Thanks [@SukkaW](https://github.com/SukkaW)! - This version has implemented the `eslint-plugin-import-x`'s v3 resolver interface. This allows you to use import/require to reference `eslint-import-resolver-typescript` directly in your ESLint flat config: **Previously** ```js // eslint.config.js module.exports = { settings: { 'import-x/resolver': { typescript: { alwaysTryTypes: true, }, // or require.resolve('eslint-import-resolver-typescript'): alwaysTryTypes: true, } } } } ``` **Now** ```js // eslint.config.js const { createTypeScriptImportResolver, } = require('eslint-import-resolver-typescript') module.exports = { settings: { 'import-x/resolver-next': [ createTypeScriptImportResolver({ alwaysTryTypes: true, }), ], }, } ``` Note that this only works with `eslint-plugin-import-x@>=4.5.0`. You can't use `createTypeScriptImportResolver` with the older versions of `eslint-plugin-import-x` or any existing versions of `eslint-plugin-import`.
| datasource | package | from | to | | ---------- | --------------------------------- | ----- | ----- | | npm | eslint-import-resolver-typescript | 3.6.3 | 3.7.0 | ## [v3.7.0](https://github.com/import-js/eslint-import-resolver-typescript/blob/HEAD/CHANGELOG.md#370) ##### Minor Changes - [#326](import-js/eslint-import-resolver-typescript#326) [`93ea130`](import-js/eslint-import-resolver-typescript@93ea130) Thanks [@SukkaW](https://github.com/SukkaW)! - This version has implemented the `eslint-plugin-import-x`'s v3 resolver interface. This allows you to use import/require to reference `eslint-import-resolver-typescript` directly in your ESLint flat config: **Previously** ```js // eslint.config.js module.exports = { settings: { 'import-x/resolver': { typescript: { alwaysTryTypes: true, }, // or require.resolve('eslint-import-resolver-typescript'): alwaysTryTypes: true, } } } } ``` **Now** ```js // eslint.config.js const { createTypeScriptImportResolver, } = require('eslint-import-resolver-typescript') module.exports = { settings: { 'import-x/resolver-next': [ createTypeScriptImportResolver({ alwaysTryTypes: true, }), ], }, } ``` Note that this only works with `eslint-plugin-import-x@>=4.5.0`. You can't use `createTypeScriptImportResolver` with the older versions of `eslint-plugin-import-x` or any existing versions of `eslint-plugin-import`.
Fixes #318.
Introduces support for flat config support and support for
eslint-plugin-import-x
's v3 interface.cc @mcshaman @melroy89 @Leonardo-Vieira-Andela
Also, README has been updated w/ the flat config usage.
This version has implemented the
eslint-plugin-import-x
's v3 resolver interface. This allows you to use import/require to referenceeslint-import-resolver-typescript
directly in your ESLint flat config:Previously
Now
Note that this only works with
eslint-plugin-import-x@>=4.5.0
. You can't usecreateTypeScriptImportResolver
with the older versions ofeslint-plugin-import-x
or any existing versions ofeslint-plugin-import
.