Skip to content

Commit

Permalink
👕 Use Airbnb JavaScript standard
Browse files Browse the repository at this point in the history
  • Loading branch information
Bartozzz committed Sep 13, 2017
1 parent 4dfef90 commit 5a107f5
Show file tree
Hide file tree
Showing 59 changed files with 2,942 additions and 2,476 deletions.
1 change: 1 addition & 0 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"es2015",
"es2016",
"es2017",
"airbnb",
"stage-0"
],

Expand Down
101 changes: 37 additions & 64 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,75 +1,48 @@
{
"root" : true,
"root": true,

"parser" : "babel-eslint",
"extends" : [ "eslint:recommended", "plugin:react/recommended" ],
"plugins" : [ "react" ],
"parser": "babel-eslint",
"extends": ["airbnb"],
"plugins": ["react", "import", "jsx-a11y"],

"env" : {
"es6" : true,
"node" : true,
"browser" : true,
"shared-node-browser" : true
"env": {
"es6": true,
"node": true,
"browser": true,
"shared-node-browser": true
},

"parserOptions" : {
"ecmaVersion" : 6,
"sourceType" : "module",
"ecmaFeatures" : {
"jsx" : true,
"experimentalObjectRestSpread" : true
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {
"jsx": true,
"experimentalObjectRestSpread": true
}
},

"globals" : {
"nw" : true
"globals": {
"nw": true
},

"rules" : {
"indent" : [ "error", 4, { "SwitchCase" : 1 } ],
"quotes" : [ "error", "double" ],
"max-depth" : [ "warn", 5 ],
"max-len" : [ "warn", 120 ],
"eol-last" : [ "warn", "always" ],

"semi" : [ "error", "always" ],
"linebreak-style" : [ "error", "unix" ],

"prefer-const" : [ "warn" ],
"prefer-arrow-callback" : [ "warn" ],

"no-var" : [ "error" ],
"no-console" : [ "off" ],
"no-lonely-if" : [ "warn" ],
"no-unused-vars" : [ "warn", { "varsIgnorePattern" : "React" } ],
"no-multi-assign" : [ "warn" ],
"no-await-in-loop" : [ "error" ],
"no-useless-rename" : [ "error" ],
"no-trailing-spaces" : [ "error" ],
"no-duplicate-imports" : [ "error" ],
"no-useless-constructor" : [ "error" ],
"no-multiple-empty-lines" : [ "warn", { "max" : 2 } ],

"space-unary-ops" : [ "error", { "words" : true, "nonwords" : false } ],
"space-infix-ops" : [ "error", { "int32Hint" : false } ],
"space-in-parens" : [ "error", "always" ],
"space-before-blocks" : [ "error", "always" ],
"space-before-function-paren" : [ "error", {
"anonymous" : "always",
"named" : "never",
"asyncArrow" : "ignore"
} ],

"spaced-comment" : [ "warn", "always" ],
"arrow-spacing" : [ "error", { "before" : true, "after" : true } ],

"one-var-declaration-per-line" : [ "error", "always" ],
"one-var" : [ "error", {
"initialized" : "never",
"uninitialized" : "always"
} ],

"block-scoped-var" : [ "error" ],
"padded-blocks" : [ "error", "never" ]
}
"rules": {
"quotes": [1, "double"],
"indent": [2, 4],

"no-console": [0],
"no-param-reassign": [0],

"react/no-danger": [0],
"react/jsx-indent": [2, 4],
"react/jsx-indent-props": [2, 4],
"react/no-array-index-key": [0],
"react/require-default-props": [0],
"react/prefer-stateless-function": [0],
"react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }],

"global-require": [0],
"import/first": [0],
"import/prefer-default-export": [0],
"import/no-extraneous-dependencies": [0]
}
}
Loading

0 comments on commit 5a107f5

Please sign in to comment.