29 lines
672 B
JavaScript
29 lines
672 B
JavaScript
// @ts-check
|
|
|
|
import js from "@eslint/js";
|
|
import { defineConfig } from "eslint/config";
|
|
import globals from "globals";
|
|
import reactHooks from "eslint-plugin-react-hooks";
|
|
import tseslint from "typescript-eslint";
|
|
|
|
export default defineConfig([
|
|
{ ignores: ["dist"] },
|
|
{
|
|
extends: [js.configs.recommended, ...tseslint.configs.recommended],
|
|
files: ["**/*.{ts,tsx}"],
|
|
languageOptions: {
|
|
ecmaVersion: 2020,
|
|
globals: globals.browser,
|
|
parserOptions: {
|
|
tsconfigRootDir: import.meta.dirname,
|
|
},
|
|
},
|
|
plugins: {
|
|
"react-hooks": reactHooks,
|
|
},
|
|
rules: {
|
|
...reactHooks.configs.recommended.rules,
|
|
},
|
|
},
|
|
]);
|