Fix eslint-config package internal imports so other packages can use it for their eslint config
Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import js from "@eslint/js";
|
||||
import type { Linter } from "eslint";
|
||||
|
||||
export const baseConfigs = [
|
||||
{ ignores: ["dist", "node_modules", "**/*.d.ts"] },
|
||||
{ files: ["**/*.js", "**/*.ts", "**/*.tsx"] },
|
||||
{ ignores: ["dist", "node_modules", "**/*.d.ts"] } satisfies Pick<Linter.Config, "ignores">,
|
||||
{ files: ["**/*.js", "**/*.ts", "**/*.tsx"] } satisfies Pick<Linter.Config, "files">,
|
||||
js.configs.recommended,
|
||||
];
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { baseConfigs } from "./baseConfigs";
|
||||
import { browserLanguageOptionsConfig, nodeLanguageOptionsConfig } from "./languageOptionsConfigs";
|
||||
import { tsConfigs } from "./tsConfigs";
|
||||
import { reactConfigs } from "./reactConfigs";
|
||||
import { stylisticConfigs } from "./stylisticConfigs";
|
||||
import { baseConfigs } from "./baseConfigs.ts";
|
||||
import { browserLanguageOptionsConfig, nodeLanguageOptionsConfig } from "./languageOptionsConfigs.ts";
|
||||
import { tsConfigs } from "./tsConfigs.ts";
|
||||
import { reactConfigs } from "./reactConfigs.ts";
|
||||
import { stylisticConfigs } from "./stylisticConfigs.ts";
|
||||
|
||||
export const configs = {
|
||||
base: baseConfigs,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Linter } from "eslint";
|
||||
import * as globals from "globals";
|
||||
|
||||
export const browserLanguageOptionsConfig = {
|
||||
@@ -16,7 +17,7 @@ export const browserLanguageOptionsConfig = {
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
} satisfies Pick<Linter.Config, "languageOptions">;
|
||||
|
||||
export const nodeLanguageOptionsConfig = {
|
||||
languageOptions: {
|
||||
@@ -34,4 +35,4 @@ export const nodeLanguageOptionsConfig = {
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
} satisfies Pick<Linter.Config, "languageOptions">;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as react from "eslint-plugin-react";
|
||||
import react from "eslint-plugin-react";
|
||||
import * as reactHooks from "eslint-plugin-react-hooks";
|
||||
|
||||
export const reactConfigs = [
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import stylistic from "@stylistic/eslint-plugin";
|
||||
import { type Linter } from "eslint";
|
||||
import type { Linter } from "eslint";
|
||||
|
||||
export const stylisticConfigs = [
|
||||
stylistic.configs.customize({
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { type Linter } from "eslint";
|
||||
import type { Linter } from "eslint";
|
||||
import tseslint from "typescript-eslint";
|
||||
|
||||
export const tsConfigs = [
|
||||
|
||||
Reference in New Issue
Block a user