developtools_ace_ets2bundle/compiler/.eslintrc
openharmony_ci 5a858169a1
!2826 eslint配置更新
Merge pull request !2826 from 椎名真昼/eslint_update
2023-12-20 02:09:42 +00:00

116 lines
3.2 KiB
Plaintext

/*
* 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.
*/
{
"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,
"consistent-return": 2,
"curly": 2,
"dot-location": [2, "property"],
"dot-notation": 2,
"eol-last": 2,
"eqeqeq": 2,
"indent": [2, 2, { "SwitchCase": 1 }],
"key-spacing": 2,
"keyword-spacing": 2,
"max-len": [2, { "code": 160 }],
"new-cap": 2,
"new-parens": 2,
"no-array-constructor": 2,
"no-caller": 2,
"no-cond-assign": 2,
"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 }],
"no-new-func": 2,
"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 }],
"no-unsafe-finally": 2,
"no-unused-vars": [2, { "vars": "all", "args": "none" }],
"no-useless-computed-key": 2,
"no-useless-constructor": 2,
"no-whitespace-before-property": 2,
"one-var": [2, "never"],
"operator-linebreak": [2, "after"],
"padded-blocks": [2, "never"],
"prefer-rest-params": 2,
"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,
"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]
},
"settings": {
"flowtype": {
"onlyFilesWithFlowAnnotation": true
}
}
}