This repository has been archived by the owner on Aug 31, 2018. 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
Showing
7 changed files
with
2,000 additions
and
2 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,21 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 4 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
curly_bracket_next_line = false | ||
spaces_around_operators = true | ||
indent_brace_style = 1tbs | ||
|
||
[*.js] | ||
quote_type = single | ||
|
||
[*.{html,less,css,json}] | ||
quote_type = double | ||
|
||
[package.json] | ||
indent_size = 2 |
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,3 @@ | ||
.idea | ||
node_modules | ||
.DS_Store |
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 @@ | ||
registry="https://registry.npmjs.org/" |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
# javascript-style-guide | ||
eslint config | ||
# eslint-config-vivaxy | ||
|
||
Share eslint config within my projects |
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,100 @@ | ||
/** | ||
* @since 2017-03-18 14:21:25 | ||
* @author vivaxy | ||
*/ | ||
|
||
module.exports = { | ||
extends: 'airbnb', | ||
rules: { | ||
'indent': [ | ||
'error', | ||
// prefer 4 spaces over 2 | ||
4, | ||
{ | ||
// case should be intented | ||
'SwitchCase': 1 | ||
} | ||
], | ||
'import/no-named-as-default': [ | ||
// disable this for redux connect @see https://github.com/benmosher/eslint-plugin-import/issues/544 | ||
'off' | ||
], | ||
'import/no-named-as-default-member': [ | ||
// disable this for redux connect @see https://github.com/benmosher/eslint-plugin-import/issues/544 | ||
'off' | ||
], | ||
'import/no-extraneous-dependencies': [ | ||
// we use dependencies when developing | ||
'off' | ||
], | ||
// @see https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-filename-extension.md | ||
'react/jsx-filename-extension': [ | ||
'error', | ||
{ | ||
'extensions': [ | ||
'.js' | ||
] | ||
} | ||
], | ||
// @see https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-indent.md | ||
'react/jsx-indent': [ | ||
'error', | ||
4 | ||
], | ||
// @see http://eslint.org/docs/rules/arrow-parens | ||
'arrow-parens': [ | ||
'error', | ||
'always' | ||
], | ||
'max-len': [ | ||
'error', | ||
120 | ||
], | ||
// @see http://eslint.org/docs/rules/arrow-body-style | ||
// if no brace, there might be [no-confusing-arrow](http://eslint.org/docs/rules/no-confusing-arrow) error | ||
'arrow-body-style': [ | ||
'error', | ||
'always' | ||
], | ||
'no-unused-vars': [ | ||
'warn', | ||
{ | ||
'vars': 'all', | ||
'args': 'after-used', | ||
'caughtErrors': 'none' | ||
} | ||
], | ||
'space-before-function-paren': [ | ||
'error', | ||
{ | ||
'anonymous': 'never', | ||
'named': 'never', | ||
'asyncArrow': 'never' | ||
} | ||
], | ||
'react/prefer-stateless-function': [ | ||
'off' | ||
], | ||
'react/forbid-prop-types': [ | ||
'off' | ||
], | ||
'no-plusplus': [ | ||
'off' | ||
], | ||
'react/jsx-indent-props': [ | ||
'error', | ||
4 | ||
], | ||
'import/prefer-default-export': [ | ||
'off' | ||
], | ||
// to use `await` to denote a value that is a thenable, the proformace issue should be taken care of by compiler | ||
'no-return-await': [ | ||
'off' | ||
] | ||
}, | ||
env: { | ||
'browser': true | ||
}, | ||
parser: 'babel-eslint' | ||
}; |
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,30 @@ | ||
{ | ||
"name": "eslint-config-vivaxy", | ||
"version": "0.0.0", | ||
"description": "eslint config", | ||
"main": "index.js", | ||
"scripts": { | ||
"release": "standard-version && git push origin master --follow-tags && npm publish" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/vivaxy/eslint-config-vivaxy.git" | ||
}, | ||
"author": "vivaxy", | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/vivaxy/eslint-config-vivaxy/issues" | ||
}, | ||
"homepage": "https://github.com/vivaxy/eslint-config-vivaxy#readme", | ||
"dependencies": { | ||
"babel-eslint": "^7.1.1", | ||
"eslint": "^3.18.0", | ||
"eslint-config-airbnb": "^14.1.0", | ||
"eslint-plugin-import": "^2.2.0", | ||
"eslint-plugin-jsx-a11y": "^4.0.0", | ||
"eslint-plugin-react": "^6.10.0" | ||
}, | ||
"devDependencies": { | ||
"standard-version": "^4.0.0" | ||
} | ||
} |
Oops, something went wrong.