From 9176b6ea8279480db84d1a8ce77ce5b2dda952f6 Mon Sep 17 00:00:00 2001 From: segayuu Date: Fri, 15 Dec 2017 11:59:49 +0900 Subject: [PATCH] cleanup lint ignore error: only-arrow-functions --- types/stylus/stylus-tests.ts | 20 ++++++++++---------- types/stylus/tslint.json | 1 - 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/types/stylus/stylus-tests.ts b/types/stylus/stylus-tests.ts index 91c143308b..9483d6d70f 100644 --- a/types/stylus/stylus-tests.ts +++ b/types/stylus/stylus-tests.ts @@ -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); }); diff --git a/types/stylus/tslint.json b/types/stylus/tslint.json index f86d5e1a30..3ea4fd2963 100644 --- a/types/stylus/tslint.json +++ b/types/stylus/tslint.json @@ -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