Skip to content

Commit

Permalink
Fix ESLint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
lo1tuma committed Apr 11, 2022
1 parent 4ca2b0e commit 1227c21
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
19 changes: 12 additions & 7 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
{
"extends": [ "plugin:eslint-plugin/recommended" ],

"plugins": [
"eslint-plugin",
"node",
Expand Down Expand Up @@ -291,14 +289,21 @@
"lines-between-class-members": [ "error", "always"],

"node/no-unsupported-features": "error",
"unicorn/prefer-includes": "error",
"eslint-plugin/require-meta-docs-url": [
"error",
{ "pattern": "https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/docs/rules/{{name}}.md" }
]
"unicorn/prefer-includes": "error"
},

"overrides": [
{

"files": ["lib/rules/**/*.js", "test/rules/**/*.js"],
"extends": [ "plugin:eslint-plugin/recommended" ],
"rules": {
"eslint-plugin/require-meta-docs-url": [
"error",
{ "pattern": "https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/docs/rules/{{name}}.md" }
]
}
},
{
"files": [ "test/**/*.js", "benchmarks/**/*.js"],
"env": { "mocha": true },
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/measure.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

const os = require('os');
const { performance } = require('perf_hooks');
const { performance: performanceHooks } = require('perf_hooks');
const times = require('ramda/src/times');
const median = require('ramda/src/median');
const map = require('ramda/src/map');
Expand Down Expand Up @@ -30,10 +30,10 @@ function runBenchmark(fn, count) {
const results = [];

times(() => {
const startTime = performance.now();
const startTime = performanceHooks.now();
const startMemory = process.memoryUsage().rss;
fn();
const endTime = performance.now();
const endTime = performanceHooks.now();
const endMemory = process.memoryUsage().rss;
const duration = endTime - startTime;
const memory = endMemory - startMemory;
Expand Down

0 comments on commit 1227c21

Please sign in to comment.