From 2add5d1ab9fd2f9a61c0b2aaa06a056aa9c716a0 Mon Sep 17 00:00:00 2001 From: segayuu Date: Fri, 15 Dec 2017 11:56:36 +0900 Subject: [PATCH] cleanup simple format ignore lint errors * no-padding * no-var-keyword * one-line * space-before-function-paren --- types/stylus/index.d.ts | 6 +----- types/stylus/stylus-tests.ts | 22 +++++++++++----------- types/stylus/tslint.json | 4 ---- 3 files changed, 12 insertions(+), 20 deletions(-) diff --git a/types/stylus/index.d.ts b/types/stylus/index.d.ts index 47854aaf60..bac45c8cce 100644 --- a/types/stylus/index.d.ts +++ b/types/stylus/index.d.ts @@ -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; diff --git a/types/stylus/stylus-tests.ts b/types/stylus/stylus-tests.ts index 248b6a9a04..91c143308b 100644 --- a/types/stylus/stylus-tests.ts +++ b/types/stylus/stylus-tests.ts @@ -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); }); diff --git a/types/stylus/tslint.json b/types/stylus/tslint.json index b20ec58f95..f86d5e1a30 100644 --- a/types/stylus/tslint.json +++ b/types/stylus/tslint.json @@ -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 }