
20 changed files with 89 additions and 126 deletions
@ -1,5 +1,4 @@ |
|||
.git/ |
|||
benchmark/implementations/ |
|||
node_modules/ |
|||
demo/ |
|||
dist/ |
|||
node_modules/ |
@ -0,0 +1,47 @@ |
|||
env: |
|||
node: true |
|||
browser: false |
|||
|
|||
plugins: |
|||
- nodeca |
|||
|
|||
rules: |
|||
block-scoped-var: 2 |
|||
brace-style: [ 2, '1tbs', { allowSingleLine: true } ] |
|||
camelcase: 0 |
|||
consistent-return: 2 |
|||
consistent-this: [ 2, self ] |
|||
curly: [ 2, all ] |
|||
default-case: 2 |
|||
eol-last: 2 |
|||
eqeqeq: 2 |
|||
guard-for-in: 2 |
|||
handle-callback-err: 2 |
|||
max-depth: [ 1, 3 ] |
|||
max-nested-callbacks: [ 1, 4 ] |
|||
# string can exceed 80 chars, but should not overflow github website :) |
|||
max-len: [ 2, 120, 1000 ] |
|||
no-alert: 2 |
|||
no-bitwise: 2 |
|||
no-comma-dangle: 2 |
|||
no-console: 2 |
|||
no-div-regex: 2 |
|||
no-else-return: 2 |
|||
no-eq-null: 2 |
|||
no-floating-decimal: 2 |
|||
no-lonely-if: 2 |
|||
no-process-exit: 0 |
|||
no-trailing-spaces: 2 |
|||
no-underscore-dangle: 0 |
|||
quotes: [ 2, single, avoid-escape ] |
|||
radix: 2 |
|||
space-after-keywords: [ 2, always ] # Fixed in master |
|||
space-in-brackets: [ 1, always ] |
|||
|
|||
# temporary |
|||
no-func-assign: 0 |
|||
|
|||
# |
|||
# Our custom rules |
|||
# |
|||
nodeca/indent: [ 2, spaces, 2 ] |
@ -1,82 +0,0 @@ |
|||
{ |
|||
// Enforcing Options ///////////////////////////////////////////////////////// |
|||
|
|||
"bitwise" : false, // Prohibit bitwise operators (&, |, ^, etc.). |
|||
// false - specific for js-yaml |
|||
|
|||
"camelcase" : false, // Require variable names to be camelCase style or UPPER_CASE |
|||
"curly" : true, // Require {} for every new block or scope. |
|||
"eqeqeq" : true, // Require triple equals i.e. `===`. |
|||
"forin" : false, // Tolerate `for in` loops without `hasOwnPrototype`. |
|||
"immed" : true, // Require immediate invocations to be wrapped in parens e.g. `( function(){}() );` |
|||
"indent" : 2, // This option enforces specific tab width for your code |
|||
"latedef" : false, // Prohibit hariable use before definition. |
|||
"newcap" : true, // Require capitalization of all constructor functions e.g. `new F()`. |
|||
"noarg" : true, // Prohibit use of `arguments.caller` and `arguments.callee`. |
|||
"noempty" : true, // Prohibit use of empty blocks. |
|||
"nonew" : true, // Prohibit use of constructors for side-effects. |
|||
"plusplus" : false, // Prohibit use of `++` & `--`. |
|||
"quotmark" : false, // Enforces the consistency of quotation marks used throughout your code. |
|||
"regexp" : false, // Prohibit `.` and `[^...]` in regular expressions. |
|||
"undef" : true, // Require all non-global variables be declared before they are used. |
|||
"unused" : false, // This option warns when you define and never use your variables. |
|||
"strict" : true, // Require `use strict` pragma in every file. |
|||
"trailing" : true, // Prohibit trailing whitespaces. |
|||
"maxparams" : 6, // Enforce max number of formal parameters allowed per function |
|||
"maxdepth" : 5, // Enforce max depth of nested blocks |
|||
"maxstatements" : false, // Enforce max amount of statements per function |
|||
"maxcomplexity" : false, // Enforce cyclomatic complexity level |
|||
|
|||
// Relaxing Options ////////////////////////////////////////////////////////// |
|||
|
|||
"asi" : false, // Tolerate Automatic Semicolon Insertion (no semicolons). |
|||
"boss" : false, // Tolerate assignments inside if, for & while. Usually conditions & loops are for comparison, not assignments. |
|||
"debug" : false, // Allow debugger statements e.g. browser breakpoints. |
|||
"eqnull" : false, // Tolerate use of `== null`. |
|||
//"es5" : true, // Allow ECMAScript 5 syntax. |
|||
"esnext" : false, // Allow ES.next specific features such as const and let |
|||
"evil" : false, // Tolerate use of `eval`. |
|||
"expr" : false, // Tolerate `ExpressionStatement` as Programs. |
|||
"funcscope" : false, // Tolerate declaring variables inside of control structures while accessing them later |
|||
"globalstrict" : true, // Allow global "use strict" (also enables 'strict'). |
|||
"iterator" : false, // Allow usage of __iterator__ property. |
|||
"lastsemic" : false, // Tolerate semicolon omited for the last statement. |
|||
"laxbreak" : false, // Tolerate unsafe line breaks e.g. `return [\n] x` without semicolons. |
|||
"laxcomma" : true, // This option suppresses warnings about comma-first coding style |
|||
"loopfunc" : false, // Allow functions to be defined within loops. |
|||
"multistr" : false, // Tolerate multi-line strings. |
|||
"onecase" : false, // Tolerate swithes with only one case. |
|||
"proto" : false, // Allow usage of __proto__ property. |
|||
"regexdash" : false, // Tolerate unescaped last dash i.e. `[-...]`. |
|||
"scripturl" : true, // Tolerate script-targeted URLs. |
|||
"smarttabs" : false, // Allow mixed tabs and spaces when the latter are used for alignmnent only. |
|||
"shadow" : false, // Allows re-define variables later in code e.g. `var x=1; x=2;`. |
|||
"sub" : true, // Tolerate all forms of subscript notation besides dot notation e.g. `dict['key']` instead of `dict.key`. |
|||
"supernew" : true, // Tolerate `new function () { ... };` and `new Object;`. |
|||
|
|||
// Environments ////////////////////////////////////////////////////////////// |
|||
|
|||
"browser" : false, // Defines globals exposed by modern browsers |
|||
"couch" : false, // Defines globals exposed by CouchDB |
|||
"devel" : false, // Allow developments statements e.g. `console.log();`. |
|||
"dojo" : false, // Defines globals exposed by the Dojo Toolkit |
|||
"jquery" : false, // Defines globals exposed by the jQuery |
|||
"mootools" : false, // Defines globals exposed by the MooTools |
|||
"node" : true, // Defines globals exposed when running under Node.JS |
|||
"nonstandard" : false, // Defines non-standard but widely adopted globals such as escape and unescape |
|||
"prototypejs" : false, // Defines globals exposed by the Prototype |
|||
"rhino" : false, // Defines globals exposed when running under Rhino |
|||
"worker" : false, // Defines globals exposed when running Web Worker |
|||
"wsh" : false, // Defines globals exposed when running under WSH |
|||
|
|||
// Legacy //////////////////////////////////////////////////////////////////// |
|||
|
|||
"nomen" : false, // Prohibit use of initial or trailing underbars in names. |
|||
"onevar" : false, // Allow only one `var` statement per function. |
|||
"passfail" : false, // Stop on first error. |
|||
"white" : false, // Check against strict whitespace and indentation rules. |
|||
|
|||
// Other ///////////////////////////////////////////////////////////////////// |
|||
|
|||
"maxerr" : 100 // Maximum error before stopping. |
|||
} |
Loading…
Reference in new issue