Skip to content

Commit

Permalink
Update eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
zertosh committed Oct 28, 2020
1 parent 7ea939a commit 28aa546
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 270 deletions.
262 changes: 0 additions & 262 deletions .eslintrc.js

This file was deleted.

14 changes: 14 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"root": true,
"parserOptions": {
"ecmaVersion": 6
},
"env": {
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"rules": {
"strict": "warn"
}
}
1 change: 0 additions & 1 deletion bench/_measure.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-console */
'use strict';

module.exports = (name, withCache, callback) => {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"dependencies": {},
"devDependencies": {
"babel-core": "6.26.3",
"eslint": "^3.15.0",
"eslint": "^7.12.1",
"flow-parser": "0.136.0",
"rimraf": "^2.5.4",
"rxjs": "6.6.3",
Expand Down
3 changes: 1 addition & 2 deletions test/slashEscape-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ var escapes = {
};

tap.test('escape', t => {
for (var key in escapes) {
if (!escapes.hasOwnProperty(key)) continue;
for (const key of Object.keys(escapes)) {
t.equal(
slashEscape(key),
escapes[key]
Expand Down
7 changes: 3 additions & 4 deletions v8-compile-cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ class FileSystemBlobStore {
try {
fs.writeFileSync(this._blobFilename, blobToStore);
fs.writeFileSync(this._mapFilename, mapToStore);
} catch (error) {
throw error;
} finally {
fs.unlinkSync(this._lockFilename);
}
Expand Down Expand Up @@ -301,7 +299,8 @@ function slashEscape(str) {
'\x00': 'z0',
'z': 'zZ',
};
return str.replace(/[\\:\/\x00z]/g, match => (ESCAPE_LOOKUP[match]));
const ESCAPE_REGEX = /[\\:/\x00z]/g; // eslint-disable-line no-control-regex
return str.replace(ESCAPE_REGEX, match => ESCAPE_LOOKUP[match]);
}

function supportsCachedData() {
Expand Down Expand Up @@ -348,7 +347,7 @@ if (!process.env.DISABLE_V8_COMPILE_CACHE && supportsCachedData()) {
nativeCompileCache.setCacheStore(blobStore);
nativeCompileCache.install();

process.once('exit', code => {
process.once('exit', () => {
if (blobStore.isDirty()) {
blobStore.save();
}
Expand Down

0 comments on commit 28aa546

Please sign in to comment.