Skip to content

Commit 120071b

Browse files
chore(release): 102.0.0
1 parent cf4a5a9 commit 120071b

File tree

9 files changed

+3084
-1851
lines changed

9 files changed

+3084
-1851
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
55
This project adheres to [Semantic Versioning](http://semver.org). Except add new
66
rule (it is breaking changed by default).
77

8+
## 102.0.0 - 2019-06-03
9+
10+
- Added: `unicorn/prefer-event-key` rule.
11+
- Added: `unicorn/prefer-flat-map` rule.
12+
- Chore: minimum require `eslint-plugin-ava` version is now `^7.0.0`.
13+
- Chore: minimum require `eslint-plugin-jest` version is now `^22.6.4`.
14+
- Chore: minimum require `eslint-plugin-node` version is now `^9.1.0`.
15+
- Chore: minimum require `eslint-plugin-unicorn` version is now `^9.0.0`.
16+
817
## 101.0.0 - 2019-05-06
918

1019
- Added: `jest/no-mocks-import` rule.

__tests__/fixtures/good.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable max-classes-per-file */
21
import { CLIEngine, linter } from "eslint";
32
import remarkConfig from "remark-preset-lint-itgalaxy";
43

@@ -517,10 +516,10 @@ function handleHands() {
517516
const handsValues = [];
518517
let lastIndex = 0;
519518

520-
for (let first = 0; first < hands.length; first++) {
521-
for (let j = 0; j < hands[first].length; j++) {
522-
for (let k = 0; k < hands[first][j].length; k++) {
523-
handsValues.push(hands[first][j][k]);
519+
for (const element of hands) {
520+
for (const subElement of element) {
521+
for (const subSubElement of subElement) {
522+
handsValues.push(subSubElement);
524523
}
525524
}
526525
}

__tests__/index.js renamed to __tests__/index.test.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,11 @@ alert("test");
324324

325325
test("integration tests for `esnext`", t => {
326326
const cli = new eslint.CLIEngine({
327-
baseConfig: Object.assign({}, configs.esnext),
327+
baseConfig: Object.assign({}, configs.esnext, {
328+
rules: {
329+
"max-classes-per-file": "off"
330+
}
331+
}),
328332
useEslintrc: false
329333
});
330334

File renamed without changes.

lib/config/rules/ava.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,15 @@ module.exports = {
4343
"ava/prefer-async-await": "off",
4444
// Allow only use of the asserts that have no power-assert alternative.
4545
"ava/prefer-power-assert": "off",
46+
// Prefer using `t.regex()` to test regular expressions
47+
// Enable in future
48+
"ava/prefer-t-regex": "off",
4649
// Ensure callback tests are explicitly ended.
4750
"ava/test-ended": "error",
4851
// Ensure tests have a title.
49-
"ava/test-title": ["error", "if-multiple"],
52+
"ava/test-title": "error",
53+
// Ensure test titles have a certain format
54+
"ava/test-title-format": "off",
5055
// Prevent the incorrect use of t.
5156
"ava/use-t-well": "error",
5257
// Ensure test functions use t as their parameter.

lib/config/rules/jest.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ module.exports = {
1313
"jest/no-alias-methods": "error",
1414
// Disallow disabled tests
1515
"jest/no-disabled-tests": "error",
16+
// Disallow commented out tests
17+
"jest/no-commented-out-tests": "off",
1618
// Disallow disabled tests
1719
"jest/no-empty-title": "error",
1820
// Disallow focused tests

lib/config/rules/unicorn.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,12 @@ module.exports = {
5555
"unicorn/number-literal-case": "off",
5656
// Prefer `addEventListener` over `on`-functions.
5757
"unicorn/prefer-add-event-listener": "error",
58+
// Prefer `KeyboardEvent#key` over `KeyboardEvent#keyCode`
59+
"unicorn/prefer-event-key": "error",
5860
// Prefer the exponentiation operator over Math.pow()
5961
"unicorn/prefer-exponentiation-operator": "error",
62+
// Prefer `.flatMap(…)` over `.map(…).flat()`
63+
"unicorn/prefer-flat-map": "error",
6064
// Prefer `.includes()` over `.indexOf()` when checking for existence or non-existence
6165
"unicorn/prefer-includes": "error",
6266
// Prefer `append` over `appendChild`.

0 commit comments

Comments
 (0)