Skip to content
This repository has been archived by the owner on Aug 31, 2018. It is now read-only.

Commit

Permalink
feat(First commit): 🎉
Browse files Browse the repository at this point in the history
  • Loading branch information
vivaxy committed Mar 18, 2017
1 parent 1578e0d commit e9c29be
Show file tree
Hide file tree
Showing 7 changed files with 2,000 additions and 2 deletions.
21 changes: 21 additions & 0 deletions .editorconfig
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.idea
node_modules
.DS_Store
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry="https://registry.npmjs.org/"
5 changes: 3 additions & 2 deletions README.md
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
100 changes: 100 additions & 0 deletions index.js
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'
};
30 changes: 30 additions & 0 deletions package.json
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"
}
}

0 comments on commit e9c29be

Please sign in to comment.