|
| 1 | +{ |
| 2 | + "env": { |
| 3 | + "es6" : true, |
| 4 | + "browser" : true, |
| 5 | + "node" : true |
| 6 | +}, |
| 7 | + "globals": { |
| 8 | + "globalThis": false |
| 9 | + }, |
| 10 | + "parser": "@babel/eslint-parser", |
| 11 | + "parserOptions": { |
| 12 | + "ecmaVersion": 6, |
| 13 | + "sourceType": "module", |
| 14 | + "requireConfigFile": false, |
| 15 | + "babelOptions": { |
| 16 | + "plugins": [ |
| 17 | + "@babel/plugin-syntax-import-assertions" |
| 18 | + ] |
| 19 | + } |
| 20 | + }, |
| 21 | + "plugins": ["eslint-plugin-jsdoc"], |
| 22 | + "extends": "eslint:recommended", |
| 23 | + "rules": { |
| 24 | + // http://eslint.org/docs/rules/ |
| 25 | + "accessor-pairs": "error", |
| 26 | + "arrow-body-style": ["error", "as-needed"], |
| 27 | + "arrow-spacing": ["error", { "before": true, "after": true }], |
| 28 | + "block-spacing": ["error", "always"], |
| 29 | + "block-scoped-var": "error", |
| 30 | + "brace-style": ["off", "1tbs", { "allowSingleLine": true }], |
| 31 | + "camelcase": ["off", { "properties": "never" }], |
| 32 | + "comma-dangle": ["error", "never"], |
| 33 | + "comma-spacing": ["error", { "before": false, "after": true }], |
| 34 | + "comma-style": ["error", "last"], |
| 35 | + "constructor-super": "error", |
| 36 | + "curly": ["error", "multi-line"], |
| 37 | + "dot-location": ["error", "property"], |
| 38 | + "eol-last": "error", |
| 39 | + "eqeqeq": ["error", "allow-null"], |
| 40 | + "func-call-spacing": ["error", "never"], |
| 41 | + "handle-callback-err": ["error", "^(err|error)$" ], |
| 42 | + "indent": ["off", 4], |
| 43 | + "key-spacing": ["off", { "beforeColon": false, "afterColon": true }], |
| 44 | + "keyword-spacing": ["error", { "before": true, "after": true }], |
| 45 | + "new-cap": ["error", { "newIsCap": true, "capIsNew": false }], |
| 46 | + "new-parens": "error", |
| 47 | + "no-array-constructor": "error", |
| 48 | + "no-caller": "error", |
| 49 | + "no-class-assign": "error", |
| 50 | + "no-constructor-return": "error", |
| 51 | + "no-duplicate-imports": "error", |
| 52 | + "no-dupe-class-members": "error", |
| 53 | + "no-eval": "error", |
| 54 | + "no-extend-native": "error", |
| 55 | + "no-extra-bind": "error", |
| 56 | + "no-extra-parens": ["error", "functions"], |
| 57 | + "no-floating-decimal": "error", |
| 58 | + "no-implied-eval": "error", |
| 59 | + "no-implicit-coercion": "off", |
| 60 | + "no-implicit-globals": "error", |
| 61 | + "no-import-assign": "error", |
| 62 | + "no-iterator": "error", |
| 63 | + "no-label-var": "error", |
| 64 | + "no-labels": ["error", { "allowLoop": false, "allowSwitch": false }], |
| 65 | + "no-lone-blocks": "error", |
| 66 | + "no-loss-of-precision": "error", |
| 67 | + "no-mixed-spaces-and-tabs": "error", |
| 68 | + "no-multi-spaces": ["off", { "ignoreEOLComments": true }], |
| 69 | + "no-multi-str": "error", |
| 70 | + "no-multiple-empty-lines": ["off", { "max": 1 }], |
| 71 | + "no-native-reassign": "error", |
| 72 | + "no-negated-in-lhs": "error", |
| 73 | + "no-new": "error", |
| 74 | + "no-new-func": "error", |
| 75 | + "no-new-object": "error", |
| 76 | + "no-new-native-nonconstructor": "error", |
| 77 | + "no-new-require": "error", |
| 78 | + "no-new-wrappers": "error", |
| 79 | + "no-octal-escape": "error", |
| 80 | + "no-path-concat": "error", |
| 81 | + "no-proto": "error", |
| 82 | + "no-prototype-builtins": "off", |
| 83 | + "no-return-assign": ["error", "except-parens"], |
| 84 | + "no-self-compare": "error", |
| 85 | + "no-sequences": "off", |
| 86 | + "no-tabs": "error", |
| 87 | + "no-template-curly-in-string": "off", |
| 88 | + "no-this-before-super": "error", |
| 89 | + "no-throw-literal": "off", |
| 90 | + "no-trailing-spaces": "error", |
| 91 | + "no-undef-init": "error", |
| 92 | + "no-unmodified-loop-condition": "error", |
| 93 | + "no-unneeded-ternary": ["off", { "defaultAssignment": false }], |
| 94 | + "no-unreachable": "error", |
| 95 | + "no-unused-vars" : ["error", { "args": "after-used" }], |
| 96 | + "no-unused-private-class-members": "error", |
| 97 | + "no-useless-call": "off", |
| 98 | + "no-useless-computed-key": "error", |
| 99 | + "no-useless-constructor": "error", |
| 100 | + // used in RegExp |
| 101 | + "no-useless-escape" : "off", |
| 102 | + "no-useless-rename": "error", |
| 103 | + "no-whitespace-before-property": "error", |
| 104 | + "object-property-newline": ["error", { "allowMultiplePropertiesPerLine": true }], |
| 105 | + "one-var": ["off", { "initialized": "never" }], |
| 106 | + "operator-linebreak": ["off", "after", { "overrides": { "?": "before", ":": "before" } }], |
| 107 | + "padded-blocks": ["off", "never"], |
| 108 | + "prefer-arrow-callback" : "error", |
| 109 | + "quotes": ["error", "double", { "avoidEscape": true, "allowTemplateLiterals": true }], |
| 110 | + "rest-spread-spacing": ["error", "never"], |
| 111 | + "semi": ["error", "always"], |
| 112 | + "semi-spacing": ["error", { "before": false, "after": true }], |
| 113 | + "space-before-blocks": ["error", "always"], |
| 114 | + "space-before-function-paren": ["off", "always"], |
| 115 | + "space-in-parens": "off", // ["error", "never"], |
| 116 | + "space-infix-ops": "off", |
| 117 | + "space-unary-ops": ["off", { "words": true, "nonwords": false }], |
| 118 | + "spaced-comment": ["off", "always", { "line": { "markers": ["*package", "!", ","] }, "block": { "balanced": true, "markers": ["*package", "!", ","], "exceptions": ["*"] } }], |
| 119 | + "template-curly-spacing": ["error", "never"], |
| 120 | + "unicode-bom": ["error", "never"], |
| 121 | + "valid-typeof": ["error", { "requireStringLiterals": true }], |
| 122 | + "yield-star-spacing": ["error", "both"], |
| 123 | + "yoda": ["error", "never"], |
| 124 | + "jsdoc/require-hyphen-before-param-description": 1 |
| 125 | + } |
| 126 | +} |
0 commit comments