UNPKG

1.37 kBJavaScriptView Raw
1/*!
2 * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3 * Licensed under the MIT License.
4 */
5
6module.exports = {
7 extends: ["./recommended.js"],
8 overrides: [
9 {
10 // Rules only for TypeScript files
11 files: ["*.ts", "*.tsx"],
12 rules: {
13 // STRICT RULES
14 "@typescript-eslint/explicit-member-accessibility": [
15 "error",
16 {
17 accessibility: "explicit",
18 overrides: {
19 accessors: "explicit",
20 constructors: "no-public",
21 methods: "explicit",
22 properties: "explicit",
23 parameterProperties: "explicit",
24 },
25 },
26 ],
27
28 // Parameter properties can be confusing to those new to TypeScript as they are less explicit than other
29 // ways of declaring and initializing class members.
30 "@typescript-eslint/no-parameter-properties": [
31 "warn",
32 {
33 allows: ["private", "private readonly", "public readonly", "readonly"],
34 },
35 ],
36 },
37 },
38 ],
39};