From 4b300ac8c68c3e04a746b4eceb45ec40db6bede5 Mon Sep 17 00:00:00 2001 From: Borja Gonzalez Date: Sat, 6 Mar 2021 23:25:47 +0100 Subject: [PATCH] Eslint config --- .eslintignore | 2 ++ .eslintrc | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 .eslintignore create mode 100644 .eslintrc diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..b7dab5e --- /dev/null +++ b/.eslintignore @@ -0,0 +1,2 @@ +node_modules +build \ No newline at end of file diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..0e9ee2f --- /dev/null +++ b/.eslintrc @@ -0,0 +1,24 @@ +{ + "env": { + "browser": true, + "es2021": true + }, + "extends": ["plugin:react/recommended", "standard"], + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaFeatures": { + "jsx": true + }, + "ecmaVersion": 12, + "sourceType": "module" + }, + "plugins": ["react", "@typescript-eslint", "react-hooks"], + "rules": { + "comma-dangle": ["error", "always-multiline"], + "react/prop-types": "off", + "react-hooks/rules-of-hooks": "error", + "react-hooks/exhaustive-deps": "error", + "no-use-before-define": "off", + "@typescript-eslint/no-use-before-define": ["error"] + } +}