Skip to content

Commit

Permalink
chore(read-files-sync) lint
Browse files Browse the repository at this point in the history
  • Loading branch information
coderaiser committed Oct 16, 2019
1 parent e145b59 commit af3703d
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 24 deletions.
13 changes: 0 additions & 13 deletions .eslintrc

This file was deleted.

13 changes: 13 additions & 0 deletions .eslintrc.json
@@ -0,0 +1,13 @@
{
"rules": {
"node/no-unsupported-features/node-builtins": "off"
},
"extends": [
"plugin:putout/recommended",
"plugin:node/recommended"
],
"plugins": [
"putout",
"node"
]
}
4 changes: 2 additions & 2 deletions lib/read-files-sync.js
Expand Up @@ -6,7 +6,7 @@ const currify = require('currify');
const mkobject = require('mkobject');
const getBaseName = (name) => path.basename(name, path.extname(name));

const isUndefined =(a) => typeof a === 'undefined'
const isUndefined = (a) => typeof a === 'undefined';
const isString = (a) => typeof a === 'string';
const isObj = (a) => typeof a === 'object';

Expand All @@ -26,7 +26,7 @@ module.exports = (dir, names, mode) => {
const baseNames = names.map(getBaseName);
const values = names
.map(join(dir))
.map(readSync(mode))
.map(readSync(mode));

return mkobject(baseNames, values);
};
Expand Down
16 changes: 7 additions & 9 deletions madrun.js
@@ -1,16 +1,14 @@
'use strict';

const {
run
} = require('madrun');
const {run} = require('madrun');

module.exports = {
"test": () => 'tape test/*.js',
"lint": () => 'putout lib test madrun.js',
'test': () => 'tape test/*.js',
'lint': () => 'putout lib test madrun.js',
'fix:lint': () => run('lint', '--fix'),
"watch:test": () => run('watcher', '"npm test"'),
"watcher": () => 'nodemon -w lib -w test -x',
"coverage": () => 'nyc npm test',
"report": () => 'nyc report --reporter=text-lcov | coveralls'
'watch:test': () => run('watcher', '"npm test"'),
'watcher': () => 'nodemon -w lib -w test -x',
'coverage': () => 'nyc npm test',
'report': () => 'nyc report --reporter=text-lcov | coveralls',
};

0 comments on commit af3703d

Please sign in to comment.