Skip to content

Commit

Permalink
eslint-config: Add additional config for rules superseded by @typescr…
Browse files Browse the repository at this point in the history
  • Loading branch information
nhardy committed Mar 21, 2024
1 parent 5be989f commit 4c9d333
Show file tree
Hide file tree
Showing 4 changed files with 573 additions and 98 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@
"@types/lodash": "^4.14.202",
"@types/node": "^20.11.19",
"@types/react-dom": "^18.2.19",
"@typescript-eslint/eslint-plugin": "^7.0.2",
"@typescript-eslint/parser": "^7.0.2",
"@typescript-eslint/eslint-plugin": "^7.3.1",
"@typescript-eslint/parser": "^7.3.1",
"core-js": "^3.36.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-node": "^0.3.9",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react": "^7.34.1",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jsdom": "^22.1.0",
Expand Down
10 changes: 10 additions & 0 deletions packages/eslint-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ module.exports = {
{ allowShortCircuit: true, allowTernary: true },
],

// ESLint rules superseded by @typescript-eslint rules
"no-array-constructor": "off",
"@typescript-eslint/no-array-constructor": "error",
"no-loss-of-precision": "off",
"@typescript-eslint/no-loss-of-precision": "error",
"no-useless-constructor": "off",
"@typescript-eslint/no-useless-constructor": "error",

// @typescript-eslint rules
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
Expand Down Expand Up @@ -159,6 +167,8 @@ module.exports = {
// ESLint rules superseded by @typescript-eslint rules
"no-shadow": "off",
"@typescript-eslint/no-shadow": "error",
"no-throw-literal": "off",
"@typescript-eslint/no-throw-literal": "error",
// Allow void to be used to signify intentional ignoring of a Promise result
"no-void": "off",
"@typescript-eslint/no-meaningless-void-operator": "error",
Expand Down
8 changes: 4 additions & 4 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@kablamo/eslint-config",
"version": "0.0.19",
"version": "0.0.20",
"main": "index.js",
"repository": "https://github.com/KablamoOSS/kerosene/tree/master/packages/eslint-config",
"bugs": {
Expand All @@ -25,16 +25,16 @@
},
"dependencies": {
"@kablamo/eslint-plugin": "^2.0.1",
"@typescript-eslint/eslint-plugin": "^7.0.2",
"@typescript-eslint/parser": "^7.0.2",
"@typescript-eslint/eslint-plugin": "^7.3.1",
"@typescript-eslint/parser": "^7.3.1",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-node": "^0.3.9",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.0"
}
}

0 comments on commit 4c9d333

Please sign in to comment.