Skip to content

Commit

Permalink
Merge pull request #1 from enyeInc/add/Uche/add-editorconfig
Browse files Browse the repository at this point in the history
[add] editor config
  • Loading branch information
enyeInc authored Apr 13, 2019
2 parents 2b64195 + 6931e97 commit baa57a0
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 86 deletions.
24 changes: 24 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]

# Change these settings to your own preference
[{*.js, *.jsx}]
indent_style = tab
indent_size = 4

[{*.json, *.yml}]
indent_style = space
indent_size = 2

# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
173 changes: 88 additions & 85 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,90 +1,93 @@
{
"extends": "airbnb",
"plugin": ["react"],
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true
},
"parser": "babel-eslint",
"extends": [
"airbnb",
"plugin:react/recommended"
],
"plugins": ["react"],
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true
},
"parser": "babel-eslint",
"parserOptions":{
"ecmaVersion": 10,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"rules": {
"semi": ["error", "always"],
"comma-dangle": ["error", {
"arrays": "always-multiline",
"objects": "always-multiline"
}],
"object-curly-spacing": ["error", "always"],
"no-multiple-empty-lines": ["error", {
"max": 1,
"maxEOF": 1
}],
"eol-last": ["error", "always"],
"indent": ["error", 4],
"no-param-reassign": ["warn"],
"arrow-body-style": ["error", "as-needed"],
"arrow-parens": ["warn", "as-needed", {
"requireForBlockBody": false
}],
"arrow-spacing": ["error", {
"before": true,
"after": true
}],
"constructor-super": "error",
"no-const-assign": "error",
"no-dupe-class-members": "error",
"no-duplicate-imports": "error",
"no-new-symbol": "error",
"no-this-before-super": "error",
"no-useless-computed-key": "error",
"no-useless-constructor": "warn",
"no-useless-rename": ["error", {
"ignoreDestructuring": false,
"ignoreImport": false,
"ignoreExport": false
}],
"no-var": "warn",
"prefer-arrow-callback": ["warn", {
"allowUnboundThis": true
}],
"prefer-const": ["error", {
"destructuring": "all",
"ignoreReadBeforeAssign": true
}],
"prefer-template": "error",
"require-yield": "error",
"rest-spread-spacing": ["error", "never"],
"template-curly-spacing": "error",
"yield-star-spacing": ["error", "after"],
"prefer-spread": "error",
"generator-star-spacing": ["error", {
"before": false,
"after": true
}],
"symbol-description": "error",
"max-len": ["error", { "code": 100 }],
"sort-keys": ["error", "asc"],
"ecmaVersion": 10,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true
}
},
"rules": {
"semi": ["error", "always"],
"comma-dangle": ["error", {
"arrays": "always-multiline",
"objects": "always-multiline"
}],
"object-curly-spacing": ["error", "always"],
"no-multiple-empty-lines": ["error", {
"max": 1,
"maxEOF": 1
}],
"eol-last": ["error", "always"],
"indent": ["error", 4],
"no-param-reassign": ["warn"],
"arrow-body-style": ["error", "as-needed"],
"arrow-parens": ["warn", "as-needed", {
"requireForBlockBody": false
}],
"arrow-spacing": ["error", {
"before": true,
"after": true
}],
"constructor-super": "error",
"no-const-assign": "error",
"no-dupe-class-members": "error",
"no-duplicate-imports": "error",
"no-new-symbol": "error",
"no-this-before-super": "error",
"no-useless-computed-key": "error",
"no-useless-constructor": "warn",
"no-useless-rename": ["error", {
"ignoreDestructuring": false,
"ignoreImport": false,
"ignoreExport": false
}],
"no-var": "warn",
"prefer-arrow-callback": ["warn", {
"allowUnboundThis": true
}],
"prefer-const": ["error", {
"destructuring": "all",
"ignoreReadBeforeAssign": true
}],
"prefer-template": "error",
"require-yield": "error",
"rest-spread-spacing": ["error", "never"],
"template-curly-spacing": "error",
"yield-star-spacing": ["error", "after"],
"prefer-spread": "error",
"generator-star-spacing": ["error", {
"before": false,
"after": true
}],
"symbol-description": "error",
"max-len": ["error", { "code": 100 }],
"sort-keys": ["error", "asc"],

"react/no-danger": "error",
"react/jsx-pascal-case": "error",
"react/jsx-indent": ["error", 4],
"react/jsx-closing-bracket-location": "error",
"react/void-dom-elements-no-children": "error",
"react/jsx-tag-spacing": "error",
"react/jsx-no-literals": "error",
"react/jsx-wrap-multilines": "error",
"react/jsx-no-comment-textnodes": "error"
},
"settings": {
"react": {
"version": "latest"
}
"react/no-danger": "error",
"react/jsx-pascal-case": "error",
"react/jsx-indent": ["error", 4],
"react/jsx-closing-bracket-location": "error",
"react/void-dom-elements-no-children": "error",
"react/jsx-tag-spacing": "error",
"react/jsx-no-literals": "error",
"react/jsx-wrap-multilines": "error",
"react/jsx-no-comment-textnodes": "error"
},
"settings": {
"react": {
"version": "latest"
}
}
}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"lint": "eslint"
"lint": "eslint pages"
},
"repository": {
"type": "git",
Expand All @@ -18,12 +18,14 @@
},
"homepage": "https://github.com/enyeInc/project-template#readme",
"devDependencies": {
"babel-eslint": "^10.0.1",
"chai": "^4.2.0",
"enzyme": "^3.9.0",
"eslint": "^5.8.0",
"eslint-config-airbnb": "^17.1.0",
"eslint-config-standard": "^12.0.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-node": "^7.0.1",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-react": "^7.11.1",
Expand Down

0 comments on commit baa57a0

Please sign in to comment.