Skip to content

Commit

Permalink
chore(smalltalk) lint
Browse files Browse the repository at this point in the history
  • Loading branch information
coderaiser committed Dec 15, 2020
1 parent b71b72a commit c20ea24
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 33 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
}
}],
"extends": [
"plugin:putout/recommended",
"plugin:node/recommended"
"plugin:node/recommended",
"plugin:putout/recommended"
],
"plugins": [
"node",
Expand Down
6 changes: 2 additions & 4 deletions .madrun.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ module.exports = {
'watch:coverage': () => run('watch', 'redrun coverage'),
'coverage': () => 'nyc npm test',
'report': () => 'nyc report --reporter=text-lcov | coveralls',
'lint:css': () => 'stylelint css/*.css',
'lint:js': () => 'putout lib test *.js .madrun.js',
'lint': () => run('lint:*'),
'fix:lint': () => run(['lint:js', 'lint:css'], '--fix'),
'lint': () => 'putout .',
'fix:lint': () => run('lint', '--fix'),
'test': () => 'tape \'test/**/*.js\'',
'test:update': () => 'UPDATE_FIXTURE=1 npm test',
'build': () => 'webpack --progress --mode production',
Expand Down
File renamed without changes.
12 changes: 4 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
language: node_js
node_js:
- 14
- 12
- 10

- 15
- 14
script:
- npm run lint
- npm run coverage && npm run report

notifications:
email: true

email: true
sudo: false

cache: false
37 changes: 18 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ In every method of `smalltalk` last parameter *options* is optional and could be
to prevent handling of cancel event and to specify custom button label.

```js
{
cancel: true /* default */
}
({
cancel: true, /* default */
});
```

## smalltalk.alert(title, message [, options])
Expand Down Expand Up @@ -95,23 +95,24 @@ smalltalk
```js
const progress = smalltalk.progress('Cloud Commander', 'Copy /home/coderaiser -> /home/coderaiser/2');

progress.setProgress(41);
progress.setProgress(41)
.catch(() => {
console.log('abort');
});
```

## Custom label
## Custom label

You can use custom label passing into options param the buttons specification. For example :

```js
const tryToCatch = require('try-to-catch');
const OK = 2;
const result = await tryToCatch(smalltalk.confirm, 'Question', 'Are you sure?', {
buttons: {
ok: 'Ok Label',
cancel: 'Cancel Label',
}
},
});

if (result.length === OK)
Expand All @@ -121,18 +122,16 @@ else
```

# License
MIT

[NPMIMGURL]: https://img.shields.io/npm/v/smalltalk.svg?style=flat&longCache=true
[BuildStatusIMGURL]: https://img.shields.io/travis/coderaiser/smalltalk/master.svg?style=flat&longCache=true
[DependencyStatusIMGURL]: https://img.shields.io/david/coderaiser/smalltalk.svg?style=flat&longCache=true
[LicenseIMGURL]: https://img.shields.io/badge/license-MIT-317BF9.svg?style=flat&longCache=true

[NPMURL]: https://npmjs.org/package/smalltalk "npm"
[BuildStatusURL]: https://travis-ci.org/coderaiser/smalltalk "Build Status"
[DependencyStatusURL]: https://david-dm.org/coderaiser/smalltalk "Dependency Status"
[LicenseURL]: https://tldrlegal.com/license/mit-license "MIT License"

[CoverageURL]: https://coveralls.io/github/coderaiser/smalltalk?branch=master
[CoverageIMGURL]: https://coveralls.io/repos/coderaiser/smalltalk/badge.svg?branch=master&service=github
MIT

[NPMIMGURL]: https://img.shields.io/npm/v/smalltalk.svg?style=flat&longCache=true
[BuildStatusIMGURL]: https://img.shields.io/travis/coderaiser/smalltalk/master.svg?style=flat&longCache=true
[DependencyStatusIMGURL]: https://img.shields.io/david/coderaiser/smalltalk.svg?style=flat&longCache=true
[LicenseIMGURL]: https://img.shields.io/badge/license-MIT-317BF9.svg?style=flat&longCache=true
[NPMURL]: https://npmjs.org/package/smalltalk "npm"
[BuildStatusURL]: https://travis-ci.org/coderaiser/smalltalk "Build Status"
[DependencyStatusURL]: https://david-dm.org/coderaiser/smalltalk "Dependency Status"
[LicenseURL]: https://tldrlegal.com/license/mit-license "MIT License"
[CoverageURL]: https://coveralls.io/github/coderaiser/smalltalk?branch=master
[CoverageIMGURL]: https://coveralls.io/repos/coderaiser/smalltalk/badge.svg?branch=master&service=github

0 comments on commit c20ea24

Please sign in to comment.