Skip to content

Commit

Permalink
fix: 🐛 remove imports patch from previous plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmy-guzman committed Nov 8, 2024
1 parent 04b261f commit 4c4024e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 41 deletions.
23 changes: 0 additions & 23 deletions src/configs/imports.spec.ts

This file was deleted.

21 changes: 3 additions & 18 deletions src/configs/imports.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import type { ESLint, Linter } from "eslint";

import importX from "eslint-plugin-import-x";
import nodePlugin from "eslint-plugin-n";

import type { TypescriptOptions } from "../types";
import type { TypedConfigItem, TypescriptOptions } from "../types";

import { importsRules } from "../rules/imports";

Expand All @@ -28,26 +26,13 @@ export const importsConfig = ({
}: ImportsConfigOptions = {}) => {
return [
{
languageOptions: {
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
},
name: "jimmy.codes/imports",
plugins: {
// TODO: remove unknown conversion
"import-x": importX as unknown as ESLint.Plugin,
"import-x": importX,
"n": nodePlugin,
},
rules: importsRules,
// https://github.com/import-js/eslint-plugin-import/issues/2556#issuecomment-1419518561
settings: {
"import-x/parsers": {
espree: [".js", ".cjs", ".mjs", ".jsx"],
},
},
},
...(typescript ? [typescriptImports] : []),
] satisfies Linter.Config[];
] satisfies TypedConfigItem[];
};

0 comments on commit 4c4024e

Please sign in to comment.