Skip to content

Commit

Permalink
chore(deps): update (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait authored Oct 11, 2021
1 parent 36bc0e9 commit ef380dd
Show file tree
Hide file tree
Showing 8 changed files with 1,343 additions and 1,376 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org). Except add new
rule (it is breaking changed by default).

## 135.0.0 - 2021-10-11

- Changed: update minimum required deps.

## 134.0.0 - 2021-09-17

- Added: `commonjs` preset (before it was the `script` preset).
Expand Down
3 changes: 3 additions & 0 deletions __tests__/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,9 @@ test("should load the 'all' preset", (t) => {
"./lib/config/ava.js",
],
},
rules: {
"jest/require-hook": "off",
},
});

const configForFile = cli.getConfigForFile("tests/myfile.test.js");
Expand Down
8 changes: 0 additions & 8 deletions lib/config/rules/ava.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ module.exports = {
"ava/max-asserts": ["off", 5],
// Ensure that async tests use await
"ava/no-async-fn-without-await": "error",
// Ensure no test.cb() is used.
"ava/no-cb-test": "off",
// Ensure tests do not have duplicate modifiers.
"ava/no-duplicate-modifiers": "error",
// Ensure no tests have the same title.
Expand All @@ -25,8 +23,6 @@ module.exports = {
"ava/no-incorrect-deep-equal": "error",
// Ensure assertions are not called from inline arrow functions.
"ava/no-inline-assertions": "error",
// Ensure t.end() is only called inside test.cb().
"ava/no-invalid-end": "error",
// Ensure no tests are nested.
"ava/no-nested-tests": "error",
// Ensure no test.only() are present.
Expand All @@ -35,8 +31,6 @@ module.exports = {
"ava/no-skip-assert": "error",
// Ensure no tests are skipped.
"ava/no-skip-test": "error",
// Ensure t.end() is the last statement executed.
"ava/no-statement-after-end": "error",
// Ensure test.todo() is not given an implementation function.
"ava/no-todo-implementation": "error",
// Ensure no test.todo() is used.
Expand All @@ -52,8 +46,6 @@ module.exports = {
// Prefer using `t.regex()` to test regular expressions
// TODO Enable in future
"ava/prefer-t-regex": "off",
// Ensure callback tests are explicitly ended.
"ava/test-ended": "error",
// Ensure tests have a title.
"ava/test-title": "error",
// Ensure test titles have a certain format
Expand Down
14 changes: 8 additions & 6 deletions lib/config/rules/jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
// Enforce assertion to be made in a test body
"jest/expect-expect": "error",
// Disallow capitalized test names
"jest/lowercase-name": "error",
"jest/prefer-lowercase-title": "error",
// Enforces a maximum depth to nested describe calls
"jest/max-nested-describe": "off",
// Disallow alias methods
Expand Down Expand Up @@ -63,28 +63,30 @@ module.exports = {
"jest/prefer-called-with": "off",
// Suggest using `expect.assertions()` OR `expect.hasAssertions()`
"jest/prefer-expect-assertions": "off",
// Prefer `await expect(...).resolves` over `expect(await ...)` syntax
"jest/prefer-expect-resolves": "error",
// Suggest to have all hooks at top-level before tests
"jest/prefer-hooks-on-top": "error",
// Suggest using `jest.spyOn()`
"jest/prefer-spy-on": "error",
// Suggest using `toStrictEqual()`
"jest/prefer-strict-equal": "off",
// Suggest using `toBeNull()`
"jest/prefer-to-be-null": "error",
// Suggest using `toBeUndefined()`
"jest/prefer-to-be-undefined": "error",
// Suggest using `toBe()` for primitive literals
"jest/prefer-to-be": "error",
// Suggest using `toContain()`
"jest/prefer-to-contain": "error",
// Suggest using `toHaveLength()`
"jest/prefer-to-have-length": "error",
// Suggest using `test.todo`
"jest/prefer-todo": "error",
// Require setup and teardown code to be within a hook
"jest/require-hook": "error",
// Require that `toThrow()` and `toThrowError()` includes a message
"jest/require-to-throw-message": "error",
// Require a top-level `describe` block
"jest/require-top-level-describe": "error",
// Enforce valid `describe()` callback
"jest/valid-describe": "error",
"jest/valid-describe-callback": "error",
// Enforce valid `expect()` usage
"jest/valid-expect": "error",
// Enforce having return statement when testing with promises
Expand Down
2 changes: 2 additions & 0 deletions lib/config/rules/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ module.exports = {
ignoreStateless: true,
},
],
// Enforce that namespaces are not used in React elements
"react/no-namespace": "error",
// Prevent usage of shouldComponentUpdate when extending React.PureComponent
"react/no-redundant-should-component-update": "error",
// Prevent usage of the return value of `React.render`.
Expand Down
2 changes: 2 additions & 0 deletions lib/config/rules/unicorn.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@ module.exports = {
// "unicorn/require-post-message-target-origin": "error",
// Enforce better string content
"unicorn/string-content": "off",
// Fix whitespace-insensitive template indentation.
// "unicorn/template-indent": "off",
// Require new when throwing an error (fixable)
"unicorn/throw-new-error": "error",
};
Loading

0 comments on commit ef380dd

Please sign in to comment.