-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated: dev dependencies and small refactor
- Loading branch information
1 parent
c83db80
commit 5c1d1e8
Showing
11 changed files
with
2,339 additions
and
223 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 |
---|---|---|
@@ -1,164 +1 @@ | ||
########################################################################### | ||
# # | ||
# Revised by aMarCruz - 2016-01-06 # | ||
# Follow most of rules from http://standardjs.com/ # | ||
# 2016-01-19: use 1tbs style for blocks, like in the riot core # | ||
# 2016-03-05: revised for eslint v2.2, disallow conditional assign # | ||
# 2016-03-10: allows conditional assigns, shadowing vars in the upper # | ||
# scope, and the creation of functions within loops. # | ||
# 2016-03-11: Don't require empty line after variable declarations # | ||
# # | ||
########################################################################### | ||
|
||
root: true | ||
|
||
########################################################################### | ||
# ENVIRONMENT # | ||
########################################################################### | ||
|
||
env: | ||
node: true | ||
es6: true | ||
|
||
parserOptions: | ||
sourceType: "module" | ||
ecmaVersion: 6 | ||
ecmaFeatures: | ||
impliedStrict: true | ||
|
||
########################################################################### | ||
# GLOBALS # | ||
########################################################################### | ||
|
||
globals: | ||
riot: false | ||
|
||
########################################################################### | ||
# RECOMMENDED PRESET - mainly for possible errors # | ||
########################################################################### | ||
|
||
extends: | ||
"eslint:recommended" # See https://github.com/eslint/eslint/blob/master/conf/eslint.json | ||
|
||
########################################################################### | ||
# RULES - omitted defaults and rules in eslint:recommended # | ||
########################################################################### | ||
|
||
rules: | ||
# | ||
# POSSIBLE ERRORS | ||
# | ||
no-cond-assign: 0 # core riot style | ||
no-extra-parens: [2, "all", {"conditionalAssign": false}] # disallow extra parens, except for conditional assign | ||
valid-jsdoc: [2, { "prefer": { "return": "returns" }, "requireReturn": false, "requireReturnDescription": false }] | ||
# | ||
# BEST PRACTICES | ||
# | ||
block-scoped-var: 2 # treat var statements as if they were block scoped (Default: 0) | ||
complexity: [1, 16] # specify the maximum cyclomatic complexity allowed in a program (Default [0, 11]) | ||
curly: [2, "multi-line"] # require curly braces for multiline control statements only | ||
dot-location: [2, "property"] # dot in a member expression should be on the same line as the property | ||
dot-notation: 1 # encourages use of dot notation whenever possible (Default: [0, { "allowKeywords": true }]) | ||
eqeqeq: [2, "smart"] # require the use of === and !== (Default: 0) | ||
guard-for-in: 1 # make sure for-in loops have an if statement (Default: 0) | ||
no-alert: 2 # disallow the use of alert, confirm, and prompt (Default: 0) | ||
no-caller: 2 # disallow use of arguments.caller or arguments.callee (Default: 0) | ||
no-div-regex: 2 # disallow division operators explicitly at beginning of regular expression (Default: 0) | ||
no-else-return: 1 # disallow else after a return in an if | ||
no-eval: 2 # disallow use of eval() (Default: 0) | ||
no-extend-native: 2 # disallow adding to native types (Default: 0) | ||
no-extra-bind: 2 # disallow unnecessary function binding (Default: 0) | ||
no-floating-decimal: 2 # disallow the use of leading or trailing decimal points in numeric literals (Default: 0) | ||
no-implied-eval: 2 # disallow use of eval()-like methods (Default: 0) | ||
no-invalid-this: 2 # disallow this keywords outside of classes or class-like objects | ||
no-iterator: 2 # disallow usage of __iterator__ property (Default: 0) | ||
no-labels: 2 # disallow use of labeled statements (Default: 0) | ||
no-lone-blocks: 2 # disallow unnecessary nested blocks (Default: 0) | ||
no-multi-str: 2 # disallow use of multiline strings (Default: 0) | ||
no-native-reassign: 2 # disallow reassignments of native objects (Default: 0) | ||
no-new: 2 # disallow use of new operator when not part of the assignment or comparison (Default: 0) | ||
no-new-func: 2 # disallow use of new operator for Function object | ||
no-new-wrappers: 2 # disallow creating new instances of String, Number, and Boolean (Default: 0) | ||
no-octal-escape: 2 # disallow use of octal escape sequences in string literals, such as `"Copyright \251"` (Default: 0) | ||
no-proto: 2 # disallow usage of __proto__ property (Default: 0) | ||
no-return-assign: 1 # disallow use of assignment in return statement (Default: 0) | ||
no-script-url: 2 # disallow use of javascript urls (Default: 0) | ||
no-self-compare: 2 # disallow comparisons where both sides are exactly the same (Default: 0) | ||
no-sequences: 2 # disallow use of comma operator (Default: 0) | ||
no-throw-literal: 2 # restrict what can be thrown as an exception | ||
no-unused-expressions: 1 # disallow usage of expressions in statement position (Default: 0) | ||
no-useless-call: 1 # disallow unnecessary .call() and .apply() | ||
no-void: 2 # disallow use of void operator (Default: 0) | ||
no-with: 2 # disallow use of the with statement (Default: 0) | ||
radix: 2 # require use of the second argument for parseInt() (Default: 0) | ||
wrap-iife: [2, "inside"] # require immediate function invocation to be wrapped in parentheses (Default: 0) | ||
yoda: [2, "never"] # require or disallow Yoda conditions (Default: 0) | ||
# | ||
# STRICT MODE | ||
# | ||
#strict: 2 # require strict mode | ||
# | ||
# VARIABLES | ||
# | ||
no-catch-shadow: 2 # disallow the catch clause parameter name being the same as a variable in the outer scope | ||
no-label-var: 2 # disallow labels that share a name with a variable (Default: 0) | ||
no-shadow-restricted-names: 2 # disallow shadowing of names such as arguments (Default: 0) | ||
# no-undef: 1 # disallow use of undeclared variables unless mentioned in a /*global */ block (Default: 2) | ||
no-undef-init: 2 # disallow use of undefined when initializing variables (Default: 0) | ||
# no-unused-vars: 1 # disallow declaration of variables that are not used in the code (Default: [2, {"vars": "all", "args": "after-used"}]) | ||
no-use-before-define: [2, "nofunc"] # disallow use of variables before they are defined (Default: 0) | ||
# | ||
# NODE.JS AND COMMONJS | ||
# | ||
handle-callback-err: 2 # enforces error handling in callbacks | ||
no-mixed-requires: 2 # disallow mixing regular variable and require declarations | ||
no-new-require: 2 # disallow use of new operator with the require function (Default: 0) | ||
no-path-concat: 2 # disallow string concatenation with __dirname and __filename (Default: 0) | ||
# | ||
# STYLISTIC ISSUES | ||
# | ||
array-bracket-spacing: 2 # disallow spaces inside of brackets (Default: [0, "never"]) | ||
brace-style: [1, "1tbs", { "allowSingleLine": true }] | ||
# require Stroustrup style: `else` must be on its own line (Default: [0, '1tbs']) | ||
camelcase: [2, { "properties": "always" }] | ||
# require camel case names (Default: 0) | ||
comma-spacing: 2 # enforce spacing before and after comma (Default: 0) | ||
comma-style: 2 # enforce one true comma style (Default: [0, "last"]) | ||
computed-property-spacing: [2, "never"] | ||
# disallow spaces inside of computed properties | ||
consistent-this: [2, "self"] # enforces consistent naming when capturing the current execution context | ||
eol-last: 2 # enforce newline at the end of file, with no multiple empty lines | ||
indent: [2, 2, { "SwitchCase": 1 }] # set a specific tab width and case indentation (Default: 0) | ||
key-spacing: 2 # enforces spacing between keys and values in object literal properties | ||
# (Default: [0, { "beforeColon": false, "afterColon": true }]) | ||
keyword-spacing: 2 # enforce spacing before and after keywords | ||
linebreak-style: [2, "unix"] | ||
max-depth: [1, 5] # specify the maximum depth blocks can be nested | ||
max-len: [1, 96, 4, { "ignoreTrailingComments": true, "ignoreUrls": true, "ignorePattern": "=\\s+/|_regEx\\(|RegExp\\(" }] | ||
no-control-regex: 1 | ||
# maximum line length, except for regexes | ||
max-nested-callbacks: [2, 4] # specify the maximum depth callbacks can be nested (Default: [0, 2]) | ||
new-cap: 2 # require a capital letter for constructors (Default: 0) | ||
new-parens: 2 # disallow the omission of parentheses when invoking a constructor with no arguments (Default: 0) | ||
no-array-constructor: 2 # disallow use of the Array constructor (Default: 0) | ||
no-lonely-if: 2 # disallow if as the only statement in an else block | ||
no-multiple-empty-lines: [2, {"max": 2}] | ||
# disallow multiple empty lines | ||
no-new-object: 2 # disallow use of the Object constructor (Default: 0) | ||
no-restricted-syntax: [2, "WithStatement"] # disallow use of `with` statements in code | ||
no-spaced-func: 2 # disallow space between function identifier and application (Default: 0) | ||
no-trailing-spaces: 2 # disallow trailing whitespace at the end of lines (Default: 0) | ||
no-unneeded-ternary: 2 # disallow the use of ternary operators when a simpler alternative exists | ||
operator-linebreak: 2 # [2, "after", { "overrides": { "?": "before" } }] | ||
quote-props: [2, "as-needed"] # require quotes around object literal property names only if needed | ||
quotes: [2, "single", "avoid-escape"] | ||
# specify whether double or single quotes should be used (Default: [0, "double"]) | ||
semi-spacing: 2 # prevents the use of spaces before a semicolon in expressions | ||
semi: [2, "never"] # require or disallow use of semicolons instead of ASI (Default: 0) | ||
space-before-blocks: 2 # require a space before blocks (Default: [0, "always"]) | ||
space-before-function-paren: 2 # require a space before function parenthesis (Default: [0, "always"]) | ||
space-in-parens: 2 # require spaces inside parentheses (Default: [0, "never"]) | ||
space-infix-ops: [2, {"int32Hint": false}] | ||
# require spaces around infix operators, expect for `var|0` (Default: 0) | ||
space-unary-ops: 2 # require spaces after new, delete, typeof, void, yield, disallow spaces for ++, --, etc | ||
object-curly-spacing: [2, "always", { "objectsInObjects": false }] # require spaces inside brackets | ||
extends: eslint-config-riot |
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
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
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
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
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
Oops, something went wrong.