This repository has been archived by the owner on Feb 5, 2020. It is now read-only.
forked from verdaccio/local-storage
-
Notifications
You must be signed in to change notification settings - Fork 15
/
.eslintrc.yml
113 lines (84 loc) · 2.34 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
101
102
103
104
105
106
107
108
109
110
111
112
113
# vim: syntax=yaml
#
# List of very light restrictions designed to prevent obvious errors,
# not impose our own code style upon other contributors.
#
# This is supposed to be used with `eslint --reset`
#
# Created to work with [email protected]
#
extends: [
"eslint:recommended",
"google",
"plugin:flowtype/recommended",
"plugin:jest/recommended",
"plugin:prettier/recommended"]
plugins: ["flowtype", "jest", "prettier"]
settings:
flowtype:
onlyFilesWithFlowAnnotation: false
parser: "babel-eslint"
env:
node: true
browser: true
es6: true
mocha: true
jest/globals: true
parserOptions:
sourceType: "module"
ecmaVersion: 8
ecmaFeatures:
modules: true
rules:
prettier/prettier: ["error", { "singleQuote": true }]
strict: 0
# useful to have in node.js,
# if you're sure you don't need to handle error, rename it to "_err"
handle-callback-err: 2
padded-blocks: 0
switch-colon-spacing: 0
# just to make sure we don't forget to remove them when releasing
no-debugger: 2
# add "falls through" for those
no-fallthrough: 2
# enforce use curly always
# curly: 1
# just warnings about whitespace weirdness here
eol-last: 1
no-irregular-whitespace: 1
no-mixed-spaces-and-tabs: [1, smart-tabs]
no-trailing-spaces: 1
# probably always an error, tell me if it's not
no-new-require: 2
# single most important rule here, without it linting won't even
# make any sense
no-undef: 2
# in practice, those are always errors
no-unreachable: 2
# useful for code clean-up
no-unused-vars: [2, {"vars": "all", "args": "none"}]
max-len: [1, 160]
# camelcase is standard, but this should be 1 and then 2 soon
camelcase: 0
# jsdoc is mandatory
require-jsdoc: 0
valid-jsdoc: 0
# this feature is cool but not supported by Node 4, disable via comments
prefer-spread: 1
prefer-rest-params: 1
# encorage use es6
no-var: 2
# configuration that should be upgraded progresivelly
no-constant-condition: 2
no-empty: 2
# loop over objects http://eslint.org/docs/rules/guard-for-in
guard-for-in: 2
# this must be used within classes
no-invalid-this: 2
# All object must be uppercase
new-cap: 2
# readbility is important, no multiple inline declarations
one-var: 2
# console not allowed unless for testing
no-console: [2, {"allow": ["log", "warn"]}]
jest/no-focused-tests: 1