Skip to content

Commit

Permalink
chore(lint): re-enable comments and react-hooks eslint plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
justmoon committed Sep 10, 2024
1 parent 3824c3d commit bd5bb65
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/meta-eslint-config/index.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import eslintPluginComments from "@eslint-community/eslint-plugin-eslint-comments/configs"
import eslint from "@eslint/js"
import eslintConfigPrettier from "eslint-config-prettier"
import eslintPluginN from "eslint-plugin-n"
import eslintPluginReact from "eslint-plugin-react"
import eslintPluginReactHooks from "eslint-plugin-react-hooks"
import eslintPluginTsdoc from "eslint-plugin-tsdoc"
import eslintPluginUnicorn from "eslint-plugin-unicorn"
import globals from "globals"
Expand Down Expand Up @@ -53,6 +55,7 @@ export default tseslint.config(
...tseslint.configs.strictTypeChecked,
...tseslint.configs.stylisticTypeChecked,
eslintPluginUnicorn.configs["flat/recommended"],
eslintPluginComments.recommended,
eslintPluginDassie.configs.recommended,
{
plugins: { tsdoc: eslintPluginTsdoc },
Expand Down Expand Up @@ -110,6 +113,11 @@ export default tseslint.config(
],
},
],

"@eslint-community/eslint-comments/disable-enable-pair": [
"error",
{ allowWholeFile: true },
],
},
languageOptions: {
ecmaVersion: 2021,
Expand All @@ -127,6 +135,10 @@ export default tseslint.config(
...[
eslintPluginReact.configs.flat.recommended,
eslintPluginReact.configs.flat["jsx-runtime"],
{
plugins: { "react-hooks": eslintPluginReactHooks },
rules: eslintPluginReactHooks.configs.recommended.rules,
},
{
rules: {
"react/prop-types": "off",
Expand Down
2 changes: 2 additions & 0 deletions packages/meta-eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
"main": "./index.mjs",
"devDependencies": {
"@dassie/meta-eslint-plugin": "workspace:^",
"@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
"@eslint/js": "^9.9.1",
"@types/eslint__js": "^8.42.3",
"eslint": "^9.9.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-n": "^17.10.2",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "5.1.0-rc-3dfd5d9e-20240910",
"eslint-plugin-tsdoc": "^0.3.0",
"eslint-plugin-unicorn": "^55.0.0",
"globals": "^15.9.0",
Expand Down
28 changes: 28 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bd5bb65

Please sign in to comment.