forked from zulip/zulip-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.yaml
122 lines (113 loc) · 4.62 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
parser: babel-eslint
plugins:
- react-native
- jest
- flowtype
- spellcheck
env:
browser: true
mocha: true
node: true
jest: true
globals: {}
extends:
- airbnb
- plugin:jest/recommended
- ./tools/formatting.eslintrc.yaml
settings:
import/resolver:
node:
extensions: [.js, .ios.js, .android.js]
rules:
# Formatting and naming
camelcase: off
# Disable a bunch of rules that should be taken care of by prettier.
arrow-parens: off
comma-dangle: off
function-paren-newline: off
indent: off
max-len: off
no-mixed-operators: off
object-curly-newline: off
quote-props: off
# For more formatting rules, see tools/formatting.eslintrc.yaml.
# Tricky code. We repeal several bans from the Airbnb style.
no-bitwise: off
no-confusing-arrow: off
no-continue: off
no-plusplus: off
no-nested-ternary: off
# Likely-wrong code
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-extraneous-dependencies:
- error
- devDependencies: ['**/__tests__/*.js', tools/**]
# React
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. This plugin isn't included in the airbnb config, and
# nothing is enabled by default, so we enable its rules.
react-native/no-unused-styles: error
react-native/split-platform-components: error
react-native/no-inline-styles: error
# react-native/no-color-literals: error # TODO eliminate these and enable.
# 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, submessages, nbsp, args]