Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[eslint-config] Re-enable 'eslint-plugin-promise' rules #3108

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions build-tests/install-test-workspace/workspace/common/pnpm-lock.yaml

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@rushstack/eslint-config",
"comment": "Re-enable eslint-plugin-promise rules which now support ESLint v8",
"type": "patch"
}
],
"packageName": "@rushstack/eslint-config"
}
11 changes: 11 additions & 0 deletions common/config/rush/pnpm-lock.yaml

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

2 changes: 1 addition & 1 deletion common/config/rush/repo-state.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush.
{
"pnpmShrinkwrapHash": "8f53532ad47748ac29025ff560e44472e10ea2e7",
"pnpmShrinkwrapHash": "47aca98c44b4e322021c9f4f7f8bba4ddd58a905",
"preferredVersionsHash": "87aab8e8f0a6545cb9d0ea30194ba68279d285a8"
}
1 change: 1 addition & 0 deletions eslint/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"@typescript-eslint/experimental-utils": "~5.6.0",
"@typescript-eslint/parser": "~5.6.0",
"@typescript-eslint/typescript-estree": "~5.6.0",
"eslint-plugin-promise": "~6.0.0",
"eslint-plugin-react": "~7.27.1",
"eslint-plugin-tsdoc": "~0.2.14"
},
Expand Down
8 changes: 3 additions & 5 deletions eslint/eslint-config/profile/_common.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,9 @@ function buildRules(profile) {
// Plugin documentation: https://www.npmjs.com/package/@rushstack/eslint-plugin-security
'@rushstack/eslint-plugin-security',
// Plugin documentation: https://www.npmjs.com/package/@typescript-eslint/eslint-plugin
'@typescript-eslint/eslint-plugin'
'@typescript-eslint/eslint-plugin',
// Plugin documentation: https://www.npmjs.com/package/eslint-plugin-promise
// TODO: Re-enable once updated to support eslint v8: https://github.com/xjamundx/eslint-plugin-promise/issues/218
// 'eslint-plugin-promise'
'eslint-plugin-promise'
],

// Manually authored .d.ts files are generally used to describe external APIs that are not expected
Expand Down Expand Up @@ -761,8 +760,7 @@ function buildRules(profile) {
'prefer-const': 'warn',

// RATIONALE: Catches a common coding mistake where "resolve" and "reject" are confused.
// TODO: Re-enable once updated to support eslint v8: https://github.com/xjamundx/eslint-plugin-promise/issues/218
// 'promise/param-names': 'error',
'promise/param-names': 'error',

// RATIONALE: Catches code that is likely to be incorrect
// STANDARDIZED BY: eslint\conf\eslint-recommended.js
Expand Down