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

chore: minor typos #359

Merged
merged 2 commits into from Sep 29, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -38,7 +38,7 @@
## 4.3.0

- https://github.com/eslint-community/eslint-plugin-promise/pull/202
- Udpated jest
- Updated jest

## 4.2.2

Expand Down
2 changes: 1 addition & 1 deletion __tests__/no-promise-in-callback.js
Expand Up @@ -20,7 +20,7 @@ ruleTester.run('no-promise-in-callback', rule, {
// arrow functions and other things
'go(() => Promise.resolve(4))',
'go((errrr) => a.then(b))',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why the testing was unhappy when I tried changing this to err/error/errr, but I reverted it

    Message:
      Should have no errors but had 1: [
      {
        ruleId: 'no-promise-in-callback',
        severity: 1,
        message: 'Avoid using promises inside of callbacks.',
        line: 1,
        column: 13,
        nodeType: 'MemberExpression',
        endLine: 1,
        endColumn: 19
      }
    ]

'go((elpers) => { b.catch(c) })',
'go((helpers) => { b.catch(c) })',
'go((e) => { b.then(c, d) })',

// within promises it won't complain
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/no-callback-in-promise.md
Expand Up @@ -53,7 +53,7 @@ Callback got called with: null data
```

Finally, if your callbacks have a Node.js signature (i.e.
`callback(err, data)`), consider using [util.promsify] for promisifying your
`callback(err, data)`), consider using [util.promisify] for promisifying your
callback code instead of combining the approaches.

[util.promisify]:
Expand Down
2 changes: 1 addition & 1 deletion rules/no-native.js
Expand Up @@ -38,7 +38,7 @@ module.exports = {
/**
* Checks for and reports reassigned constants
*
* @param {Scope} scope - an escope Scope object
* @param {Scope} scope - an scope Scope object
nschonni marked this conversation as resolved.
Show resolved Hide resolved
* @returns {void}
* @private
*/
Expand Down