Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: enable additional lint rules #5357

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ env:
rules:
# Possible Errors
# https://github.com/eslint/eslint/tree/master/docs/rules#possible-errors
comma-dangle: [2, "only-multiline"]
no-control-regex: 2
no-debugger: 2
no-dupe-args: 2
Expand All @@ -30,6 +31,7 @@ rules:
no-fallthrough: 2
no-octal: 2
no-redeclare: 2
no-unused-labels: 2

# Variables
# http://eslint.org/docs/rules/#variables
Expand All @@ -41,6 +43,7 @@ rules:
# http://eslint.org/docs/rules/#nodejs-and-commonjs
no-mixed-requires: 2
no-new-require: 2
no-path-concat: 2
no-restricted-modules: [2, "sys", "_linklist"]

# Stylistic Issues
Expand Down Expand Up @@ -71,6 +74,7 @@ rules:
no-confusing-arrow: 2
no-const-assign: 2
no-dupe-class-members: 2
no-new-symbol: 2
no-this-before-super: 2
prefer-const: 2

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-fs-access.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var common = require('../common');
var assert = require('assert');
var fs = require('fs');
var path = require('path');
var doesNotExist = __filename + '__this_should_not_exist';
var doesNotExist = path.join(common.tmpDir, '__this_should_not_exist');
var readOnlyFile = path.join(common.tmpDir, 'read_only_file');
var readWriteFile = path.join(common.tmpDir, 'read_write_file');

Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-fs-stat.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ fs.open('.', 'r', undefined, function(err, fd) {
fs.close(fd);
});

console.log('stating: ' + __filename);
console.log(`stating: ${__filename}`);
fs.stat(__filename, function(err, s) {
if (err) {
got_error = true;
Expand Down
2 changes: 1 addition & 1 deletion test/parallel/test-stdio-closed.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if (process.argv[2] === 'child') {
}

// Run the script in a shell but close stdout and stderr.
var cmd = '"' + process.execPath + '" "' + __filename + '" child 1>&- 2>&-';
var cmd = `"${process.execPath}" "${__filename}" child 1>&- 2>&-`;
var proc = spawn('/bin/sh', ['-c', cmd], { stdio: 'inherit' });

proc.on('exit', common.mustCall(function(exitCode) {
Expand Down