2021-11-23 07:07:40 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2021 Huawei Device Co., Ltd.
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2021-08-28 08:48:39 +00:00
|
|
|
{
|
|
|
|
"parserOptions": {
|
|
|
|
"ecmaVersion": 7,
|
|
|
|
"sourceType": "module"
|
|
|
|
},
|
|
|
|
|
|
|
|
"env": {
|
|
|
|
"es6": true,
|
|
|
|
"node": true,
|
|
|
|
"mocha": true
|
|
|
|
},
|
|
|
|
|
|
|
|
"extends": "eslint:recommended",
|
|
|
|
"parser": "@typescript-eslint/parser",
|
|
|
|
|
|
|
|
"rules": {
|
|
|
|
"camelcase": [2, { "properties": "never" }],
|
|
|
|
"accessor-pairs": 2,
|
|
|
|
"arrow-spacing": 2,
|
|
|
|
"block-spacing": 2,
|
|
|
|
"brace-style": 2,
|
|
|
|
"comma-dangle": 2,
|
|
|
|
"comma-spacing": 2,
|
|
|
|
"comma-style": 2,
|
2023-12-06 08:44:53 +00:00
|
|
|
"consistent-return": 2,
|
2021-08-28 08:48:39 +00:00
|
|
|
"curly": 2,
|
|
|
|
"dot-location": [2, "property"],
|
2023-12-06 08:44:53 +00:00
|
|
|
"dot-notation": 2,
|
2021-08-28 08:48:39 +00:00
|
|
|
"eol-last": 2,
|
|
|
|
"eqeqeq": 2,
|
|
|
|
"indent": [2, 2, { "SwitchCase": 1 }],
|
|
|
|
"key-spacing": 2,
|
|
|
|
"keyword-spacing": 2,
|
2023-12-06 08:44:53 +00:00
|
|
|
"max-len": [2, { "code": 160 }],
|
2021-08-28 08:48:39 +00:00
|
|
|
"new-cap": 2,
|
|
|
|
"new-parens": 2,
|
|
|
|
"no-array-constructor": 2,
|
|
|
|
"no-caller": 2,
|
2023-12-06 08:44:53 +00:00
|
|
|
"no-cond-assign": 2,
|
2021-08-28 08:48:39 +00:00
|
|
|
"no-eval": 2,
|
|
|
|
"no-extend-native": 2,
|
|
|
|
"no-extra-bind": 2,
|
|
|
|
"no-floating-decimal": 2,
|
|
|
|
"no-implied-eval": 2,
|
|
|
|
"no-iterator": 2,
|
|
|
|
"no-label-var": 2,
|
|
|
|
"no-labels": 2,
|
|
|
|
"no-lone-blocks": 2,
|
|
|
|
"no-multi-spaces": 2,
|
|
|
|
"no-multi-str": 2,
|
|
|
|
"no-multiple-empty-lines": [2, { "max": 1 }],
|
2023-12-06 08:44:53 +00:00
|
|
|
"no-new-func": 2,
|
2021-08-28 08:48:39 +00:00
|
|
|
"no-new-object": 2,
|
|
|
|
"no-new-wrappers": 2,
|
|
|
|
"no-octal-escape": 2,
|
|
|
|
"no-proto": 2,
|
|
|
|
"no-return-assign": 2,
|
|
|
|
"no-self-compare": 2,
|
|
|
|
"no-sequences": 2,
|
|
|
|
"func-call-spacing": 2,
|
|
|
|
"no-throw-literal": 2,
|
|
|
|
"no-trailing-spaces": 2,
|
|
|
|
"no-undef-init": 2,
|
|
|
|
"no-unmodified-loop-condition": 2,
|
|
|
|
"no-unneeded-ternary": [2, { "defaultAssignment": false }],
|
2023-12-06 08:44:53 +00:00
|
|
|
"no-unsafe-finally": 2,
|
2021-08-28 08:48:39 +00:00
|
|
|
"no-unused-vars": [2, { "vars": "all", "args": "none" }],
|
|
|
|
"no-useless-computed-key": 2,
|
|
|
|
"no-useless-constructor": 2,
|
|
|
|
"no-whitespace-before-property": 2,
|
2023-12-06 08:44:53 +00:00
|
|
|
"one-var": [2, "never"],
|
|
|
|
"operator-linebreak": [2, "after"],
|
2021-08-28 08:48:39 +00:00
|
|
|
"padded-blocks": [2, "never"],
|
2023-12-06 08:44:53 +00:00
|
|
|
"prefer-rest-params": 2,
|
2021-08-28 08:48:39 +00:00
|
|
|
"quotes": [2, "single", {"avoidEscape": true, "allowTemplateLiterals": true}],
|
|
|
|
"semi": 2,
|
|
|
|
"semi-spacing": 2,
|
|
|
|
"space-before-blocks": 2,
|
|
|
|
"space-before-function-paren": [2, "never"],
|
|
|
|
"space-in-parens": 2,
|
|
|
|
"space-infix-ops": 2,
|
|
|
|
"space-unary-ops": [2, { "words": true, "nonwords": false }],
|
|
|
|
"spaced-comment": 2,
|
|
|
|
"template-curly-spacing": 2,
|
|
|
|
"wrap-iife": [2, "any"],
|
|
|
|
"no-var": 2,
|
|
|
|
"prefer-const": 2,
|
2023-12-04 08:37:04 +00:00
|
|
|
"array-bracket-spacing": 2,
|
|
|
|
"max-depth": ["error", 4],
|
|
|
|
"max-lines-per-function": ["error", {"max": 50, "skipBlankLines": true, "skipComments": true}],
|
|
|
|
"complexity": ["error", 20],
|
|
|
|
"max-lines": ["error", 2000]
|
2021-08-28 08:48:39 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
"settings": {
|
|
|
|
"flowtype": {
|
|
|
|
"onlyFilesWithFlowAnnotation": true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|