/** * Provides ESLint configuration for TyphonJS ES6 Node repos. This configuration is rather comprehensive requiring * complete documentation and strict styling of source code. All commits and pull requests must use this ESLint * configuration. */ { "extends": "eslint:recommended", "ecmaFeatures": { "modules": true }, "env": { "es6": true, "mocha": true, "node": true }, "globals": { "arguments": true, "global": true, "require": true }, "rules": { /* Architecture */ "eqeqeq": 2, "no-array-constructor": 2, "no-console": 0, "no-new-object": 2, /* Documentation */ "require-jsdoc": 2, "valid-jsdoc": [2,{ "requireReturn": false, "requireReturnDescription": false }], /* Styling */ "array-bracket-spacing": 2, "block-spacing": 2, "brace-style": [2, "allman", { "allowSingleLine": true }], "comma-spacing": 2, "comma-style": 2, "curly": 2, "key-spacing": 2, "new-parens": 2, "no-multiple-empty-lines": 2, "no-spaced-func": 2, "object-curly-spacing": [2, "always"], "operator-assignment": [2, "always"], "operator-linebreak": [2, "before", { "overrides": { ":": "after", "?": "after", "||": "after", "&&": "after", "=": "after", "==": "after", "!=": "after", "===": "after", "!==": "after" }}], "semi": [2, "always"], "sort-vars": [2, { "ignoreCase": true }], "space-before-blocks": 2, "space-before-function-paren": [2, "never"], "space-in-parens": 2, "space-infix-ops": 2, "space-return-throw-case": 2, "space-unary-ops": [2, { "words": true, "nonwords": false }], "spaced-comment": [2, "always"], "wrap-regex": 2, /* Styling (useful for checking source, but disable as generated SystemJS config.js does not honor these) */ "quotes": [2, "single", "avoid-escape"], "quote-props": [2, "consistent-as-needed", { "keywords": true }], /* ES6 */ "arrow-parens": [2, "always"], "arrow-spacing": 2, "constructor-super": 2, "generator-star-spacing": [2, { "before": true, "after": false }], "no-class-assign": 2, "no-const-assign": 2, "no-dupe-class-members": 2, "no-this-before-super": 2, "no-var": 2, "object-shorthand": [2, "properties"], "prefer-arrow-callback": 2, "prefer-const": 2, "prefer-spread": 2, "prefer-template": 2, "require-yield": 2, /* Unused ES6 rules */ "prefer-reflect": 0 } }