Skip to content

Commit

Permalink
Merge pull request #3108 from D4N14L/user/danade/ReenableEslintPlugin…
Browse files Browse the repository at this point in the history
…Promise

[eslint-config] Re-enable 'eslint-plugin-promise' rules
  • Loading branch information
iclanton committed Dec 25, 2021
2 parents 919fa13 + d53019b commit e357802
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 13 deletions.
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

0 comments on commit e357802

Please sign in to comment.