UNPKG

@aristobyte-ui/eslint-config

Version:

AristoByteUI ESLint configuration presets for TypeScript, React, and Next.js packages. Provides base, React, and Next.js rules optimized for monorepo workflows, Prettier integration, and developer productivity.

47 lines (46 loc) 1.42 kB
import js from "@eslint/js"; import eslintConfigPrettier from "eslint-config-prettier"; import tseslint from "typescript-eslint"; import pluginReact from "eslint-plugin-react"; import pluginReactHooks from "eslint-plugin-react-hooks"; import pluginNext from "@next/eslint-plugin-next"; import globals from "globals"; import { config as baseConfig } from "./eslint.base.js"; export const nextJsConfig = [ ...baseConfig, js.configs.recommended, eslintConfigPrettier, ...tseslint.configs.recommended, { ...pluginReact.configs.flat.recommended, languageOptions: { ...pluginReact.configs.flat.recommended.languageOptions, globals: { ...globals.serviceworker, }, }, }, { plugins: { "@next/next": pluginNext, }, rules: { ...pluginNext.configs.recommended.rules, ...pluginNext.configs["core-web-vitals"].rules, }, }, { plugins: { "react-hooks": pluginReactHooks, }, settings: { react: { version: "detect" } }, rules: { ...pluginReactHooks.configs.recommended.rules, "react/react-in-jsx-scope": "off", "@typescript-eslint/no-unused-vars": [ "warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }, ], }, }, ];