Skip to content

Commit

Permalink
Add linting (#1053)
Browse files Browse the repository at this point in the history
  • Loading branch information
kibertoad committed Jan 5, 2020
1 parent a5b97ae commit 008766f
Show file tree
Hide file tree
Showing 7 changed files with 802 additions and 62 deletions.
3 changes: 0 additions & 3 deletions .editorconfig

This file was deleted.

28 changes: 28 additions & 0 deletions .eslintrc.js
@@ -0,0 +1,28 @@
module.exports = {
parserOptions: {
ecmaVersion: 2015,
},
extends: [
'eslint:recommended',
'prettier',
],
plugins: [],
rules: {
'no-console': 0,
'no-octal': 0,
'no-var': 2,
'no-empty': 0,
'no-debugger': 2,
'prefer-const': 2,
'no-fallthrough': 2,
'require-atomic-updates': 0,
'no-useless-escape': 0,
'no-unused-vars': 0,
"no-var": 0 // ToDo
},
env: {
node: true,
mocha: true,
es6: true,
},
};
54 changes: 0 additions & 54 deletions .jshintrc

This file was deleted.

6 changes: 6 additions & 0 deletions .prettierrc
@@ -0,0 +1,6 @@
{
"singleQuote": true,
"trailingComma": "es5",
"arrowParens": "always",
"endOfLine": "lf"
}
8 changes: 4 additions & 4 deletions lib/forever.js
Expand Up @@ -623,8 +623,8 @@ forever.tail = function (target, options, callback) {
tail.stdio[1].on('data', function (data) {
var chunk = data.split('\n\n');
chunk.forEach(function (logs) {
var logs = logs.split('\n').filter(blanks),
file = logs.filter(title),
var filteredLogs = logs.split('\n').filter(blanks),
file = filteredLogs.filter(title),
lines,
proc;

Expand All @@ -633,8 +633,8 @@ forever.tail = function (target, options, callback) {
: map[procs[0].logFile];

lines = count !== 1
? logs.slice(1)
: logs;
? filteredLogs.slice(1)
: filteredLogs;

lines.forEach(function (line) {
callback(null, { file: proc.file, pid: proc.pid, line: line });
Expand Down

0 comments on commit 008766f

Please sign in to comment.