Skip to content

Commit

Permalink
Replace ‘\n’ with os.EOL (csscomb#524)
Browse files Browse the repository at this point in the history
  • Loading branch information
obenjiro committed Jun 11, 2017
1 parent f739b98 commit 0028e60
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 5 additions & 3 deletions src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
var fs = require('fs');
var parseArgs = require('minimist');
var path = require('path');
var os = require('os');

var Comb = require('./csscomb');
var Errors = require('./errors');
Expand Down Expand Up @@ -86,9 +87,10 @@ function displayHelp() {
' -v, --verbose',
' Whether to print logging info.',
' -t, --tty-mode',
' Run the tool in TTY mode using external app (e.g. IDE).'
' Run the tool in TTY mode using external app (e.g. IDE).',
''
];
process.stdout.write(help.join('\n') + '\n');
process.stdout.write(help.join(os.EOL));
}

function detectConfig() {
Expand Down Expand Up @@ -162,7 +164,7 @@ function processFiles(files) {
`${c.length} file${c.length === 1 ? '' : 's'} processed`,
`${changed} file${changed === 1 ? '' : 's'} fixed`,
''
].join('\n');
].join(os.EOL);
process.stdout.write(message);
}

Expand Down
5 changes: 3 additions & 2 deletions src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
require('babel-polyfill');

let fs = require('fs');
var os = require('os');
let gonzales = require('gonzales-pe');
let minimatch = require('minimatch');
let Errors = require('./errors');
Expand Down Expand Up @@ -145,7 +146,7 @@ class Comb {
result.push(ln + ' | ' + line);
}
}
return result.join('\n');
return result.join(os.EOL);
}

/**
Expand Down Expand Up @@ -364,7 +365,7 @@ class Comb {
let message = filename ? [filename] : [];
message.push(e.message);
message.push('CSScomb Core version: ' + version);
e.stack = e.message = message.join('\n');
e.stack = e.message = message.join(os.EOL);
throw e;
}
});
Expand Down

0 comments on commit 0028e60

Please sign in to comment.