This repository has been archived by the owner on Apr 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.yaml
73 lines (65 loc) · 2.12 KB
/
.eslintrc.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
---
parser: "@typescript-eslint/parser"
parserOptions:
allowImportExportEverywhere: false
plugins:
- "meteor"
- "tsdoc"
- "@typescript-eslint"
extends:
- "airbnb"
- "plugin:meteor/recommended"
- "plugin:import/errors"
- "plugin:import/warnings"
- "plugin:@typescript-eslint/eslint-recommended"
- "plugin:@typescript-eslint/recommended"
settings:
"import/resolver":
meteor:
extensions: [".js", ".jsx", ".ts", ".tsx"]
typescript:
extensions: [".js", ".jsx", ".ts", ".tsx"]
rules:
# noImplicitReturns requires us to declare return types, so TypeScript will
# already warn if we fail to return a value, and it can tell when an explicit
# return is unnecessary (e.g. if a function narrows a type to never)
"consistent-return": ["off"]
"default-case": ["off"]
"no-underscore-dangle":
- "error"
- "allow":
- "_id"
"import/extensions": ["error", "never"]
# Imports should be grouped, and sorted within the group. Meteor imports
# are their own group, after built-ins and before other external libraries
"import/order":
- "error"
- "alphabetize": {"order": "asc"}
"pathGroups":
- "pattern": "meteor/**"
"group": "external"
"position": "before"
"pathGroupsExcludedImportTypes": ["builtin"]
"newlines-between": "never"
"tsdoc/syntax": ["error"]
# This is an idealistic rule that doesn't seem to have ever encountered
# reality
"@typescript-eslint/no-explicit-any": ["off"]
# Use underscore prefixes on arguments to indicate that they're unused
"@typescript-eslint/no-unused-vars":
- "error"
- "argsIgnorePattern": "^_"
"@typescript-eslint/no-namespace": ["off"]
overrides:
- files: "types/**"
rules:
# type declarations for other libraries don't get to choose their export
# structure
"import/prefer-default-export": ["off"]
- files: "tests/**"
rules:
# arrow functions with mocha are discouraged
func-names: ["off"]
prefer-arrow-callback: ["off"]
# tests can make unsafe assumptions we don't want in real code
"@typescript-eslint/no-non-null-assertion": ["off"]