Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: un-ts/eslint-plugin-import-x
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.9.1
Choose a base ref
...
head repository: un-ts/eslint-plugin-import-x
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.9.2
Choose a head ref
  • 2 commits
  • 7 files changed
  • 2 contributors

Commits on Mar 25, 2025

  1. fix: PluginConfig should use classic config (#259)

    JounQin authored Mar 25, 2025

    Verified

    This commit was signed with the committer’s verified signature.
    liggitt Jordan Liggitt
    Copy the full SHA
    baf7086 View commit details
  2. chore: release eslint-plugin-import-x (#261)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored Mar 25, 2025

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    ying-jeanne Ying WANG
    Copy the full SHA
    0461791 View commit details
Showing with 16 additions and 12 deletions.
  1. +6 −0 CHANGELOG.md
  2. +1 −1 package.json
  3. +3 −5 src/config/react.ts
  4. +2 −2 src/types.ts
  5. +1 −1 test/rules/no-duplicates.spec.ts
  6. +1 −1 test/rules/no-extraneous-dependencies.spec.ts
  7. +2 −2 test/rules/no-unused-modules.spec.ts
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# eslint-plugin-import-x

## 4.9.2

### Patch Changes

- [#259](https://github.com/un-ts/eslint-plugin-import-x/pull/259) [`baf7086`](https://github.com/un-ts/eslint-plugin-import-x/commit/baf70861889f43e775a372efabada2ec703f0dae) Thanks [@JounQin](https://github.com/JounQin)! - fix: `PluginConfig` should use classic config

## 4.9.1

### Patch Changes
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-import-x",
"version": "4.9.1",
"version": "4.9.2",
"type": "commonjs",
"description": "Import with sanity.",
"repository": "https://github.com/un-ts/eslint-plugin-import-x",
8 changes: 3 additions & 5 deletions src/config/react.ts
Original file line number Diff line number Diff line change
@@ -11,11 +11,9 @@ export = {
settings: {
'import-x/extensions': ['.js', '.jsx'],
},
languageOptions: {
parserOptions: {
ecmaFeatures: {
jsx: true,
},
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
} satisfies PluginConfig
4 changes: 2 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -114,8 +114,8 @@ export type PluginSettings = WithPluginName<ImportSettings>
export type PluginConfig = {
plugins?: [PluginName]
settings?: PluginSettings
rules?: Record<`${PluginName}/${string}`, TSESLint.Linter.RuleEntry>
} & TSESLint.Linter.ConfigType
rules?: Record<`${PluginName}/${string}`, TSESLint.ClassicConfig.RuleEntry>
} & TSESLint.ClassicConfig.Config

export type PluginFlatBaseConfig = {
settings?: PluginSettings
2 changes: 1 addition & 1 deletion test/rules/no-duplicates.spec.ts
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ import {
} from '../utils'
import type { GetRuleModuleMessageIds, RuleRunTests } from '../utils'

import jsxConfig from 'eslint-plugin-import-x/config/react'
import jsxConfig from 'eslint-plugin-import-x/config/flat/react'
import rule from 'eslint-plugin-import-x/rules/no-duplicates'

const ruleTester = new TSESLintRuleTester()
2 changes: 1 addition & 1 deletion test/rules/no-extraneous-dependencies.spec.ts
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ import {
} from '../fixtures/package.json'
import { parsers, createRuleTestCaseFunctions, testFilePath } from '../utils'

import typescriptConfig from 'eslint-plugin-import-x/config/typescript'
import typescriptConfig from 'eslint-plugin-import-x/config/flat/typescript'
import rule from 'eslint-plugin-import-x/rules/no-extraneous-dependencies'

const ruleTester = new TSESLintRuleTester()
4 changes: 2 additions & 2 deletions test/rules/no-unused-modules.spec.ts
Original file line number Diff line number Diff line change
@@ -10,8 +10,8 @@ import { RuleTester as ESLint9_FlatRuleTester } from 'eslint9'
import { createRuleTestCaseFunctions, testFilePath, parsers } from '../utils'
import type { GetRuleModuleOptions, GetRuleModuleMessageIds } from '../utils'

import jsxConfig from 'eslint-plugin-import-x/config/react'
import typescriptConfig from 'eslint-plugin-import-x/config/typescript'
import jsxConfig from 'eslint-plugin-import-x/config/flat/react'
import typescriptConfig from 'eslint-plugin-import-x/config/flat/typescript'
import rule from 'eslint-plugin-import-x/rules/no-unused-modules'

const ruleTester = new TSESLintRuleTester()