• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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    "curly": 2,
41    "dot-location": [2, "property"],
42    "eol-last": 2,
43    "eqeqeq": 2,
44    "indent": [2, 2, { "SwitchCase": 1 }],
45    "key-spacing": 2,
46    "keyword-spacing": 2,
47    "new-cap": 2,
48    "new-parens": 2,
49    "no-array-constructor": 2,
50    "no-caller": 2,
51    "no-eval": 2,
52    "no-extend-native": 2,
53    "no-extra-bind": 2,
54    "no-extra-parens": 2,
55    "no-floating-decimal": 2,
56    "no-implied-eval": 2,
57    "no-iterator": 2,
58    "no-label-var": 2,
59    "no-labels": 2,
60    "no-lone-blocks": 2,
61    "no-multi-spaces": 2,
62    "no-multi-str": 2,
63    "no-multiple-empty-lines": [2, { "max": 1 }],
64    "no-new-object": 2,
65    "no-new-wrappers": 2,
66    "no-octal-escape": 2,
67    "no-proto": 2,
68    "no-return-assign": 2,
69    "no-self-compare": 2,
70    "no-sequences": 2,
71    "func-call-spacing": 2,
72    "no-throw-literal": 2,
73    "no-trailing-spaces": 2,
74    "no-undef-init": 2,
75    "no-unmodified-loop-condition": 2,
76    "no-unneeded-ternary": [2, { "defaultAssignment": false }],
77    "no-unused-vars": [2, { "vars": "all", "args": "none" }],
78    "no-useless-computed-key": 2,
79    "no-useless-constructor": 2,
80    "no-whitespace-before-property": 2,
81    "one-var": [2, { "initialized": "never" }],
82    "padded-blocks": [2, "never"],
83    "quotes": [2, "single", {"avoidEscape": true, "allowTemplateLiterals": true}],
84    "semi": 2,
85    "semi-spacing": 2,
86    "space-before-blocks": 2,
87    "space-before-function-paren": [2, "never"],
88    "space-in-parens": 2,
89    "space-infix-ops": 2,
90    "space-unary-ops": [2, { "words": true, "nonwords": false }],
91    "spaced-comment": 2,
92    "template-curly-spacing": 2,
93    "wrap-iife": [2, "any"],
94    "no-var": 2,
95    "prefer-const": 2,
96    "array-bracket-spacing": 2
97  },
98
99  "settings": {
100    "flowtype": {
101      "onlyFilesWithFlowAnnotation": true
102    }
103  }
104}
105