Skip to content

Commit

Permalink
Explicitly enable promise recommended rules (#5)
Browse files Browse the repository at this point in the history
I had a quick look and there are some sensible rules there I believe[1].

Our backend is mostly compatible with this addition.

We currently use eslint-config-standard that does something similar but
I plan to get rid of that dependency.

[1] https://www.npmjs.com/package/eslint-plugin-promise
  • Loading branch information
jstasiak authored Aug 22, 2024
1 parent 901f96c commit 5c748d8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module.exports = {
browser: true,
es2021: true,
},
extends: ['standard', 'prettier', 'eslint:recommended'],
extends: ['standard', 'prettier', 'eslint:recommended', 'plugin:promise/recommended'],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 12,
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"peerDependencies": {
"@typescript-eslint/eslint-plugin": "^5.0.0 || ^6.7.5",
"eslint": "^7.0.0 || ^8.51.0",
"eslint-plugin-promise": "^7.1.0",
"eslint-plugin-simple-import-sort": "^10.0.0"
},
"dependencies": {
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ eslint-config-standard@^17.1.0:
resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-17.1.0.tgz#40ffb8595d47a6b242e07cbfd49dc211ed128975"
integrity sha512-IwHwmaBNtDK4zDHQukFDW5u/aTb8+meQWZvNFWkiGmbWjD6bqyuSSBxxXKkCftCUzc1zwCH2m/baCNDLGmuO5Q==

eslint-plugin-promise@^7.1.0:
version "7.1.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-7.1.0.tgz#06b3ad6d36b3c3ef3ec201c8a8d97049cf5dbb20"
integrity sha512-8trNmPxdAy3W620WKDpaS65NlM5yAumod6XeC4LOb+jxlkG4IVcp68c6dXY2ev+uT4U1PtG57YDV6EGAXN0GbQ==

prettier@^3.0.3:
version "3.0.3"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.0.3.tgz#432a51f7ba422d1469096c0fdc28e235db8f9643"
Expand Down

0 comments on commit 5c748d8

Please sign in to comment.