Added extra linting options

This commit is contained in:
Roman Gotsiy 2015-10-09 10:50:02 +03:00
parent cf7391e5d9
commit c8d04cc1fa
7 changed files with 30 additions and 22 deletions

View File

@ -1,15 +0,0 @@
{
"parser": "babel-eslint",
"extends": "eslint:recommended",
"env": {
"browser": true,
},
"rules": {
"quotes": [2, "single"],
"no-console": 0,
"comma-spacing": 2,
"comma-style": [2, "last"],
"consistent-return": 2,
"strict": [2, "global"]
}
}

24
lib/.eslintrc Normal file
View File

@ -0,0 +1,24 @@
{
"parser": "babel-eslint",
"extends": "eslint:recommended",
"env": {
"browser": true,
},
"rules": {
"quotes": [2, "single"],
"no-console": 0,
"comma-spacing": 2,
"comma-style": [2, "last"],
"consistent-return": 2,
"strict": [2, "global"],
"eqeqeq": [2, "smart"],
"curly": [2, "multi-line"],
"semi-spacing": [2, {"before": false, "after": true}],
"semi": [2, "always"],
"no-extra-semi": 2,
"comma-dangle": [2, "never"],
"no-sequences": 2,
"comma-spacing": [2, {"before": false, "after": true}],
"comma-style": [2, "last"]
}
}

View File

@ -24,4 +24,4 @@ export class ApiInfo {
//TODO: check and apply hooks to modify data
}
}
ApiInfo.parameters = [[SchemaManager]]
ApiInfo.parameters = [[SchemaManager]];

View File

@ -2,7 +2,6 @@
import {Component, View, OnInit, CORE_DIRECTIVES} from 'angular2/angular2';
import {SchemaManager} from '../../utils/SchemaManager';
import {JsonPointer} from '../../utils/JsonPointer';
import {methods as swaggerMethods} from '../../utils/swagger-defs';
import {Method} from '../Method/method';

View File

@ -22,9 +22,9 @@ export class PathsList {
extractData() {
this.data = {};
this.data.paths = Object.keys(this.schema.paths)
this.data.paths = Object.keys(this.schema.paths);
//TODO: check and apply hooks to modify data
}
}
PathsList.parameters = [[SchemaManager]]
PathsList.parameters = [[SchemaManager]];

View File

@ -21,8 +21,8 @@ export class Redoc {
}
extractData() {
this.data = this.schema
this.data = this.schema;
//TODO: check and apply hooks to modify data
}
}
Redoc.parameters = [[SchemaManager]]
Redoc.parameters = [[SchemaManager]];

View File

@ -1,6 +1,6 @@
'use strict';
import SwaggerParser from 'swagger-parser';
import JsonPointer from './JsonPointer'
import JsonPointer from './JsonPointer';
export class SchemaManager {
constructor() {