2023-12-08 14:33:22 +01:00
|
|
|
module.exports = {
|
|
|
|
root: true,
|
|
|
|
extends: [
|
|
|
|
"eslint:recommended",
|
|
|
|
"plugin:@typescript-eslint/recommended",
|
|
|
|
"plugin:react-hooks/recommended",
|
2024-02-28 23:23:56 +01:00
|
|
|
"plugin:vitest-globals/recommended",
|
|
|
|
"plugin:prettier/recommended",
|
2023-12-08 14:33:22 +01:00
|
|
|
],
|
2024-02-28 23:23:56 +01:00
|
|
|
env: { browser: true, es2021: true, "vitest-globals/env": true },
|
2023-12-08 14:33:22 +01:00
|
|
|
ignorePatterns: ["dist", ".eslintrc.cjs"],
|
|
|
|
parser: "@typescript-eslint/parser",
|
|
|
|
parserOptions: {
|
|
|
|
ecmaFeatures: {
|
|
|
|
jsx: true,
|
|
|
|
},
|
|
|
|
ecmaVersion: "latest",
|
|
|
|
sourceType: "module",
|
|
|
|
},
|
|
|
|
settings: {
|
|
|
|
jest: {
|
|
|
|
version: 27,
|
|
|
|
},
|
|
|
|
},
|
2024-02-28 23:23:56 +01:00
|
|
|
ignorePatterns: ["*.d.ts", "/src/components/ui/*"],
|
|
|
|
plugins: ["react-hooks", "react-refresh"],
|
2023-12-08 14:33:22 +01:00
|
|
|
rules: {
|
2024-02-28 23:23:56 +01:00
|
|
|
"react-hooks/rules-of-hooks": "error",
|
|
|
|
"react-hooks/exhaustive-deps": "error",
|
2023-12-08 14:33:22 +01: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",
|
2024-05-14 17:06:44 +02:00
|
|
|
"prettier/prettier": [
|
|
|
|
"warn",
|
|
|
|
{
|
|
|
|
plugins: ["prettier-plugin-tailwindcss"],
|
|
|
|
},
|
|
|
|
],
|
2023-12-08 14:33:22 +01:00
|
|
|
},
|
|
|
|
overrides: [
|
|
|
|
{
|
|
|
|
files: ["**/*.{ts,tsx}"],
|
|
|
|
parser: "@typescript-eslint/parser",
|
|
|
|
plugins: ["@typescript-eslint"],
|
|
|
|
extends: [
|
|
|
|
"eslint:recommended",
|
|
|
|
"plugin:@typescript-eslint/recommended",
|
|
|
|
"prettier",
|
|
|
|
],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
};
|