1/* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16{ 17 "parserOptions": { 18 "ecmaVersion": 7, 19 "sourceType": "module" 20 }, 21 22 "env": { 23 "es6": true, 24 "node": true, 25 "mocha": true 26 }, 27 28 "extends": "eslint:recommended", 29 "parser": "@typescript-eslint/parser", 30 31 "rules": { 32 "camelcase": [2, { "properties": "never" }], 33 "accessor-pairs": 2, 34 "arrow-spacing": 2, 35 "block-spacing": 2, 36 "brace-style": 2, 37 "comma-dangle": 2, 38 "comma-spacing": 2, 39 "comma-style": 2, 40 "consistent-return": 2, 41 "curly": 2, 42 "dot-location": [2, "property"], 43 "dot-notation": 2, 44 "eol-last": 2, 45 "eqeqeq": 2, 46 "indent": [2, 2, { "SwitchCase": 1 }], 47 "key-spacing": 2, 48 "keyword-spacing": 2, 49 "max-len": [2, { "code": 160 }], 50 "new-cap": 2, 51 "new-parens": 2, 52 "no-array-constructor": 2, 53 "no-caller": 2, 54 "no-cond-assign": 2, 55 "no-eval": 2, 56 "no-extend-native": 2, 57 "no-extra-bind": 2, 58 "no-floating-decimal": 2, 59 "no-implied-eval": 2, 60 "no-iterator": 2, 61 "no-label-var": 2, 62 "no-labels": 2, 63 "no-lone-blocks": 2, 64 "no-multi-spaces": 2, 65 "no-multi-str": 2, 66 "no-multiple-empty-lines": [2, { "max": 1 }], 67 "no-new-func": 2, 68 "no-new-object": 2, 69 "no-new-wrappers": 2, 70 "no-octal-escape": 2, 71 "no-proto": 2, 72 "no-return-assign": 2, 73 "no-self-compare": 2, 74 "no-sequences": 2, 75 "func-call-spacing": 2, 76 "no-throw-literal": 2, 77 "no-trailing-spaces": 2, 78 "no-undef-init": 2, 79 "no-unmodified-loop-condition": 2, 80 "no-unneeded-ternary": [2, { "defaultAssignment": false }], 81 "no-unsafe-finally": 2, 82 "no-unused-vars": [2, { "vars": "all", "args": "none" }], 83 "no-useless-computed-key": 2, 84 "no-useless-constructor": 2, 85 "no-whitespace-before-property": 2, 86 "one-var": [2, "never"], 87 "operator-linebreak": [2, "after"], 88 "padded-blocks": [2, "never"], 89 "prefer-rest-params": 2, 90 "quotes": [2, "single", {"avoidEscape": true, "allowTemplateLiterals": true}], 91 "semi": 2, 92 "semi-spacing": 2, 93 "space-before-blocks": 2, 94 "space-before-function-paren": [2, "never"], 95 "space-in-parens": 2, 96 "space-infix-ops": 2, 97 "space-unary-ops": [2, { "words": true, "nonwords": false }], 98 "spaced-comment": 2, 99 "template-curly-spacing": 2, 100 "wrap-iife": [2, "any"], 101 "no-var": 2, 102 "prefer-const": 2, 103 "array-bracket-spacing": 2, 104 "max-depth": ["error", 4], 105 "max-lines-per-function": ["error", {"max": 50, "skipBlankLines": true, "skipComments": true}], 106 "complexity": ["error", 20], 107 "max-lines": ["error", 2000] 108 }, 109 110 "settings": { 111 "flowtype": { 112 "onlyFilesWithFlowAnnotation": true 113 } 114 } 115} 116