mirror of
https://github.com/Redocly/redoc.git
synced 2024-11-22 00:26:34 +03:00
Added extra linting options
This commit is contained in:
parent
cf7391e5d9
commit
c8d04cc1fa
15
.eslintrc
15
.eslintrc
|
@ -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
24
lib/.eslintrc
Normal 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"]
|
||||
}
|
||||
}
|
|
@ -24,4 +24,4 @@ export class ApiInfo {
|
|||
//TODO: check and apply hooks to modify data
|
||||
}
|
||||
}
|
||||
ApiInfo.parameters = [[SchemaManager]]
|
||||
ApiInfo.parameters = [[SchemaManager]];
|
||||
|
|
|
@ -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';
|
||||
|
||||
|
|
|
@ -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]];
|
||||
|
|
|
@ -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]];
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
import SwaggerParser from 'swagger-parser';
|
||||
import JsonPointer from './JsonPointer'
|
||||
import JsonPointer from './JsonPointer';
|
||||
|
||||
export class SchemaManager {
|
||||
constructor() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user