|
1 | 1 | const contexts = [
|
2 |
| - 'TSMethodDefinition', |
3 |
| - 'MethodDefinition', |
4 |
| - 'TSParameterProperty[accessibility=public]', |
5 |
| - 'TSPropertyDefinition[accessibility=public]', |
6 |
| - 'PropertyDefinition[accessibility=public]', |
7 |
| - 'TSPropertySignature', |
8 |
| - 'PropertySignature', |
9 |
| - 'TSInterfaceDeclaration', |
10 |
| - 'InterfaceDeclaration', |
11 |
| - 'TSTypeAliasDeclaration', |
12 |
| - 'TypeAliasDeclaration', |
13 |
| - 'TSTypeDeclaration', |
14 |
| - 'TypeDeclaration', |
15 |
| - 'TSEnumDeclaration', |
16 |
| - 'EnumDeclaration', |
17 |
| - 'TSClassDeclaration', |
18 |
| - 'ClassDeclaration', |
19 |
| - 'TSClassExpression', |
20 |
| - 'ClassExpression', |
21 |
| - 'TSFunctionExpression', |
22 |
| - 'FunctionExpression', |
23 |
| - 'TSInterfaceExpression', |
24 |
| - 'InterfaceExpression', |
25 |
| - 'TSEnumExpression', |
26 |
| - 'EnumExpression', |
| 2 | + "TSMethodDefinition", |
| 3 | + "MethodDefinition", |
| 4 | + "TSParameterProperty[accessibility=public]", |
| 5 | + "TSPropertyDefinition[accessibility=public]", |
| 6 | + "PropertyDefinition[accessibility=public]", |
| 7 | + "TSPropertySignature", |
| 8 | + "PropertySignature", |
| 9 | + "TSInterfaceDeclaration", |
| 10 | + "InterfaceDeclaration", |
| 11 | + "TSTypeAliasDeclaration", |
| 12 | + "TypeAliasDeclaration", |
| 13 | + "TSTypeDeclaration", |
| 14 | + "TypeDeclaration", |
| 15 | + "TSEnumDeclaration", |
| 16 | + "EnumDeclaration", |
| 17 | + "TSClassDeclaration", |
| 18 | + "ClassDeclaration", |
| 19 | + "TSClassExpression", |
| 20 | + "ClassExpression", |
| 21 | + "TSFunctionExpression", |
| 22 | + "FunctionExpression", |
| 23 | + "TSInterfaceExpression", |
| 24 | + "InterfaceExpression", |
| 25 | + "TSEnumExpression", |
| 26 | + "EnumExpression", |
27 | 27 | ];
|
28 | 28 |
|
29 | 29 | module.exports = {
|
30 | 30 | extends: [
|
31 |
| - 'eslint:recommended', |
32 |
| - 'plugin:@typescript-eslint/recommended', |
33 |
| - 'prettier', |
| 31 | + "eslint:recommended", |
| 32 | + "plugin:@typescript-eslint/recommended", |
| 33 | + "prettier", |
34 | 34 | ],
|
35 | 35 | root: true,
|
36 |
| - parser: '@typescript-eslint/parser', |
37 |
| - plugins: ['@typescript-eslint', 'eslint-plugin-tsdoc', 'jsdoc'], |
| 36 | + parser: "@typescript-eslint/parser", |
| 37 | + plugins: ["@typescript-eslint", "eslint-plugin-tsdoc", "jsdoc"], |
38 | 38 | overrides: [
|
39 | 39 | {
|
40 |
| - files: ['*.ts', '*.tsx'], |
| 40 | + files: ["*.ts", "*.tsx"], |
41 | 41 | parserOptions: {
|
42 |
| - project: ['./tsconfig.json'], |
| 42 | + project: ["./tsconfig.json"], |
43 | 43 | },
|
44 | 44 | },
|
45 | 45 | ],
|
46 | 46 | env: {
|
47 | 47 | node: true,
|
48 | 48 | },
|
49 | 49 | rules: {
|
50 |
| - '@typescript-eslint/explicit-module-boundary-types': 'off', |
51 |
| - '@typescript-eslint/no-non-null-assertion': 'off', |
52 |
| - '@typescript-eslint/no-explicit-any': 'off', |
53 |
| - '@typescript-eslint/no-empty-function': 'off', |
54 |
| - '@typescript-eslint/await-thenable': 'error', |
55 |
| - '@typescript-eslint/no-floating-promises': 2, |
56 |
| - 'require-await': 2, |
57 |
| - 'no-constant-condition': 'off', |
| 50 | + "@typescript-eslint/explicit-module-boundary-types": "off", |
| 51 | + "@typescript-eslint/no-non-null-assertion": "off", |
| 52 | + "@typescript-eslint/no-explicit-any": "off", |
| 53 | + "@typescript-eslint/no-empty-function": "off", |
| 54 | + "@typescript-eslint/await-thenable": "error", |
| 55 | + "@typescript-eslint/no-floating-promises": 2, |
| 56 | + "require-await": 2, |
| 57 | + "no-constant-condition": "off", |
58 | 58 | camelcase: 2,
|
59 |
| - 'no-restricted-imports': [ |
60 |
| - 'warn', |
| 59 | + "no-restricted-imports": [ |
| 60 | + "warn", |
61 | 61 | {
|
62 | 62 | patterns: [
|
63 | 63 | {
|
64 |
| - group: ['client-dest'], |
| 64 | + group: ["client-dest"], |
65 | 65 | message:
|
66 |
| - 'Fix this absolute garbage import. It's your duty to solve it before it spreads.', |
| 66 | + "Fix this absolute garbage import. It's your duty to solve it before it spreads.", |
67 | 67 | },
|
68 | 68 | {
|
69 |
| - group: ['dest'], |
| 69 | + group: ["dest"], |
70 | 70 | message:
|
71 |
| - 'You should not be importing from a build directory. Did you accidentally do a relative import?', |
| 71 | + "You should not be importing from a build directory. Did you accidentally do a relative import?", |
72 | 72 | },
|
73 | 73 | ],
|
74 | 74 | },
|
75 | 75 | ],
|
76 |
| - 'tsdoc/syntax': 'warn', |
77 |
| - 'jsdoc/require-jsdoc': [ |
78 |
| - 'warn', |
| 76 | + "tsdoc/syntax": "warn", |
| 77 | + "jsdoc/require-jsdoc": [ |
| 78 | + "warn", |
79 | 79 | {
|
80 | 80 | contexts,
|
81 | 81 | checkConstructors: false,
|
82 | 82 | checkGetters: true,
|
83 | 83 | checkSetters: true,
|
84 | 84 | },
|
85 | 85 | ],
|
86 |
| - 'jsdoc/require-description': ['warn', { contexts }], |
87 |
| - 'jsdoc/require-description-complete-sentence': ['warn'], |
88 |
| - 'jsdoc/require-hyphen-before-param-description': ['warn'], |
89 |
| - 'jsdoc/require-param': ['warn', { contexts, checkDestructured: false }], |
90 |
| - 'jsdoc/require-param-description': ['warn', { contexts }], |
91 |
| - 'jsdoc/require-param-name': ['warn', { contexts }], |
92 |
| - 'jsdoc/require-property': ['warn', { contexts }], |
93 |
| - 'jsdoc/require-property-description': ['warn', { contexts }], |
94 |
| - 'jsdoc/require-property-name': ['warn', { contexts }], |
95 |
| - 'jsdoc/require-returns': ['warn', { contexts }], |
96 |
| - 'jsdoc/require-returns-description': ['warn', { contexts }], |
| 86 | + "jsdoc/require-description": ["warn", { contexts }], |
| 87 | + "jsdoc/require-description-complete-sentence": ["warn"], |
| 88 | + "jsdoc/require-hyphen-before-param-description": ["warn"], |
| 89 | + "jsdoc/require-param": ["warn", { contexts, checkDestructured: false }], |
| 90 | + "jsdoc/require-param-description": ["warn", { contexts }], |
| 91 | + "jsdoc/require-param-name": ["warn", { contexts }], |
| 92 | + "jsdoc/require-property": ["warn", { contexts }], |
| 93 | + "jsdoc/require-property-description": ["warn", { contexts }], |
| 94 | + "jsdoc/require-property-name": ["warn", { contexts }], |
| 95 | + "jsdoc/require-returns": ["warn", { contexts }], |
| 96 | + "jsdoc/require-returns-description": ["warn", { contexts }], |
97 | 97 | },
|
98 |
| - ignorePatterns: ['node_modules', 'dest*', 'dist', '*.js', '.eslintrc.cjs'], |
| 98 | + ignorePatterns: ["node_modules", "dest*", "dist", "*.js", ".eslintrc.cjs"], |
99 | 99 | };
|
0 commit comments