forked from zulip/zulip-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.yaml
128 lines (121 loc) · 4.67 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
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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
parser: babel-eslint
plugins:
- react-native
- prettier
- jest
- flowtype
- spellcheck
env:
browser: true
mocha: true
node: true
jest: true
globals: {}
extends: airbnb
settings:
import/resolver:
node:
extensions: [.js, .ios.js, .android.js]
rules:
# Formatting and naming
prettier/prettier:
- off
- printWidth: 100
parser: flow
singleQuote: true
trailingComma: all
camelcase: off
new-cap: [error, {capIsNew: false}]
curly: [error, multi-line]
comma-dangle: [error, always-multiline]
quote-props: off
indent: off
arrow-parens: off
no-confusing-arrow: off
no-mixed-operators: off
function-paren-newline: off
object-curly-newline: off
# Tricky code. We repeal several bans from the Airbnb style.
no-bitwise: off
no-continue: off
no-plusplus: off
no-nested-ternary: off
# Likely-wrong code
no-alert: error
no-restricted-syntax: off
no-unused-vars: [warn, {vars: local, args: none}]
# no-param-reassign seems well-intentioned... but fires on common uses
# of Array#reduce. Too noisy.
no-param-reassign: off
# Imports
import/prefer-default-export: off
import/no-unresolved: [error, {caseSensitive: false}]
import/no-extraneous-dependencies:
- error
- devDependencies: ['**/__tests__/*.js', tools/**]
# React and React Native
react/sort-comp: off
react/jsx-filename-extension: off
react/prefer-stateless-function: off
react/require-default-props: off
react/default-props-match-prop-types: off
# react/prop-types: off
react-native/no-unused-styles: error
react-native/split-platform-components: error
react-native/no-inline-styles: error
# to enable after refactoring: react-native/no-color-literals: error
# Jest
jest/no-disabled-tests: warn
jest/no-focused-tests: error
jest/no-identical-title: error
# Flow
flowtype/boolean-style: [error, boolean]
flowtype/define-flow-type: warn
flowtype/delimiter-dangle: off
flowtype/generic-spacing: [error, never]
flowtype/no-primitive-constructor-types: error
flowtype/no-types-missing-file-annotation: error
################# flowtype/no-weak-types: error
flowtype/object-type-delimiter: [error, comma]
# flowtype/require-parameter-type: error
# flowtype/require-return-type: [error, always, {annotateUndefined: never}]
flowtype/require-valid-file-annotation: error
flowtype/semi: [error, always]
flowtype/space-after-type-colon: [error, always]
flowtype/space-before-generic-bracket: [error, never]
flowtype/space-before-type-colon: [error, never]
flowtype/type-id-match: [error, '^([A-Z][a-z0-9]+)+$']
flowtype/union-intersection-spacing: [error, always]
flowtype/use-flow-type: warn
flowtype/valid-syntax: warn
spellcheck/spell-checker:
- warn
- comments: true
strings: true
identifiers: true
lang: en_US
skipIfMatch:
- 'http://[^s]*'
- '^[-\w]+/[-\w\.]+$' # for MIME types
skipWords: [redux, Zulip, uri, timestamp, api, nav, init, auth, prev, utils, io,
http, https, msg, msg1, msg2, gif, img, abc, def, jkl, xyz, fn, params, backends,
dev, www, johndoe, janedoe, func, num, popup, codehilite, autocomplete, rgba,
rehydrate, rehydrated, async, whitelist, str, del, subheader, concat, streamlist,
scrollable, eslint, lastword, renderer, html, dom, tbody, thead, th, td, href,
pre, blockquote, li, br, emojis, chatboxes, userlist, middleware, trunc, pushable,
ios, md, caughtup, autocompleted, substring, png, ds, videocam, unmount, github,
facebook, idx, aaa, bbb, ccc, ddd, eee, fff, abcd, aaaaaa, ffffff, 24cac2, src,
attribs, charset, utf, urlencoded, htmlparser, htmlparser2, ul, ol, chatbubbles,
nonexisting, primarytext, autocomple, stringify, backend, Zoe, Menlo, ok, py,
todo, Mc, lodash, selectable, isequal, lightgray, tc, zulipchat, prepend, pierre,
allen, jan, donald, jane, unicode, joe, unescape, dan, abramov, lang, bool,
ionicons, truthy, bezier, decrement, js, oauth, jsonp, otp, Otp, ascii, Ascii,
substr, Util, actionsheet, unmute, mfrac, otp, Otp, ascii, Ascii, substr, Util,
actionsheet, jsonp, actionsheet, ionicons, denmark, copenhagen, unregister,
gcm, unstarMessage, Unstar, wildcard_mentioned, lightbox, resize, remobile, tz,
multiline, uniqby, zoe, localizable, appid, apns, Entypo, msup, mrow, webview,
js, timerow, reselect, addons, cancelable, gravatar_hash, pms, msgs, collapsable,
const, wildcard, reactotron, camelcase, hydrator, perf, stacktrace, Dir, fs,
avoider, octicons, centerer, ldap, gravatar, identicon, blueimp, filename, wildcards,
jpeg, jpg, tif, mov, notif, diag, bmp, viewport, scalable, polyfill, rect, touchstart,
touchend, touchmove, remoteuser, sso]