Skip to content

Commit

Permalink
space-before-function-paren never
Browse files Browse the repository at this point in the history
  • Loading branch information
UziTech committed May 4, 2019
1 parent 2881fc9 commit 1a1dd43
Show file tree
Hide file tree
Showing 5 changed files with 151 additions and 151 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"ignoreComments": false
}],
"operator-linebreak": ["error", "before", { "overrides": { "=": "after" } }],
"space-before-function-paren": ["error", "never"],
"no-cond-assign": "off",
"no-useless-escape": "off",
"one-var": "off",
Expand Down Expand Up @@ -150,7 +151,6 @@
"rest-spread-spacing": ["error", "never"],
"semi-spacing": ["error", { "before": false, "after": true }],
"space-before-blocks": ["error", "always"],
"space-before-function-paren": ["error", "always"],
"space-in-parens": ["error", "never"],
"space-infix-ops": "error",
"space-unary-ops": ["error", { "words": true, "nonwords": false }],
Expand Down
34 changes: 17 additions & 17 deletions bin/marked
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var fs = require('fs'),
* Man Page
*/

function help () {
function help() {
var spawn = require('child_process').spawn;

var options = {
Expand All @@ -24,15 +24,15 @@ function help () {
};

spawn('man', [path.resolve(__dirname, '/../man/marked.1')], options)
.on('error', function () {
fs.readFile(path.resolve(__dirname, '/../man/marked.1.txt'), 'utf8', function (err, data) {
.on('error', function() {
fs.readFile(path.resolve(__dirname, '/../man/marked.1.txt'), 'utf8', function(err, data) {
if (err) throw err;
console.log(data);
});
});
}

function version () {
function version() {
var pkg = require('../package.json');
console.log(pkg.version);
}
Expand All @@ -41,7 +41,7 @@ function version () {
* Main
*/

function main (argv, callback) {
function main(argv, callback) {
var files = [],
options = {},
input,
Expand All @@ -51,7 +51,7 @@ function main (argv, callback) {
tokens,
opt;

function getarg () {
function getarg() {
var arg = argv.shift();

if (arg.indexOf('--') === 0) {
Expand All @@ -65,7 +65,7 @@ function main (argv, callback) {
} else if (arg[0] === '-') {
if (arg.length > 2) {
// e.g. -abc
argv = arg.substring(1).split('').map(function (ch) {
argv = arg.substring(1).split('').map(function(ch) {
return '-' + ch;
}).concat(argv);
arg = argv.shift();
Expand Down Expand Up @@ -128,7 +128,7 @@ function main (argv, callback) {
}
}

function getData (callback) {
function getData(callback) {
if (!input) {
if (files.length <= 2) {
if (string) {
Expand All @@ -141,7 +141,7 @@ function main (argv, callback) {
return fs.readFile(input, 'utf8', callback);
}

return getData(function (err, data) {
return getData(function(err, data) {
if (err) return callback(err);

data = tokens
Expand All @@ -161,21 +161,21 @@ function main (argv, callback) {
* Helpers
*/

function getStdin (callback) {
function getStdin(callback) {
var stdin = process.stdin,
buff = '';

stdin.setEncoding('utf8');

stdin.on('data', function (data) {
stdin.on('data', function(data) {
buff += data;
});

stdin.on('error', function (err) {
stdin.on('error', function(err) {
return callback(err);
});

stdin.on('end', function () {
stdin.on('end', function() {
return callback(null, buff);
});

Expand All @@ -186,13 +186,13 @@ function getStdin (callback) {
}
}

function camelize (text) {
return text.replace(/(\w)-(\w)/g, function (_, a, b) {
function camelize(text) {
return text.replace(/(\w)-(\w)/g, function(_, a, b) {
return a + b.toUpperCase();
});
}

function handleError (err) {
function handleError(err) {
if (err.code === 'ENOENT') {
console.error('marked: output to ' + err.path + ': No such directory');
return process.exit(1);
Expand All @@ -206,7 +206,7 @@ function handleError (err) {

if (!module.parent) {
process.title = 'marked';
main(process.argv.slice(), function (err, code) {
main(process.argv.slice(), function(err, code) {
if (err) return handleError(err);
return process.exit(code || 0);
});
Expand Down
Loading

0 comments on commit 1a1dd43

Please sign in to comment.