Skip to content

Commit

Permalink
chore(release): 128.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
evilebottnawi authored Sep 9, 2020
1 parent c0604ae commit e636a4c
Show file tree
Hide file tree
Showing 7 changed files with 682 additions and 458 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ jobs:

- name: Lint
run: npm run lint

# - name: Security audit
# run: npm run security

Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ 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).

## 128.0.0 - 2020-09-09

- Added: `jest/no-done-callback` rule (instead `no-test-callback` rule).
- Changed: relax `prefer-const` rule for `destructuring` and `ignoreReadBeforeAssign`
- Changed: minimum required `eslint` version is now `7.8.1`.
- Changed: minimum required `eslint-plugin-html` version is now `6.1.0`.
- Changed: minimum required `eslint-plugin-jest` version is now `24.0.0`.

## 127.0.0 - 2020-08-19

- Added: `no-loss-of-precision` rule.
Expand Down
24 changes: 24 additions & 0 deletions __tests__/fixtures/good.js
Original file line number Diff line number Diff line change
Expand Up @@ -715,6 +715,30 @@ myLet1 += 2;

console.log(myLet1, myConst1);

const myNumberObjects = [
{ name: "foo", number: 1 },
{ name: "bar", number: 2 },
{ name: "foo", number: 3 },
];

for (const myNumberObject of myNumberObjects) {
let { name, number } = myNumberObject;

if (name === "bar" && number === 2) {
name = "foo";
}
}

let timer;

function initialize() {
if (foo()) {
clearInterval(timer);
}
}

timer = setInterval(initialize, 100);

export { foo, handler };
export {
age as ageExport,
Expand Down
4 changes: 2 additions & 2 deletions lib/config/rules/ecmascript-6.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ module.exports = {
"prefer-const": [
"error",
{
destructuring: "any",
ignoreReadBeforeAssign: false,
destructuring: "all",
ignoreReadBeforeAssign: true,
},
],
"prefer-destructuring": [
Expand Down
30 changes: 14 additions & 16 deletions lib/config/rules/jest.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ module.exports = {
"jest/no-deprecated-functions": "error",
// Disallow disabled tests
"jest/no-disabled-tests": "error",
// Avoid using a callback in asynchronous tests and hooks
"jest/no-done-callback": "error",
// Disallow duplicate hooks within a describe block
"jest/no-duplicate-hooks": "error",
// Disallow using `expect().resolves`
"jest/no-expect-resolves": "off",
// Disallow export from test files
"jest/no-export": "error",
// Disallow focused tests
Expand All @@ -43,28 +43,26 @@ module.exports = {
"jest/no-large-snapshots": "off",
// Disallow manually importing from __mocks__
"jest/no-mocks-import": "error",
// Disallow specific matchers & modifiers
"jest/no-restricted-matchers": "off",
// Disallow specific matchers & modifiers
"jest/no-restricted-matchers": [
"error",
{
toBeTruthy: "Avoid `toBeTruthy`",
toBeFalsy: "Avoid `toBeFalsy`",
},
],
// Prevents `expect` statements outside of a `test` or `it` block
"jest/no-standalone-expect": "error",
// Using a callback in asynchronous tests
"jest/no-test-callback": "off",
// Disallow using `f` & `x` prefixes to define focused/skipped tests
"jest/no-test-prefixes": "error",
// Disallow explicitly returning from tests
"jest/no-test-return-statement": "off",
// Disallow using `toBeTruthy()` & `toBeFalsy()`
"jest/no-truthy-falsy": "error",
// Prevent catch assertions in tests
"jest/no-try-expect": "error",
// Suggest using `toBeCalledWith()` OR `toHaveBeenCalledWith()`
"jest/prefer-called-with": "off",
// Suggest using `expect.assertions()` OR `expect.hasAssertions()`
"jest/prefer-expect-assertions": "off",
// Suggest to have all hooks at top-level before tests
"jest/prefer-hooks-on-top": "error",
// Suggest using `toMatchInlineSnapshot()`
"jest/prefer-inline-snapshots": "off",
// Suggest using `jest.spyOn()`
"jest/prefer-spy-on": "error",
// Suggest using `toStrictEqual()`
Expand All @@ -79,16 +77,16 @@ module.exports = {
"jest/prefer-to-have-length": "error",
// Suggest using `test.todo`
"jest/prefer-todo": "error",
// Require a top-level `describe` block
"jest/require-top-level-describe": "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",
// Enforce having return statement when testing with promises
"jest/valid-expect-in-promise": "error",
// Enforce valid `expect()` usage
"jest/valid-expect": "error",
// Enforce having return statement when testing with promises
"jest/valid-expect-in-promise": "error",
// Enforce valid titles for jest blocks
"jest/valid-title": "error",
};
Loading

0 comments on commit e636a4c

Please sign in to comment.