Skip to content

Commit

Permalink
upgrade eslint and prettier modules
Browse files Browse the repository at this point in the history
  • Loading branch information
sasaplus1 committed Mar 6, 2021
1 parent 3076244 commit ce9d9f1
Show file tree
Hide file tree
Showing 4 changed files with 185 additions and 127 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = {
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:prettier/recommended',
'prettier/@typescript-eslint'
'prettier'
],
files: ['**/*.ts'],
parser: '@typescript-eslint/parser',
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
"@typescript-eslint/eslint-plugin": "^4.16.1",
"@typescript-eslint/parser": "^4.16.1",
"benchmark": "^2.1.4",
"eslint": "^7.7.0",
"eslint-config-prettier": "^6.11.0",
"eslint": "^7.21.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-prettier": "^3.3.1",
"espower-typescript": "^10.0.0",
"husky": "^4.2.5",
"karma": "^6.1.1",
Expand All @@ -36,7 +36,7 @@
"mocha": "^8.1.1",
"npm-run-all": "^4.1.5",
"power-assert": "^1.6.1",
"prettier": "^2.0.5",
"prettier": "^2.2.1",
"rollup": "^2.26.2",
"rollup-plugin-terser": "^7.0.0",
"rollup-plugin-typescript": "^1.0.1",
Expand Down
31 changes: 18 additions & 13 deletions test/clone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,10 @@ describe('clone', function () {
}

const data = [1, 2, 3][Symbol.iterator]();
const result = clone(data, detectType(data)) as IterableIterator<
number
>;
const result = clone(
data,
detectType(data)
) as IterableIterator<number>;

assert(result === data);
});
Expand Down Expand Up @@ -330,9 +331,10 @@ describe('clone', function () {
}

const data = new Set<number>([1, 2, 3])[Symbol.iterator]();
const result = clone(data, detectType(data)) as IterableIterator<
number
>;
const result = clone(
data,
detectType(data)
) as IterableIterator<number>;

assert(result === data);
});
Expand All @@ -342,9 +344,10 @@ describe('clone', function () {
}

const data = '寿司'[Symbol.iterator]();
const result = clone(data, detectType(data)) as IterableIterator<
string
>;
const result = clone(
data,
detectType(data)
) as IterableIterator<string>;

assert(result === data);
});
Expand Down Expand Up @@ -440,10 +443,12 @@ describe('clone', function () {
it('Arguments', function () {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
(function (one: number, two: number, three: number): void {
// eslint-disable-next-line prefer-rest-params
const result = clone(arguments, detectType(arguments)) as Array<
number
>;
const result = clone(
// eslint-disable-next-line prefer-rest-params
arguments,
// eslint-disable-next-line prefer-rest-params
detectType(arguments)
) as Array<number>;

assert(Array.isArray(result));
assert(result.length === 0);
Expand Down
Loading

1 comment on commit ce9d9f1

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: ce9d9f1 Previous: 4cd53e4 Ratio
deepcopy:fixture1 28860 ops/sec (±0.28%) 24948 ops/sec (±1.20%) 0.86

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.