Skip to content

Commit

Permalink
Reconfigure eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
grahamalama committed Jan 25, 2024
1 parent fc5c79c commit 724b0c6
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 73 deletions.
31 changes: 0 additions & 31 deletions .eslintrc

This file was deleted.

36 changes: 36 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
module.exports = {
"root": true,
"parser": "@typescript-eslint/parser",
"ignorePatterns": ["dist", ".eslintrc.cjs"],
"env": { "browser": true, "es2020": true },
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react-hooks/recommended",
"prettier"
],
"plugins": ["@typescript-eslint/eslint-plugin"],
"rules": {
// ***
// TODO: turn these rules on progressively
"prefer-const": "off",
"no-var": "off",
"react-hooks/exhaustive-deps": "off",
"@typescript-eslint/ban-types": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/ban-ts-comment": "off",
// ***
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{ "vars": "all", "args": "none", "varsIgnorePattern": "^_" }
],
"no-console": "off"
},
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"project": ["./tsconfig.json", "./tsconfig.node.json"],
"tsconfigRootDir": __dirname,
}
}
45 changes: 20 additions & 25 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@
"@typescript-eslint/parser": "^6.19.0",
"@vitejs/plugin-react": "^4.2.1",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"gh-pages": "^6.0.0",
"prettier": "^3.0.2",
"toctoc": "^0.4.0",
Expand Down
16 changes: 0 additions & 16 deletions test/.eslintrc

This file was deleted.

0 comments on commit 724b0c6

Please sign in to comment.