Skip to content

Commit

Permalink
Merge pull request #589 from irais-valenzuela/adding-prettier-and-esl…
Browse files Browse the repository at this point in the history
…int-frontend-588

Adding prettier and eslint to frontend
  • Loading branch information
irais-valenzuela authored Nov 6, 2024
2 parents 0b2399b + da28a37 commit 4397667
Show file tree
Hide file tree
Showing 54 changed files with 5,634 additions and 818 deletions.
56 changes: 56 additions & 0 deletions frontend/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import globals from "globals";
import pluginJs from "@eslint/js";
import tseslint from "typescript-eslint";
import pluginReact from "eslint-plugin-react";
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
import eslintPluginTailwindcss from "eslint-plugin-tailwindcss";
import eslintPluginReactHooks from "eslint-plugin-react-hooks";
import eslintPluginJsxA11y from "eslint-plugin-jsx-a11y";

export default [
{ files: ["**/*.{js,mjs,cjs,ts,jsx,tsx}"] },
{
languageOptions: {
globals: globals.browser,
parser: "@typescript-eslint/parser",
},
},
{
settings: {
react: {
version: "detect",
},
},
},
{
rules: {
"no-unused-vars": "warn",
"no-console": "warn",
indent: ["error", 2],
"no-irregular-whitespace": "error",
"prettier/prettier": "error",
"react/no-unescaped-entities": "off",
"@typescript-eslint/no-unused-vars": ["error"],
"tailwindcss/no-contradicting-classname": "error",
"tailwindcss/no-unnecessary-arbitrary-value": "error",
"tailwindcss/classnames-order": "error",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"jsx-a11y/alt-text": "error",
},
},
{
ignores: ["node_modules/", "*.config.js", "tests/__mocks__/*"],
},
pluginJs.configs.recommended,
...tseslint.configs.recommended,
pluginReact.configs.flat.recommended,
eslintPluginPrettierRecommended,
{
plugins: {
tailwindcss: eslintPluginTailwindcss,
"react-hooks": eslintPluginReactHooks,
"jsx-a11y": eslintPluginJsxA11y,
},
},
];
Loading

0 comments on commit 4397667

Please sign in to comment.