cleanup lint ignore error: only-arrow-functions

This commit is contained in:
segayuu
2017-12-15 11:59:49 +09:00
parent 2add5d1ab9
commit 9176b6ea82
2 changed files with 10 additions and 11 deletions
+10 -10
View File
@@ -11,14 +11,14 @@ let str = "This is a stylus test";
/**
* Basic Usage
*/
stylus.render(str, { filename: 'nesting.css' }, function(err, css) {
stylus.render(str, { filename: 'nesting.css' }, (err, css) => {
if (err) throw err;
console.log(css);
});
stylus(str)
.set('filename', 'nesting.css')
.render(function(err, css) {
.render((err, css) => {
// logic
});
@@ -29,7 +29,7 @@ stylus(str)
stylus(str)
.set('filename', __dirname + '/test.styl')
.set('paths', [__dirname, __dirname + '/mixins'])
.render(function(err, css) {
.render((err, css) => {
// logic
});
@@ -40,7 +40,7 @@ stylus(str)
stylus(str)
.include(require('nib').path)
.include(process.env.HOME + '/mixins')
.render(function(err, css) {
.render((err, css) => {
// logic
});
@@ -51,7 +51,7 @@ stylus(str)
stylus(str)
.set('filename', __dirname + '/test.styl')
.import('mixins/vendor')
.render(function(err, css) {
.render((err, css) => {
if (err) throw err;
console.log(css);
});
@@ -72,11 +72,11 @@ stylus(str)
.define('list', { foo: 'bar', bar: 'baz' })
.define('families', ['Helvetica Neue', 'Helvetica', 'sans-serif'])
.define('get-list', function() {
.define('get-list', () => {
return ['foo', 'bar', 'baz'];
})
.render(function(err, css) {
.render((err, css) => {
if (err) throw err;
console.log(css);
});
@@ -85,16 +85,16 @@ stylus(str)
* .use(fn)
* https://github.com/LearnBoost/stylus/blob/master/docs/js.md#usefn
*/
let mylib = function(style: any) {
let mylib = (style: any) => {
style.define('number', 15.5);
style.define('get-list', function() {
style.define('get-list', () => {
return ['foo', 'bar', 'baz'];
});
};
stylus(str)
.use(mylib)
.render(function(err, css) {
.render((err, css) => {
if (err) throw err;
console.log(css);
});
-1
View File
@@ -6,7 +6,6 @@
"dt-header": false,
"no-internal-module": false,
"no-var-requires": false,
"only-arrow-functions": false,
"prefer-const": false,
"strict-export-declare-modifiers": false,
"unified-signatures": false