Skip to content

Commit 283dfa3

Browse files
committed
feat: toggling require-await on the testing config
1 parent 56560ed commit 283dfa3

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Node CI
1+
name: CI
22

33
on: [push]
44

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Core coding standards for ReadMe projects.
66

77
## Installation
88

9-
You'll need to install [`eslint`](https://www.npmjs.com/package/eslint) and [`prettier`](https://www.npmjs.com/package/prettier) into your project. Use this shortcut to install them alongside the config (if using **npm 5+**):
9+
You'll need to install [`ESLint`](https://www.npmjs.com/package/eslint) and [`Prettier`](https://www.npmjs.com/package/prettier) into your project. Use this shortcut to install them alongside the config (if using **npm 5+**):
1010

1111
```sh
1212
npx install-peerdeps --dev @readme/eslint-config

testing.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ module.exports = {
55
'jest/globals': true,
66
},
77
rules: {
8+
'import/no-extraneous-dependencies': 'off',
9+
810
'jest/consistent-test-it': 'warn',
911
'jest/expect-expect': 'error',
1012
'jest/no-deprecated-functions': 'off',
@@ -20,9 +22,13 @@ module.exports = {
2022
'jest/valid-describe': 'error',
2123
'jest/valid-title': 'warn',
2224

23-
'import/no-extraneous-dependencies': 'off',
2425
'node/no-extraneous-require': 'off',
2526

27+
// Sniff out tests that have useless `async` declarations. Since there's valid usecases for
28+
// having a function be async and not return or await a Promise, we're only running this rule
29+
// for tests where such a case isn't likely to be a thing.
30+
'require-await': 'error',
31+
2632
'sonarjs/no-identical-functions': 'off',
2733
},
2834
};

0 commit comments

Comments
 (0)