cleanup simple format ignore lint errors

* no-padding
* no-var-keyword
* one-line
* space-before-function-paren
This commit is contained in:
segayuu
2017-12-15 11:56:36 +09:00
parent 8a6af8aabd
commit 2add5d1ab9
3 changed files with 12 additions and 20 deletions
+1 -5
View File
@@ -10,7 +10,6 @@ declare var stylus: Stylus.Static;
export = stylus;
declare namespace Stylus {
export interface Static {
/**
* Return a new `Renderer` for the given `str` and `options`.
@@ -720,7 +719,6 @@ declare namespace Stylus {
//#region Nodes Classes
export module Nodes {
export class Node {
lineno: number;
column: number;
@@ -807,9 +805,7 @@ declare namespace Stylus {
toJSON(): { val: string; quote: string; lineno: number; column: number; filename: string };
}
export class Number extends Node {
}
export class Number extends Node { }
export class Boolean extends Node {
val: boolean;
+11 -11
View File
@@ -6,19 +6,19 @@
import stylus = require("stylus");
var str = "This is a stylus test";
let str = "This is a stylus test";
/**
* Basic Usage
*/
stylus.render(str, { filename: 'nesting.css' }, function(err, css){
stylus.render(str, { filename: 'nesting.css' }, function(err, css) {
if (err) throw err;
console.log(css);
});
stylus(str)
.set('filename', 'nesting.css')
.render(function (err, css) {
.render(function(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(function(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(function(err, css) {
// logic
});
@@ -51,7 +51,7 @@ stylus(str)
stylus(str)
.set('filename', __dirname + '/test.styl')
.import('mixins/vendor')
.render(function (err, css) {
.render(function(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', function() {
return ['foo', 'bar', 'baz'];
})
.render(function (err, css) {
.render(function(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
*/
var mylib = function (style: any) {
let mylib = function(style: any) {
style.define('number', 15.5);
style.define('get-list', function () {
style.define('get-list', function() {
return ['foo', 'bar', 'baz'];
});
};
stylus(str)
.use(mylib)
.render(function (err, css) {
.render(function(err, css) {
if (err) throw err;
console.log(css);
});
-4
View File
@@ -5,13 +5,9 @@
"callable-types": false,
"dt-header": false,
"no-internal-module": false,
"no-padding": false,
"no-var-keyword": false,
"no-var-requires": false,
"one-line": false,
"only-arrow-functions": false,
"prefer-const": false,
"space-before-function-paren": false,
"strict-export-declare-modifiers": false,
"unified-signatures": false
}