• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2023 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": 6,
19    "sourceType": "module"
20  },
21
22  "env": {
23    "es6": true,
24    "node": true,
25    "mocha": true
26  },
27
28  "globals": {
29    "ace": false,
30    "aceConsole": false,
31    "aceapp": false,
32    "markupState": false,
33    "notifyTrimMemory": false,
34    "i18nPluralRules": false,
35    "compileAndRunBundle": false,
36    "language": false
37  },
38
39  "extends": "eslint:recommended",
40
41  "parser": "@typescript-eslint/parser",
42
43  "rules": {
44    "camelcase": [2, { "properties": "never" }],
45    "accessor-pairs": 2,
46    "arrow-spacing": 2,
47    "block-spacing": 2,
48    "brace-style": 2,
49    "comma-dangle": 2,
50    "comma-spacing": 2,
51    "comma-style": 2,
52    "curly": 2,
53    "dot-location": [2, "property"],
54    "eol-last": 2,
55    "eqeqeq": 2,
56    "indent": [2, 2, { "SwitchCase": 1 }],
57    "key-spacing": 2,
58    "keyword-spacing": 2,
59    "new-cap": 2,
60    "new-parens": 2,
61    "no-array-constructor": 2,
62    "no-caller": 2,
63    "no-eval": 2,
64    "no-extend-native": 2,
65    "no-extra-bind": 2,
66    "no-extra-parens": 2,
67    "no-floating-decimal": 2,
68    "no-implied-eval": 2,
69    "no-iterator": 2,
70    "no-label-var": 2,
71    "no-labels": 2,
72    "no-lone-blocks": 2,
73    "no-multi-spaces": 2,
74    "no-multi-str": 2,
75    "no-multiple-empty-lines": [2, { "max": 1 }],
76    "no-new-object": 2,
77    "no-new-wrappers": 2,
78    "no-octal-escape": 2,
79    "no-proto": 2,
80    "no-return-assign": 2,
81    "no-self-compare": 2,
82    "no-sequences": 2,
83    "func-call-spacing": 2,
84    "no-throw-literal": 2,
85    "no-trailing-spaces": 2,
86    "no-undef-init": 2,
87    "no-unmodified-loop-condition": 2,
88    "no-unneeded-ternary": [2, { "defaultAssignment": false }],
89    "no-unused-vars": [2, { "vars": "all", "args": "none" }],
90    "no-useless-computed-key": 2,
91    "no-useless-constructor": 2,
92    "no-whitespace-before-property": 2,
93    "one-var": [2, { "initialized": "never" }],
94    "padded-blocks": [2, "never"],
95    "quotes": [2, "single", {"avoidEscape": true, "allowTemplateLiterals": true}],
96    "semi": 2,
97    "semi-spacing": 2,
98    "space-before-blocks": 2,
99    "space-before-function-paren": [2, "never"],
100    "space-in-parens": 2,
101    "space-infix-ops": 2,
102    "space-unary-ops": [2, { "words": true, "nonwords": false }],
103    "spaced-comment": 2,
104    "template-curly-spacing": 2,
105    "wrap-iife": [2, "any"],
106    "no-var": 2,
107    "prefer-const": 2,
108    "array-bracket-spacing": 2,
109    "no-useless-escape": 0
110  },
111
112  "settings": {
113    "flowtype": {
114      "onlyFilesWithFlowAnnotation": true
115    }
116  }
117}
118