Skip to content

Commit 7a8bce8

Browse files
authored
Merge pull request temando#78 from brendo/issue-77-use-standard-linting
Swap to StandardJS linting. Closes temando#77
2 parents b1fad8c + 5bec0db commit 7a8bce8

40 files changed

+903
-1061
lines changed

.eslintrc

Lines changed: 0 additions & 230 deletions
This file was deleted.

.eslintrc.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"parser": "babel-eslint",
3+
"extends": [
4+
"standard",
5+
"standard-react"
6+
],
7+
"env": {
8+
"browser": true,
9+
"node": true,
10+
"jest": true
11+
},
12+
"rules": {
13+
// Temporary, components need to be rewritten to take advantage of this
14+
"react/jsx-no-bind": 0
15+
}
16+
}

CONTRIBUTING.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Contributing to Open API Renderer
2+
3+
## Linting
4+
5+
This project is written adhering to the [StandardJS](https://standardjs.com/) code style. [ESLint](http://eslint.org/) is used to enforce [`standard`](https://github.com/feross/eslint-config-standard) and [`standard-react`](https://github.com/feross/eslint-config-standard-react) rule sets.

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22

33
[![Travis CI](https://img.shields.io/travis/temando/open-api-renderer.svg)](https://travis-ci.org/temando/open-api-renderer)
44
[![MIT License](https://img.shields.io/github/license/temando/open-api-renderer.svg)](https://en.wikipedia.org/wiki/MIT_License)
5-
[![Github Forks](https://img.shields.io/github/forks/temando/open-api-renderer.svg?style=social&label=Fork)](https://github.com/temando/open-api-renderer/network)
6-
[![Github Issues](https://img.shields.io/github/issues-raw/temando/open-api-renderer.svg)](https://github.com/temando/open-api-renderer/issues)
5+
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
76

87
Open API Renderer is a project intended to visualise [Open API](https://www.openapis.org) v3 [definition files](https://github.com/OAI/OpenAPI-Specification/blob/OpenAPI.next/README.md).
98

109
It is built on [React](https://facebook.github.io/react/).
1110

12-
This project is inspired by [ReDoc](https://github.com/Rebilly/ReDoc), which currently handles Open API v2 specs.
11+
This project is inspired by [ReDoc](https://github.com/Rebilly/ReDoc), which currently handles Swagger v2 specs.
1312

1413
> This project is in an early phase of development.
1514

package.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
"description": "Open API Renderer",
44
"scripts": {
55
"start": "webpack-dev-server",
6-
"lint": "$(npm bin)/eslint src",
6+
"lint": "eslint src",
77
"test": "jest",
88
"test:coverage": "jest --coverage",
99
"build:prod": "rm -rf dist/* && NODE_ENV=prod webpack -p"
1010
},
11+
"license": "MIT",
1112
"repository": {
1213
"type": "git",
1314
"url": "https://github.com/temando/open-api-renderer.git"
@@ -16,6 +17,7 @@
1617
"classnames": "^2.2.5",
1718
"copy-to-clipboard": "^3.0.6",
1819
"history": "^4.6.1",
20+
"js-yaml": "^3.8.4",
1921
"json-schema-ref-parser": "^3.1.2",
2022
"lodash": "^4.17.4",
2123
"markdown-it": "^8.3.1",
@@ -45,8 +47,14 @@
4547
"babel-preset-stage-1": "^6.22.0",
4648
"balloon-css": "^0.4.0",
4749
"css-loader": "^0.27.3",
48-
"eslint": "^3.18.0",
49-
"eslint-plugin-react": "^6.10.3",
50+
"eslint": "^3.19.0",
51+
"eslint-config-standard": "^10.2.1",
52+
"eslint-config-standard-react": "^5.0.0",
53+
"eslint-plugin-import": "^2.3.0",
54+
"eslint-plugin-node": "^4.2.2",
55+
"eslint-plugin-promise": "^3.5.0",
56+
"eslint-plugin-react": "^7.0.1",
57+
"eslint-plugin-standard": "^3.0.1",
5058
"extract-text-webpack-plugin": "^2.1.0",
5159
"file-loader": "^0.11.1",
5260
"fs-extra": "^3.0.1",

src/__mocks__/fileMock.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
module.exports = 'test-file-stub';
1+
module.exports = 'test-file-stub'

src/__mocks__/styleMock.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
module.exports = {};
1+
module.exports = {}

0 commit comments

Comments
 (0)