2023-12-08 07:33:22 -06:00
|
|
|
module.exports = {
|
|
|
|
root: true,
|
|
|
|
extends: [
|
|
|
|
"eslint:recommended",
|
|
|
|
"plugin:@typescript-eslint/recommended",
|
|
|
|
"plugin:react-hooks/recommended",
|
2024-02-28 16:23:56 -06:00
|
|
|
"plugin:vitest-globals/recommended",
|
|
|
|
"plugin:prettier/recommended",
|
2023-12-08 07:33:22 -06:00
|
|
|
],
|
2024-02-28 16:23:56 -06:00
|
|
|
env: { browser: true, es2021: true, "vitest-globals/env": true },
|
2023-12-08 07:33:22 -06:00
|
|
|
ignorePatterns: ["dist", ".eslintrc.cjs"],
|
|
|
|
parser: "@typescript-eslint/parser",
|
|
|
|
parserOptions: {
|
|
|
|
ecmaFeatures: {
|
|
|
|
jsx: true,
|
|
|
|
},
|
|
|
|
ecmaVersion: "latest",
|
|
|
|
sourceType: "module",
|
|
|
|
},
|
|
|
|
settings: {
|
|
|
|
jest: {
|
|
|
|
version: 27,
|
|
|
|
},
|
|
|
|
},
|
2024-02-28 16:23:56 -06:00
|
|
|
ignorePatterns: ["*.d.ts", "/src/components/ui/*"],
|
|
|
|
plugins: ["react-hooks", "react-refresh"],
|
2023-12-08 07:33:22 -06:00
|
|
|
rules: {
|
2024-02-28 16:23:56 -06:00
|
|
|
"react-hooks/rules-of-hooks": "error",
|
|
|
|
"react-hooks/exhaustive-deps": "error",
|
2023-12-08 07:33:22 -06:00
|
|
|
"react-refresh/only-export-components": [
|
|
|
|
"warn",
|
|
|
|
{ allowConstantExport: true },
|
|
|
|
],
|
|
|
|
"comma-dangle": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
objects: "always-multiline",
|
|
|
|
arrays: "always-multiline",
|
|
|
|
imports: "always-multiline",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
"no-unused-vars": [
|
|
|
|
"error",
|
|
|
|
{ argsIgnorePattern: "^_", varsIgnorePattern: "^_" },
|
|
|
|
],
|
|
|
|
"no-console": "error",
|
|
|
|
},
|
|
|
|
overrides: [
|
|
|
|
{
|
|
|
|
files: ["**/*.{ts,tsx}"],
|
|
|
|
parser: "@typescript-eslint/parser",
|
|
|
|
plugins: ["@typescript-eslint"],
|
|
|
|
extends: [
|
|
|
|
"eslint:recommended",
|
|
|
|
"plugin:@typescript-eslint/recommended",
|
|
|
|
"prettier",
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
};
|