eslintrc .eslintrc.js

2020-06-29  本文已影响0人  51bitquant

module.exports = {
root: true,
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint", "react-hooks"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier",
"prettier/@typescript-eslint",
"prettier/react",
"plugin:react/recommended",
],
settings: {
react: {
version: "detect",
pargma: "React",
},
},
rules: {
"react/prop-types": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"react/self-closing-comp": "warn",
},
};

上一篇 下一篇

猜你喜欢

热点阅读