eslint-plugin-import-x
eslint-plugin-import-x copied to clipboard
A fork of `eslint-plugin-import` using `get-tsconfig` to replace `tsconfig-paths` and heavy `typescript` under the hood.
Minimal reproducible: https://github.com/Shinigami92/eslint-plugin-import-x-repro #### input ```ts import { internA } from "#a"; import { scopeA } from "@a/a"; import { localA } from "./a"; console.log({ internA, scopeA, localA }); ```...
### ESLint config ```ts // eslint.config.mjs import { config, configs } from 'typescript-eslint' import pluginImportX from 'eslint-plugin-import-x' export default config({ extends: [configs.recommended], plugins: { 'import-x': pluginImportX }, rules: { 'import-x/no-duplicates':...
fixes https://github.com/un-ts/eslint-plugin-import-x/issues/231 This PR removes the auto fix for: ```ts import {AValue, type x, BValue} from './foo'; import {type y} from './foo' ``` as our heuristic for type vs non-type...
Hey 👋 I find it kinda strange that _import_ plugin uses `commonjs` style in docs and release changelogs - eslint itself uses `import` everywhere. Please consider using `import/export` everywhere 🙏
When I pull down the latest `master` and run `yarn && yarn test` on my Mac, I get: ``` FAIL test/fixtures.spec.ts ● yarn pnp › should just work expect(received).toMatchSnapshot() Snapshot...
Given the following code: ```vue console.log('a') import 'vue' console.log('b') console.log('c') import 'vue' console.log('d') ``` The import rules fail to handle both of the script blocks as distinct scripts. Specifically in...
## Problem Currently, the [`consistent-type-specifier-style`](https://github.com/un-ts/eslint-plugin-import-x/blob/master/docs/rules/consistent-type-specifier-style.md) rule has options `prefer-top-level` and `prefer-inline`. While it uses the word "prefer", it doesn't seem to be preferential—but more of a requirement—as `prefer-top-level` errors on:...
## Description I got this error when trying to migrate eslint 8.57 to latest version which is eslint 9.17. I have followed both doc from this package and `eslint-import-resolver-typescript` nothing...
I've been looking for any way to enforce sorting of lazy imported react components. with the very limited other options, this package feels like my only hope outside of writing...