.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / tslint / lib / configs / recommended.js
1 "use strict";
2 /**
3  * @license
4  * Copyright 2018 Palantir Technologies, Inc.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *     http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 Object.defineProperty(exports, "__esModule", { value: true });
19 exports.rules = {
20     "adjacent-overload-signatures": true,
21     align: {
22         options: ["parameters", "statements"],
23     },
24     "array-type": {
25         options: ["array-simple"],
26     },
27     "arrow-parens": true,
28     "arrow-return-shorthand": true,
29     "ban-types": {
30         options: [
31             ["Object", "Avoid using the `Object` type. Did you mean `object`?"],
32             [
33                 "Function",
34                 "Avoid using the `Function` type. Prefer a specific function type, like `() => void`.",
35             ],
36             ["Boolean", "Avoid using the `Boolean` type. Did you mean `boolean`?"],
37             ["Number", "Avoid using the `Number` type. Did you mean `number`?"],
38             ["String", "Avoid using the `String` type. Did you mean `string`?"],
39             ["Symbol", "Avoid using the `Symbol` type. Did you mean `symbol`?"],
40         ],
41     },
42     "callable-types": true,
43     "class-name": true,
44     "comment-format": {
45         options: ["check-space"],
46     },
47     curly: true,
48     "cyclomatic-complexity": false,
49     eofline: true,
50     forin: true,
51     "import-spacing": true,
52     indent: {
53         options: ["spaces"],
54     },
55     "interface-name": {
56         options: ["always-prefix"],
57     },
58     "interface-over-type-literal": true,
59     "jsdoc-format": true,
60     "label-position": true,
61     "max-classes-per-file": { options: 1 },
62     "max-line-length": { options: 120 },
63     "member-access": true,
64     "member-ordering": {
65         options: {
66             order: "statics-first",
67         },
68     },
69     "new-parens": true,
70     "no-angle-bracket-type-assertion": true,
71     "no-any": false,
72     "no-arg": true,
73     "no-bitwise": true,
74     "no-conditional-assignment": true,
75     "no-consecutive-blank-lines": true,
76     "no-console": true,
77     "no-construct": true,
78     "no-debugger": true,
79     "no-duplicate-super": true,
80     "no-empty": true,
81     "no-empty-interface": true,
82     "no-eval": true,
83     "no-internal-module": true,
84     "no-invalid-this": false,
85     "no-misused-new": true,
86     "no-namespace": true,
87     "no-parameter-properties": false,
88     "no-reference": true,
89     "no-reference-import": true,
90     "no-shadowed-variable": true,
91     "no-string-literal": true,
92     "no-string-throw": true,
93     "no-switch-case-fall-through": false,
94     "no-trailing-whitespace": true,
95     "no-unnecessary-initializer": true,
96     "no-unsafe-finally": true,
97     "no-unused-expression": true,
98     "no-use-before-declare": false,
99     "no-var-keyword": true,
100     "no-var-requires": true,
101     "object-literal-key-quotes": { options: "consistent-as-needed" },
102     "object-literal-shorthand": true,
103     "object-literal-sort-keys": true,
104     "one-line": {
105         options: [
106             "check-catch",
107             "check-else",
108             "check-finally",
109             "check-open-brace",
110             "check-whitespace",
111         ],
112     },
113     "one-variable-per-declaration": { options: ["ignore-for-loop"] },
114     "only-arrow-functions": {
115         options: ["allow-declarations", "allow-named-functions"],
116     },
117     "ordered-imports": {
118         options: {
119             "import-sources-order": "case-insensitive",
120             "module-source-path": "full",
121             "named-imports-order": "case-insensitive",
122         },
123     },
124     "prefer-const": true,
125     "prefer-for-of": true,
126     quotemark: {
127         options: ["double", "avoid-escape"],
128     },
129     radix: true,
130     semicolon: { options: ["always"] },
131     "space-before-function-paren": {
132         options: {
133             anonymous: "never",
134             asyncArrow: "always",
135             constructor: "never",
136             method: "never",
137             named: "never",
138         },
139     },
140     "trailing-comma": {
141         options: {
142             esSpecCompliant: true,
143             multiline: "always",
144             singleline: "never",
145         },
146     },
147     "triple-equals": { options: ["allow-null-check"] },
148     typedef: false,
149     "typedef-whitespace": {
150         options: [
151             {
152                 "call-signature": "nospace",
153                 "index-signature": "nospace",
154                 parameter: "nospace",
155                 "property-declaration": "nospace",
156                 "variable-declaration": "nospace",
157             },
158             {
159                 "call-signature": "onespace",
160                 "index-signature": "onespace",
161                 parameter: "onespace",
162                 "property-declaration": "onespace",
163                 "variable-declaration": "onespace",
164             },
165         ],
166     },
167     "typeof-compare": false,
168     "unified-signatures": true,
169     "use-isnan": true,
170     "variable-name": {
171         options: ["ban-keywords", "check-format", "allow-pascal-case"],
172     },
173     whitespace: {
174         options: [
175             "check-branch",
176             "check-decl",
177             "check-operator",
178             "check-separator",
179             "check-type",
180             "check-typecast",
181         ],
182     },
183 };
184 exports.jsRules = {
185     align: {
186         options: ["parameters", "statements"],
187     },
188     "class-name": true,
189     curly: true,
190     eofline: true,
191     forin: true,
192     "import-spacing": true,
193     indent: {
194         options: ["spaces"],
195     },
196     "jsdoc-format": true,
197     "label-position": true,
198     "max-line-length": {
199         options: [120],
200     },
201     "new-parens": true,
202     "no-arg": true,
203     "no-bitwise": true,
204     "no-conditional-assignment": true,
205     "no-consecutive-blank-lines": true,
206     "no-console": true,
207     "no-construct": true,
208     "no-debugger": true,
209     "no-duplicate-super": true,
210     "no-duplicate-variable": true,
211     "no-empty": true,
212     "no-eval": true,
213     "no-reference": true,
214     "no-shadowed-variable": true,
215     "no-string-literal": true,
216     "no-string-throw": true,
217     "no-switch-case-fall-through": false,
218     "no-trailing-whitespace": true,
219     "no-unused-expression": true,
220     // disable this rule as it is very heavy performance-wise and not that useful
221     "no-use-before-declare": false,
222     "object-literal-sort-keys": true,
223     "one-line": {
224         options: [
225             "check-catch",
226             "check-else",
227             "check-finally",
228             "check-open-brace",
229             "check-whitespace",
230         ],
231     },
232     "one-variable-per-declaration": { options: ["ignore-for-loop"] },
233     quotemark: {
234         options: ["double", "avoid-escape"],
235     },
236     radix: true,
237     semicolon: { options: ["always"] },
238     "space-before-function-paren": {
239         options: {
240             anonymous: "never",
241             asyncArrow: "always",
242             constructor: "never",
243             method: "never",
244             named: "never",
245         },
246     },
247     "trailing-comma": {
248         options: {
249             multiline: "always",
250             singleline: "never",
251         },
252     },
253     "triple-equals": { options: ["allow-null-check"] },
254     "use-isnan": true,
255     "variable-name": {
256         options: ["ban-keywords", "check-format", "allow-pascal-case"],
257     },
258     whitespace: {
259         options: [
260             "check-branch",
261             "check-decl",
262             "check-operator",
263             "check-separator",
264             "check-type",
265             "check-typecast",
266         ],
267     },
268 };