generated from SHPEUCF/shpe-repo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.yml
100 lines (100 loc) · 4.26 KB
/
.eslintrc.yml
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
root: true
parser: '@typescript-eslint/parser'
parserOptions:
project: './functions/tsconfig.json'
plugins:
- '@typescript-eslint'
rules:
# ESLint
no-var: error # disallow use of var for variables
camelcase: error # require camelCase for naming
key-spacing: error # require consistent spacing between key-value pairs
comma-dangle: error # disallow lonely commas in last line
block-spacing: error # require spacing in between curly braces for blocks
spaced-comment: error # require space after comments
space-in-parens: error # disallow spaces around parenthesis
no-multi-spaces: error # disallow whitespace around expressions and declarations
space-infix-ops: error # require spaces around operators
func-call-spacing: error # disallow spaces between a function call
no-trailing-spaces: error # disallow trailing whitespace
no-floating-decimal: error # require floating decimals to be complete
space-before-blocks: error # require space before curly brace for blocks
no-whitespace-before-property: error # disallow whitespace before accessing properties
one-var: # require one variable declaration per let/const
- error
- never
no-mixed-spaces-and-tabs: # disallow tabs + spaces for indentation except for smart-tabs
- error
- smart-tabs
no-multiple-empty-lines: # disallow more than one empty line
- error
- max: 1
object-curly-spacing: # require space around curly braces for objects
- error
- always
eol-last: # disallow new line after end of file
- error
- never
padded-blocks: # disallow empty line in between blocks
- error
- never
curly: # require curly braces for large blocks and consistent in branches
- error
- multi-or-nest
- consistent
quotes: # require single-quotes instead of single
- error
- single
- avoidEscape: true
max-len: # require lines to be less than X characters
- error
- tabWidth: 3
- code: 120
comments: 160
ignoreStrings: true
ignoreTemplateLiterals: true
ignoreTrailingComments: true
padding-line-between-statements: # require empty line for statements
- error
- blankLine: always # require empty line after const/let
prev:
- const
- let
next: "*"
- blankLine: any # allow empty lines between const/let
prev:
- const
- let
next:
- const
- let
- blankLine: always # require empty line before return statement
prev: "*"
next: return
# Typescript
'@typescript-eslint/no-floating-promises': error # require to handle promise function directly
brace-style: off
'@typescript-eslint/brace-style': # require opening brace on same line, ending brace on a new line
- error
- stroustrup
- allowSingleLine: true
comma-spacing: off # require space after a comma that is not the end of the line
'@typescript-eslint/comma-spacing':
- error
- before: false
after: true
indent: off # require tab for indentations
'@typescript-eslint/indent':
- error
- tab
- SwitchCase: 1
keyword-spacing: off # require spaces before/after a keyword
'@typescript-eslint/keyword-spacing':
- error
- before: true
after: true
semi: off # require semicolons for JS statements
'@typescript-eslint/semi':
- error
- always
- omitLastInOneLineBlock: true