Skip to content

Commit 765fc06

Browse files
committed
chore(fileop) lint
1 parent e87b426 commit 765fc06

File tree

7 files changed

+51
-56
lines changed

7 files changed

+51
-56
lines changed

.babelrc.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
{
2-
"plugins": [
3-
"@babel/plugin-proposal-private-methods",
4-
"@babel/plugin-proposal-class-properties",
5-
"dynamic-import-node"
6-
],
7-
"env": {
8-
"test": {
9-
"plugins": [
2+
"plugins": [
3+
"@babel/plugin-proposal-private-methods",
4+
"@babel/plugin-proposal-class-properties",
105
"dynamic-import-node"
11-
]
12-
},
13-
"client": {
14-
"presets": [
15-
"@babel/preset-env"
16-
],
17-
"plugins": [
18-
"dynamic-import-webpack"
19-
]
6+
],
7+
"env": {
8+
"test": {
9+
"plugins": [
10+
"dynamic-import-node"
11+
]
12+
},
13+
"client": {
14+
"presets": [
15+
"@babel/preset-env"
16+
],
17+
"plugins": [
18+
"dynamic-import-webpack"
19+
]
20+
}
2021
}
21-
}
2222
}

.eslintrc.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
}
2121
}],
2222
"extends": [
23-
"plugin:putout/recommended",
24-
"plugin:node/recommended"
23+
"plugin:node/recommended",
24+
"plugin:putout/recommended"
2525
],
2626
"plugins": [
2727
"putout",

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ npm-debug.log
77

88
dist
99
dist-dev
10-
legacy
1110
server_
1211
*.swp
1312
.putoutcache

.madrun.js renamed to .madrun.mjs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
'use strict';
1+
import {run} from 'madrun';
22

3-
const {run} = require('madrun');
4-
5-
module.exports = {
3+
export default {
64
'test': () => `tape 'test/**/*.js'`,
7-
'lint': () => 'putout client server test .madrun.js webpack.config.js',
5+
'lint': () => 'putout .',
6+
'fresh:lint': () => run('lint', '--fresh'),
7+
'lint:fresh': () => run('lint', '--fresh'),
88
'fix:lint': () => run('lint', '--fix'),
9-
'coverage': () => `nyc ${run('test')}`,
9+
'coverage': async () => `nyc ${await run('test')}`,
1010
'report': () => `nyc report --reporter=text-lcov | coveralls`,
1111
'build': () => run(['rmdir', 'build:*']),
1212
'build-progress': () => 'BABEL_ENV=client webpack --progress',
1313
'build:client': () => run('build-progress', '--mode production'),
14-
'build:client:dev': () => `NODE_ENV=development ${run('build-progress', '--mode development')}`,
14+
'build:client:dev': async () => `NODE_ENV=development ${await run('build-progress', '--mode development')}`,
1515
'watcher': () => 'nodemon -w client -w server -w test --exec',
1616
'watch:test': () => run('watcher', '\'npm test\''),
1717
'watch:coverage': () => run('watcher', '\'npm run coverage\''),

.travis.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
language: node_js
22
node_js:
3-
- 14
4-
- 12
5-
3+
- 15
4+
- 14
65
script:
76
- npm run lint
87
- npm run build
98
- npm run coverage
109
- npm run report
11-
1210
notifications:
13-
email:
14-
on_success: never
15-
on_failure: change
16-
11+
email:
12+
on_success: never
13+
on_failure: change
1714
sudo: false
18-
15+
cache: false

README.md

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ It is `EventEmitter` from the inide produce next types of `events`:
3333

3434
Supports next types of operations:
3535

36-
- `operator.copy(from, to, names)`
37-
- `operator.move(from, to, names)`
38-
- `opreator.remove(from, names)`
39-
- `opreator.extract(from, to)`
40-
- `operator.zip(from, to)`
41-
- `operator.tar(from, to)`
36+
- `operator.copy(from, to, names)`
37+
- `operator.move(from, to, names)`
38+
- `opreator.remove(from, names)`
39+
- `opreator.extract(from, to)`
40+
- `operator.zip(from, to)`
41+
- `operator.tar(from, to)`
4242

4343
```js
4444
const prefix = '/fileop';
@@ -49,7 +49,7 @@ const operator = await fileop({
4949
const from = '/';
5050
const to = '/tmp';
5151
const names = [
52-
'bin'
52+
'bin',
5353
];
5454
const progress = (value) => {
5555
console.log('progress:', value);
@@ -118,14 +118,13 @@ MIT
118118
- [Remedy](https://github.com/coderaiser/node-remedy "Remedy") - emitting middleware for file removing
119119
- [Ishtar](https://github.com/coderaiser/node-ishtar "Ishtar") - pack and extract .tar.gz archives middleware
120120
- [Omnes](https://github.com/cloudcmd/node-omnes "Omnes") - extract zip, gz, tar, tar.gz, tgz archives middleware
121-
- [Salam](https://github.com/coderaiser/node-salam "Salam") - pack and extract zip archives middleware
122-
123-
[NPMIMGURL]: https://img.shields.io/npm/v/@cloudcmd/fileop.svg?style=flat
124-
[DependencyStatusIMGURL]: https://img.shields.io/david/cloudcmd/node-fileop.svg?style=flat
125-
[LicenseIMGURL]: https://img.shields.io/badge/license-MIT-317BF9.svg?style=flat
126-
[BuildStatusIMGURL]: https://img.shields.io/travis/cloudcmd/node-fileop/master.svg?style=flat
127-
[NPMURL]: https://npmjs.org/package/@cloudcmd/fileop "npm"
128-
[DependencyStatusURL]: https://david-dm.org/cloudcmd/node-fileop "Dependency Status"
129-
[LicenseURL]: https://tldrlegal.com/license/mit-license "MIT License"
130-
[BuildStatusURL]: https://travis-ci.org/cloudcmd/node-fileop "Build Status"
131-
121+
- [Salam](https://github.com/coderaiser/node-salam "Salam") - pack and extract zip archives middleware
122+
123+
[NPMIMGURL]: https://img.shields.io/npm/v/@cloudcmd/fileop.svg?style=flat
124+
[DependencyStatusIMGURL]: https://img.shields.io/david/cloudcmd/node-fileop.svg?style=flat
125+
[LicenseIMGURL]: https://img.shields.io/badge/license-MIT-317BF9.svg?style=flat
126+
[BuildStatusIMGURL]: https://img.shields.io/travis/cloudcmd/node-fileop/master.svg?style=flat
127+
[NPMURL]: https://npmjs.org/package/@cloudcmd/fileop "npm"
128+
[DependencyStatusURL]: https://david-dm.org/cloudcmd/node-fileop "Dependency Status"
129+
[LicenseURL]: https://tldrlegal.com/license/mit-license "MIT License"
130+
[BuildStatusURL]: https://travis-ci.org/cloudcmd/node-fileop "Build Status"

test/lib/connect.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const {promisify} = require('es6-promisify');
99
const fileop = require('../..');
1010

1111
module.exports = promisify(connect);
12-
const getPrefix = (a) => a && a.prefix;
12+
const getPrefix = (a) => a?.prefix;
1313

1414
function connect(config, callback) {
1515
const {options, fn} = whenNoFn(config, callback);

0 commit comments

Comments
 (0)