mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-03 19:51:53 +00:00
cleanup lint ignore error: only-arrow-functions
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user