Files
polynote/eslint.config.js
Urko a32badd025
Some checks failed
build / lint (push) Failing after 36s
build / build (push) Has been skipped
initial commit
2026-01-29 16:13:04 +00:00

62 lines
1.7 KiB
JavaScript

import js from "@eslint/js";
import pluginNext from "@next/eslint-plugin-next";
import pluginReact from "eslint-plugin-react";
import pluginReactHooks from "eslint-plugin-react-hooks";
import pluginJsxA11y from "eslint-plugin-jsx-a11y";
import pluginPrettier from "eslint-plugin-prettier";
import tseslint from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
import globals from "globals";
export default [
{
name: "ignores",
ignores: ["**/node_modules/**", "**/.next/**", "**/dist/**", "**/build/**", "next-env.d.ts"],
},
js.configs.recommended,
{
name: "base:react-next",
files: ["**/*.{js,jsx,ts,tsx}"],
languageOptions: {
parser: tsParser,
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
ecmaFeatures: { jsx: true },
},
globals: {
...globals.browser,
React: "readonly",
},
},
plugins: {
"@next/next": pluginNext,
react: pluginReact,
"react-hooks": pluginReactHooks,
"jsx-a11y": pluginJsxA11y,
prettier: pluginPrettier,
"@typescript-eslint": tseslint,
},
settings: {
react: { version: "detect" },
},
rules: {
...pluginNext.configs["core-web-vitals"].rules,
...pluginReact.configs.recommended.rules,
...pluginReactHooks.configs.recommended.rules,
...pluginJsxA11y.configs.recommended.rules,
...pluginPrettier.configs.recommended.rules,
...tseslint.configs.recommended.rules,
"react/react-in-jsx-scope": "off",
},
},
{
name: "scripts:node",
files: ["scripts/**/*.{js,cjs}"],
languageOptions: {
sourceType: "script",
globals: globals.node,
},
},
];