Skip to content

Commit

Permalink
[better-dev] Add eslint and terser
Browse files Browse the repository at this point in the history
  • Loading branch information
Luiz Corte Real authored and Luiz Fernando Oliveira Corte Real committed May 4, 2020
1 parent 9585e18 commit 7177945
Show file tree
Hide file tree
Showing 13 changed files with 2,289 additions and 1,176 deletions.
152 changes: 152 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
{
"env": {
"browser": true
},
"parserOptions": {
"ecmaVersion": 5
},
"globals": {
"define": "readonly"
},
"extends": "eslint:recommended",
"rules": {
"accessor-pairs": ["error"],
"array-bracket-newline": ["error", "consistent"],
"array-bracket-spacing": ["error", "never"],
"array-callback-return": ["error"],
"array-element-newline": ["error", "consistent"],
"arrow-body-style": ["off"],
"arrow-spacing": ["error"],
"block-scoped-var": ["error"],
"arrow-parens": ["off"],
"block-spacing": ["error"],
"brace-style": ["error"],
"callback-return": ["error"],
"camelcase": ["error", {
"properties": "never"
}],
"capitalized-comments": ["off"],
"class-methods-use-this": ["error"],
"comma-dangle": ["error", "always-multiline"],
"comma-spacing": ["error"],
"comma-style": ["error"],
"complexity": ["error", 21],
"computed-property-spacing": ["error"],
"consistent-return": ["off"],
"consistent-this": ["error", "self"],
"curly": ["error"],
"default-case": ["error"],
"dot-location": ["error", "property"],
"dot-notation": ["error"],
"eqeqeq": ["error"],
"eol-last": ["error"],
"for-direction": ["error"],
"func-call-spacing": ["error"],
"func-name-matching": ["error"],
"func-names": ["off"],
"func-style": ["error"],
"function-paren-newline": ["error"],
"generator-star-spacing": ["error"],
"getter-return": ["error", {
"allowImplicit": false
}],
"global-require": ["error"],
"guard-for-in": ["off"],
"handle-callback-err": ["error"],
"indent": ["error", "tab"],
"key-spacing": ["error"],
"keyword-spacing": ["error"],
"line-comment-position": ["error"],
"linebreak-style": ["error", "unix"],
"max-depth": ["error", {
"max": 5
}],
"max-nested-callbacks": ["error"],
"max-params": ["error", {
"max": 5
}],
"max-statements-per-line": ["error"],
"new-cap": ["error", {
"capIsNewExceptions": ["Feature", "Scenario"],
"newIsCapExceptions": ["graylog"]
}],
"new-parens": ["error"],
"newline-per-chained-call": ["error", {
"ignoreChainWithDepth": 3
}],
"no-alert": ["error"],
"no-array-constructor": ["error"],
"no-await-in-loop": ["error"],
"no-bitwise": ["error"],
"no-buffer-constructor": ["error"],
"no-caller": ["error"],
"no-continue": ["error"],
"no-div-regex": ["error"],
"no-empty-function": ["error"],
"no-eval": ["error"],
"no-extra-bind": ["error"],
"no-extra-label": ["error"],
"no-floating-decimal": ["error"],
"no-implicit-globals": ["error"],
"no-implied-eval": ["error"],
"no-iterator": ["error"],
"no-lone-blocks": ["error"],
"no-lonely-if": ["error"],
"no-loop-func": ["off"],
"no-mixed-operators": ["error"],
"no-multi-assign": ["error"],
"no-multi-spaces": ["error"],
"no-multi-str": ["error"],
"no-multiple-empty-lines": ["error"],
"no-nested-ternary": ["error"],
"no-new": ["error"],
"no-new-func": ["error"],
"no-new-object": ["error"],
"no-new-require": ["error"],
"no-new-wrappers": ["error"],
"no-octal-escape": ["error"],
"no-path-concat": ["error"],
"no-process-exit": ["error"],
"no-proto": ["error"],
"no-trailing-spaces": ["error"],
"no-return-await": ["error"],
"no-script-url": ["error"],
"no-self-compare": ["error"],
"no-sequences": ["error"],
"no-template-curly-in-string": ["error"],
"no-throw-literal": ["error"],
"no-unmodified-loop-condition": ["error"],
"no-unneeded-ternary": ["error"],
"no-unused-expressions": ["error", {
"allowShortCircuit": true
}],
"no-useless-call": ["error"],
"no-useless-concat": ["error"],
"no-useless-return": ["error"],
"no-void": ["error"],
"no-warning-comments": ["error"],
"no-whitespace-before-property": ["error"],
"no-with": ["error"],
"object-curly-spacing": ["error", "always"],
"object-property-newline": ["error", {
"allowMultiplePropertiesPerLine": true
}],
"one-var-declaration-per-line": ["error"],
"operator-linebreak": ["error", "after"],
"padded-blocks": ["error", {
"classes": "always"
}],
"prefer-promise-reject-errors": ["error"],
"quotes": ["error", "single", {
"avoidEscape": true
}],
"require-await": ["error"],
"semi": ["error", "always"],
"space-before-blocks": ["error"],
"space-in-parens": ["error"],
"space-infix-ops": ["error"],
"spaced-comment": ["error"],
"strict": ["error", "safe"],
"switch-colon-spacing": ["error"]
}
}
Loading

0 comments on commit 7177945

Please sign in to comment.