From 1a9e89474b81a0e3a5efbf8c87ad35b37100d378 Mon Sep 17 00:00:00 2001 From: dcordz <17937472+dcordz@users.noreply.github.com> Date: Thu, 6 Jun 2024 11:47:26 -0400 Subject: [PATCH] padawan - eslint flat structure, update sorbet gems, update git pre-commit hook --- eslint.config.js | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 054e9d8e..43736e23 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,7 +1,7 @@ import globals from "globals"; import pluginJs from "@eslint/js"; import tseslint from "typescript-eslint"; -import react from "eslint-plugin-react/configs/recommended.js"; +import pluginReactConfig from "eslint-plugin-react/configs/recommended.js"; import reactRefresh from "eslint-plugin-react-refresh"; import rulesOfHooks from "eslint-plugin-react-hooks"; import eslintImport from "eslint-plugin-import"; @@ -12,7 +12,7 @@ export default [ // pluginJs.configs.recommended, // ...tseslint.configs.recommended, // ...tseslint.configs.stylistic, - react, + // pluginReactConfig, { languageOptions: { globals: { @@ -30,7 +30,24 @@ export default [ }, }, - ignores: ["**/*", "!app/frontend/"], + ignores: [ + "app/assets/", + "app/views/*", + "config/", + "docker/", + "sorbet/", + "node_modules/", + "log/", + "lib/", + "db/", + "bin/", + "spec/", + "storage/", + "tf/", + "tmp/", + "vendor/", + "eslint.config.js", + ], settings: { react: { @@ -51,6 +68,11 @@ export default [ "react-hooks/rules-of-hooks": "error", "react-hooks/exhaustive-deps": "warn", + "react/prop-types": "off", + "react/react-in-jsx-scope": "off", + "react/jsx-no-target-blank": "warn", + "react/display-name": "off", + "constructor-super": "error", "no-restricted-globals": "error", eqeqeq: ["warn", "always"], @@ -85,11 +107,6 @@ export default [ "prefer-const": "warn", "@typescript-eslint/ban-ts-comment": "warn", - - "react/prop-types": "off", - "react/react-in-jsx-scope": "off", - "react/jsx-no-target-blank": "warn", - "react/display-name": "off", }, }, ];