This repository has been archived by the owner on Feb 26, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dmytro Chepurnyi
committed
Nov 8, 2017
0 parents
commit a2b6575
Showing
9 changed files
with
2,111 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"parser": "babel-eslint", | ||
"extends": [ | ||
"standard", | ||
"standard-jsx" | ||
], | ||
"rules": { | ||
"space-before-function-paren": ["error", "never"], | ||
"object-curly-spacing": ["error", "always"], | ||
"jsx-quotes": [1, "prefer-double"], | ||
"react/jsx-curly-spacing": [2, "always"], | ||
"no-return-assign": 0, | ||
"no-use-before-define": 0 | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# eslint-config-sphere-react [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url] | ||
|
||
[npm-image]: https://img.shields.io/npm/v/eslint-config-standard.svg | ||
[npm-url]: https://npmjs.org/package/eslint-config-standard | ||
[downloads-image]: https://img.shields.io/npm/dm/eslint-config-standard.svg | ||
[downloads-url]: https://npmjs.org/package/eslint-config-standard | ||
[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg | ||
[standard-url]: https://standardjs.com | ||
|
||
#### An ESLint [Shareable Config](http://eslint.org/docs/developer-guide/shareable-configs) for [JavaScript Standard Style](http://standardjs.com) used in SphereInc | ||
|
||
[](http://standardjs.com) | ||
|
||
## Usage | ||
|
||
Shareable configs are designed to work with the `extends` feature of `.eslintrc` files. | ||
You can learn more about | ||
[Shareable Configs](http://eslint.org/docs/developer-guide/shareable-configs) on the | ||
official ESLint website. | ||
|
||
To use the JavaScript Standard Style shareable config, first run next command. It will install pachakge and it's peer dependencies | ||
|
||
```bash | ||
npm install --save-dev eslint-config-sphere-react eslint-config-standard eslint-config-standard-jsx eslint-plugin-standard eslint-plugin-promise eslint-plugin-import eslint-plugin-node eslint-plugin-react | ||
``` | ||
|
||
Then, add this to your .eslintrc file: | ||
|
||
``` | ||
{ | ||
"extends": "sphere-react" | ||
} | ||
``` | ||
|
||
*Note: We omitted the `eslint-config-` prefix since it is automatically assumed by ESLint.* | ||
|
||
You can override settings from the shareable config by adding them directly into your | ||
`.eslintrc` file. | ||
|
||
## Tests | ||
|
||
Config filename is `.eslintrc.json` for easier testing of file with sample code. | ||
If you want to add some rules and test them, run next command | ||
node_modules/.bin/eslint ./test/codeExample.js | ||
|
||
## Badge | ||
|
||
Use this in one of your projects? Include one of these badges in your readme to | ||
let people know that your code is using the standard style. | ||
|
||
[](http://standardjs.com) | ||
|
||
```markdown | ||
[](http://standardjs.com) | ||
``` | ||
|
||
[](http://standardjs.com) | ||
|
||
```markdown | ||
[](http://standardjs.com) | ||
``` | ||
|
||
## Learn more | ||
|
||
For the full listing of rules, editor plugins, FAQs, and more, visit the main | ||
[JavaScript Standard Style repo](http://standardjs.com). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('./.eslintrc.json') |
Oops, something went wrong.