Skip to content

Commit

Permalink
feat: toggling require-await on the testing config
Browse files Browse the repository at this point in the history
  • Loading branch information
erunion committed Jun 9, 2020
1 parent 56560ed commit 283dfa3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Node CI
name: CI

on: [push]

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Core coding standards for ReadMe projects.

## Installation

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+**):
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+**):

```sh
npx install-peerdeps --dev @readme/eslint-config
Expand Down
8 changes: 7 additions & 1 deletion testing.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ module.exports = {
'jest/globals': true,
},
rules: {
'import/no-extraneous-dependencies': 'off',

'jest/consistent-test-it': 'warn',
'jest/expect-expect': 'error',
'jest/no-deprecated-functions': 'off',
Expand All @@ -20,9 +22,13 @@ module.exports = {
'jest/valid-describe': 'error',
'jest/valid-title': 'warn',

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

// Sniff out tests that have useless `async` declarations. Since there's valid usecases for
// having a function be async and not return or await a Promise, we're only running this rule
// for tests where such a case isn't likely to be a thing.
'require-await': 'error',

'sonarjs/no-identical-functions': 'off',
},
};

0 comments on commit 283dfa3

Please sign in to comment.