Add more eslint rules

This commit is contained in:
Aode (lion) 2021-12-30 10:43:59 -06:00
parent 049b3e50c0
commit 90b9e22f4d
4 changed files with 19 additions and 2 deletions

View file

@ -2,5 +2,19 @@ module.exports = {
root: true,
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
"prettier",
],
settings: {
react: {
createClass: "creatReactClass",
pragma: "React",
fragment: "Fragment",
version: "detect",
},
},
};

View file

@ -47,6 +47,8 @@
"@typescript-eslint/parser": "^5.8.1",
"eslint": "^8.5.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"prettier": "2.5.1"
}
}

View file

@ -1,3 +1,4 @@
import React from "react";
import Board, { BoardState } from "./Board";
import "./App.css";

View file

@ -3758,7 +3758,7 @@ eslint-plugin-react-hooks@^4.3.0:
resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.3.0.tgz#318dbf312e06fab1c835a4abef00121751ac1172"
integrity sha512-XslZy0LnMn+84NEG9jSGR6eGqaZB3133L8xewQo3fQagbQuGt7a63gf+P1NGKZavEYEC3UXaWEAA/AqDkuN6xA==
eslint-plugin-react@^7.27.1:
eslint-plugin-react@^7.27.1, eslint-plugin-react@^7.28.0:
version "7.28.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.28.0.tgz#8f3ff450677571a659ce76efc6d80b6a525adbdf"
integrity sha512-IOlFIRHzWfEQQKcAD4iyYDndHwTQiCMcJVJjxempf203jnNLUnW34AXLrV33+nEXoifJE2ZEGmcjKPL8957eSw==