|
| 1 | +module.exports = { |
| 2 | + rules: { |
| 3 | + 'array-bracket-newline': [2, 'consistent'], |
| 4 | + 'array-bracket-spacing': 2, |
| 5 | + 'array-element-newline': [2, 'consistent'], |
| 6 | + 'block-scoped-var': 2, |
| 7 | + 'block-spacing': 2, |
| 8 | + 'brace-style': [2, '1tbs', { allowSingleLine: true }], |
| 9 | + 'camelcase': 2, |
| 10 | + 'comma-spacing': 2, |
| 11 | + 'comma-style': 2, |
| 12 | + 'complexity': 1, |
| 13 | + 'computed-property-spacing': 2, |
| 14 | + 'curly': 2, |
| 15 | + 'dot-location': [2, 'property'], |
| 16 | + 'dot-notation': 2, |
| 17 | + 'eol-last': 2, |
| 18 | + 'eqeqeq': 2, |
| 19 | + 'func-call-spacing': 2, |
| 20 | + 'function-call-argument-newline': [2, 'consistent'], |
| 21 | + 'function-paren-newline': [2, 'consistent'], |
| 22 | + 'guard-for-in': 2, |
| 23 | + 'indent': [2, 'tab', { SwitchCase: 1 }], |
| 24 | + 'key-spacing': 2, |
| 25 | + 'keyword-spacing': 2, |
| 26 | + 'linebreak-style': 2, |
| 27 | + 'max-depth': [1, { 'max': 10 }], |
| 28 | + 'max-lines-per-function': [1, { max: 100, skipBlankLines: true, skipComments: true }], |
| 29 | + 'max-nested-callbacks': [1, { max: 8 }], |
| 30 | + 'max-params': [1, { 'max': 8 }], |
| 31 | + 'new-cap': 2, |
| 32 | + 'new-parens': 2, |
| 33 | + 'no-array-constructor': 2, |
| 34 | + 'no-bitwise': 2, |
| 35 | + 'no-caller': 2, |
| 36 | + 'no-catch-shadow': 2, |
| 37 | + 'no-constructor-return': 2, |
| 38 | + 'no-else-return': [2, { allowElseIf: false }], |
| 39 | + 'no-empty': [2, { allowEmptyCatch: true }], |
| 40 | + 'no-empty-function': 2, |
| 41 | + 'no-eval': 2, |
| 42 | + 'no-extra-bind': 2, |
| 43 | + 'no-extra-label': 2, |
| 44 | + 'no-extra-parens': [2, 'all', { nestedBinaryExpressions: false, enforceForArrowConditionals: true }], |
| 45 | + 'no-floating-decimal': 2, |
| 46 | + 'no-implicit-coercion': [2, { boolean: false }], |
| 47 | + 'no-implied-eval': 2, |
| 48 | + 'no-lone-blocks': 2, |
| 49 | + 'no-lonely-if': 2, |
| 50 | + 'no-loop-func': 2, |
| 51 | + 'no-mixed-operators': 2, |
| 52 | + 'no-mixed-requires': [2, { allowCall: false }], |
| 53 | + 'no-mixed-spaces-and-tabs': [2, 'smart-tabs'], |
| 54 | + 'no-multi-spaces': [2, { exceptions: { Property: false } }], |
| 55 | + 'no-multiple-empty-lines': [2, { max: 1 }], |
| 56 | + 'no-nested-ternary': 2, |
| 57 | + 'no-new': 2, |
| 58 | + 'no-new-func': 2, |
| 59 | + 'no-new-object': 2, |
| 60 | + 'no-new-require': 2, |
| 61 | + 'no-new-wrappers': 2, |
| 62 | + 'no-octal': 2, |
| 63 | + 'no-proto': 2, |
| 64 | + 'no-redeclare': 2, |
| 65 | + 'no-return-assign': 2, |
| 66 | + 'no-self-compare': 2, |
| 67 | + 'no-sequences': 2, |
| 68 | + 'no-shadow': [1, { builtinGlobals: true }], |
| 69 | + 'no-shadow-restricted-names': 2, |
| 70 | + 'no-throw-literal': 2, |
| 71 | + 'no-trailing-spaces': 2, |
| 72 | + 'no-undef-init': 2, |
| 73 | + 'no-unmodified-loop-condition': 2, |
| 74 | + 'no-unneeded-ternary': [2, { defaultAssignment: false }], |
| 75 | + 'no-unused-expressions': 2, |
| 76 | + 'no-unsafe-negation': [2, { enforceForOrderingRelations: true }], |
| 77 | + 'no-use-before-define': [2, { functions: false, variables: false }], |
| 78 | + 'no-useless-call': 2, |
| 79 | + 'no-useless-concat': 2, |
| 80 | + 'no-useless-return': 2, |
| 81 | + 'no-whitespace-before-property': 2, |
| 82 | + 'object-curly-newline': [2, { multiline: true, consistent: true }], |
| 83 | + 'object-curly-spacing': [2, 'always'], |
| 84 | + 'object-property-newline': [2, { allowAllPropertiesOnSameLine: true }], |
| 85 | + 'one-var-declaration-per-line': 2, |
| 86 | + 'operator-assignment': 2, |
| 87 | + 'operator-linebreak': 2, |
| 88 | + 'padded-blocks': [2, 'never'], |
| 89 | + 'prefer-promise-reject-errors': 2, |
| 90 | + 'quote-props': [2, 'consistent'], |
| 91 | + 'quotes': [2, 'single', { avoidEscape: true, allowTemplateLiterals: true }], |
| 92 | + 'radix': 2, |
| 93 | + 'require-jsdoc': [2, { require: { ClassDeclaration: true, MethodDefinition: true } }], |
| 94 | + 'semi': 2, |
| 95 | + 'semi-spacing': 2, |
| 96 | + 'semi-style': 2, |
| 97 | + 'space-before-blocks': 2, |
| 98 | + 'space-before-function-paren': [2, { anonymous: 'always', named: 'never', asyncArrow: 'always' }], |
| 99 | + 'space-in-parens': 2, |
| 100 | + 'space-infix-ops': 2, |
| 101 | + 'space-unary-ops': 2, |
| 102 | + // The //////// allows for the 10-slash delimiter we use in Angular controllers. |
| 103 | + 'spaced-comment': [2, 'always', { block: { balanced: true }, line: { exceptions: ['/'] } }], |
| 104 | + 'switch-colon-spacing': 2, |
| 105 | + 'use-isnan': [2, { enforceForIndexOf: true }], |
| 106 | + 'valid-jsdoc': [ |
| 107 | + 2, |
| 108 | + { |
| 109 | + matchDescription: '\\.$', |
| 110 | + preferType: { |
| 111 | + function: 'Function', |
| 112 | + boolean: 'Boolean', |
| 113 | + number: 'Number', |
| 114 | + integer: 'Number', |
| 115 | + int: 'Number', |
| 116 | + string: 'String', |
| 117 | + object: 'Object' |
| 118 | + }, |
| 119 | + requireParamType: true, |
| 120 | + requireReturn: false |
| 121 | + } |
| 122 | + ], |
| 123 | + 'wrap-iife': [2, 'inside', { functionPrototypeMethods: true }], |
| 124 | + 'yoda': 2, |
| 125 | + } |
| 126 | +}; |
0 commit comments