Last active
February 15, 2020 13:09
-
-
Save panzelva/ae40f4bead3a76fc6d85180939e48eba to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const path = require("path") | |
| module.exports = { | |
| parser: "@typescript-eslint/parser", | |
| plugins: ["@typescript-eslint", "react-hooks"], | |
| extends: [ | |
| "plugin:@typescript-eslint/recommended", | |
| "plugin:react/recommended", | |
| "prettier", | |
| "prettier/react", | |
| "prettier/@typescript-eslint" | |
| ], | |
| parserOptions: { | |
| // https://github.com/typescript-eslint/typescript-eslint/issues/251 | |
| project: path.resolve(__dirname, "./tsconfig.json"), | |
| tsconfigRootDir: __dirname, | |
| warnOnUnsupportedTypeScriptVersion: false | |
| }, | |
| rules: { | |
| "@typescript-eslint/no-empty-function": "warn", | |
| "@typescript-eslint/explicit-function-return-type": ["off"], | |
| "@typescript-eslint/no-empty-interface": ["warn"], | |
| "@typescript-eslint/ban-ts-ignore": ["warn"], | |
| "react/prop-types": ["off"], | |
| "react/self-closing-comp": ["warn"], | |
| "no-console": ["warn"], | |
| "react-hooks/rules-of-hooks": "error", | |
| "react-hooks/exhaustive-deps": "warn" | |
| }, | |
| settings: { | |
| react: { | |
| version: "detect" | |
| } | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| yarn add -D typescript eslint @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint-plugin-react eslint-config-prettier eslint-plugin-react-hooks prettier |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment