2016-11-04 23:15:18 +01:00
|
|
|
{
|
|
|
|
"env": {
|
2017-05-25 01:44:58 +02:00
|
|
|
"node": true,
|
|
|
|
"es6": true
|
|
|
|
},
|
|
|
|
"parserOptions": {
|
|
|
|
"sourceType": "module"
|
2016-11-04 23:15:18 +01:00
|
|
|
},
|
|
|
|
"globals": {
|
|
|
|
"$": false,
|
2018-08-03 19:17:46 +02:00
|
|
|
"ClipboardJS": false,
|
|
|
|
"Dict": false,
|
|
|
|
"FetchStatus": false,
|
|
|
|
"Filter": false,
|
2016-11-29 17:59:32 +01:00
|
|
|
"Handlebars": false,
|
2018-08-03 19:17:46 +02:00
|
|
|
"LightboxCanvas": false,
|
|
|
|
"MessageListData": false,
|
|
|
|
"MessageListView": false,
|
|
|
|
"PerfectScrollbar": false,
|
|
|
|
"Plotly": false,
|
2016-11-29 17:59:32 +01:00
|
|
|
"SockJS": false,
|
2018-08-03 19:17:46 +02:00
|
|
|
"Socket": false,
|
|
|
|
"Sortable": false,
|
|
|
|
"WinChan": false,
|
|
|
|
"XDate": false,
|
|
|
|
"_": false,
|
|
|
|
"activity": false,
|
|
|
|
"admin": false,
|
|
|
|
"admin_sections": false,
|
|
|
|
"alert_words": false,
|
|
|
|
"alert_words_ui": false,
|
|
|
|
"attachments_ui": false,
|
|
|
|
"avatar": false,
|
|
|
|
"blueslip": false,
|
|
|
|
"bot_data": false,
|
|
|
|
"bridge": false,
|
|
|
|
"buddy_data": false,
|
|
|
|
"buddy_list": false,
|
|
|
|
"channel": false,
|
|
|
|
"click_handlers": false,
|
|
|
|
"colorspace": false,
|
|
|
|
"common": false,
|
|
|
|
"components": false,
|
|
|
|
"compose": false,
|
|
|
|
"compose_actions": false,
|
|
|
|
"compose_fade": false,
|
|
|
|
"compose_pm_pill": false,
|
|
|
|
"compose_state": false,
|
|
|
|
"compose_ui": false,
|
|
|
|
"composebox_typeahead": false,
|
|
|
|
"condense": false,
|
|
|
|
"copy_and_paste": false,
|
|
|
|
"csrf_token": false,
|
|
|
|
"current_msg_list": true,
|
|
|
|
"drafts": false,
|
|
|
|
"echo": false,
|
|
|
|
"emoji": false,
|
|
|
|
"emoji_codes": false,
|
|
|
|
"emoji_picker": false,
|
|
|
|
"favicon": false,
|
|
|
|
"feature_flags": false,
|
|
|
|
"fenced_code": false,
|
|
|
|
"flatpickr": false,
|
|
|
|
"floating_recipient_bar": false,
|
|
|
|
"gear_menu": false,
|
|
|
|
"hash_util": false,
|
|
|
|
"hashchange": false,
|
|
|
|
"home_msg_list": false,
|
|
|
|
"hotspots": false,
|
|
|
|
"i18n": false,
|
|
|
|
"info_overlay": false,
|
|
|
|
"input_pill": false,
|
|
|
|
"invite": false,
|
|
|
|
"jQuery": false,
|
|
|
|
"katex": false,
|
|
|
|
"keydown_util": false,
|
|
|
|
"lightbox": false,
|
|
|
|
"list_cursor": false,
|
|
|
|
"list_render": false,
|
|
|
|
"list_util": false,
|
|
|
|
"loading": false,
|
|
|
|
"localStorage": false,
|
|
|
|
"local_message": false,
|
|
|
|
"localstorage": false,
|
|
|
|
"markdown": false,
|
2016-11-29 17:59:32 +01:00
|
|
|
"marked": false,
|
2017-11-03 17:25:47 +01:00
|
|
|
"md5": false,
|
2018-08-03 19:17:46 +02:00
|
|
|
"message_edit": false,
|
|
|
|
"message_events": false,
|
|
|
|
"message_fetch": false,
|
|
|
|
"message_flags": false,
|
|
|
|
"message_list": false,
|
|
|
|
"message_live_update": false,
|
|
|
|
"message_scroll": false,
|
|
|
|
"message_store": false,
|
|
|
|
"message_util": false,
|
|
|
|
"message_viewport": false,
|
2017-04-02 00:07:03 +02:00
|
|
|
"moment": false,
|
2018-08-03 19:17:46 +02:00
|
|
|
"muting": false,
|
|
|
|
"muting_ui": false,
|
|
|
|
"narrow": false,
|
|
|
|
"narrow_state": false,
|
|
|
|
"navigate": false,
|
|
|
|
"night_mode": false,
|
|
|
|
"notifications": false,
|
|
|
|
"overlays": false,
|
|
|
|
"padded_widget": false,
|
2016-11-29 17:59:32 +01:00
|
|
|
"page_params": false,
|
2018-08-03 19:17:46 +02:00
|
|
|
"panels": false,
|
|
|
|
"people": false,
|
|
|
|
"pm_conversations": false,
|
|
|
|
"pm_list": false,
|
|
|
|
"pointer": false,
|
2016-11-29 17:59:32 +01:00
|
|
|
"popovers": false,
|
2018-08-03 19:17:46 +02:00
|
|
|
"presence": false,
|
|
|
|
"pygments_data": false,
|
|
|
|
"reactions": false,
|
|
|
|
"realm_icon": false,
|
|
|
|
"recent_senders": false,
|
|
|
|
"reload": false,
|
2018-08-04 15:40:25 +02:00
|
|
|
"reload_state": false,
|
2018-08-03 19:17:46 +02:00
|
|
|
"reminder": false,
|
|
|
|
"resize": false,
|
|
|
|
"rows": false,
|
|
|
|
"rtl": false,
|
|
|
|
"run_test": false,
|
|
|
|
"schema": false,
|
|
|
|
"scroll_bar": false,
|
|
|
|
"scroll_util": false,
|
|
|
|
"search": false,
|
|
|
|
"search_pill": false,
|
|
|
|
"search_pill_widget": false,
|
|
|
|
"search_suggestion": false,
|
|
|
|
"search_util": false,
|
|
|
|
"sent_messages": false,
|
2016-11-29 17:59:32 +01:00
|
|
|
"server_events": false,
|
2017-05-31 08:53:09 +02:00
|
|
|
"server_events_dispatch": false,
|
2018-08-03 19:17:46 +02:00
|
|
|
"settings": false,
|
2017-04-06 02:28:57 +02:00
|
|
|
"settings_account": false,
|
2017-04-06 22:47:27 +02:00
|
|
|
"settings_bots": false,
|
2018-08-03 19:17:46 +02:00
|
|
|
"settings_display": false,
|
2017-04-08 17:24:07 +02:00
|
|
|
"settings_emoji": false,
|
2017-04-08 23:24:03 +02:00
|
|
|
"settings_filters": false,
|
2017-10-21 03:15:12 +02:00
|
|
|
"settings_invites": false,
|
2018-08-03 19:17:46 +02:00
|
|
|
"settings_muting": false,
|
|
|
|
"settings_notifications": false,
|
|
|
|
"settings_org": false,
|
|
|
|
"settings_panel_menu": false,
|
2017-12-14 05:51:45 +01:00
|
|
|
"settings_profile_fields": false,
|
2018-08-03 19:17:46 +02:00
|
|
|
"settings_sections": false,
|
|
|
|
"settings_streams": false,
|
|
|
|
"settings_toggle": false,
|
|
|
|
"settings_ui": false,
|
|
|
|
"settings_user_groups": false,
|
|
|
|
"settings_users": false,
|
|
|
|
"stream_color": false,
|
2017-04-22 22:22:25 +02:00
|
|
|
"stream_create": false,
|
2018-08-03 19:17:46 +02:00
|
|
|
"stream_data": false,
|
2017-04-24 04:11:25 +02:00
|
|
|
"stream_edit": false,
|
2017-03-19 16:03:07 +01:00
|
|
|
"stream_events": false,
|
2016-11-29 17:59:32 +01:00
|
|
|
"stream_list": false,
|
2018-08-03 19:17:46 +02:00
|
|
|
"stream_muting": false,
|
2017-03-05 17:28:40 +01:00
|
|
|
"stream_popover": false,
|
2018-08-03 19:17:46 +02:00
|
|
|
"stream_sort": false,
|
|
|
|
"submessage": false,
|
|
|
|
"subs": false,
|
2016-11-29 17:59:32 +01:00
|
|
|
"tab_bar": false,
|
|
|
|
"templates": false,
|
2018-08-03 19:17:46 +02:00
|
|
|
"tictactoe_widget": false,
|
|
|
|
"timerender": false,
|
|
|
|
"toMarkdown": false,
|
|
|
|
"todo_widget": false,
|
|
|
|
"top_left_corner": false,
|
|
|
|
"topic_data": false,
|
|
|
|
"topic_generator": false,
|
|
|
|
"topic_list": false,
|
|
|
|
"transmit": false,
|
|
|
|
"tutorial": false,
|
|
|
|
"typeahead_helper": false,
|
|
|
|
"typing": false,
|
|
|
|
"typing_data": false,
|
|
|
|
"typing_events": false,
|
|
|
|
"typing_status": false,
|
|
|
|
"ui": false,
|
|
|
|
"ui_report": false,
|
|
|
|
"ui_util": false,
|
|
|
|
"unread": false,
|
2017-03-18 01:41:56 +01:00
|
|
|
"unread_ops": false,
|
2018-08-03 19:17:46 +02:00
|
|
|
"unread_ui": false,
|
2017-11-23 15:00:05 +01:00
|
|
|
"upload": false,
|
2018-08-03 19:17:46 +02:00
|
|
|
"upload_widget": false,
|
2017-01-21 16:49:27 +01:00
|
|
|
"user_events": false,
|
2018-08-03 19:17:46 +02:00
|
|
|
"user_groups": false,
|
|
|
|
"user_pill": false,
|
|
|
|
"user_search": false,
|
|
|
|
"util": false,
|
2018-02-23 15:54:07 +01:00
|
|
|
"voting_widget": false,
|
2018-02-23 16:20:33 +01:00
|
|
|
"widgetize": false,
|
2018-08-03 19:17:46 +02:00
|
|
|
"zcommand": false,
|
|
|
|
"zform": false,
|
|
|
|
"zxcvbn": false
|
2016-11-04 23:15:18 +01:00
|
|
|
},
|
2018-03-13 13:04:16 +01:00
|
|
|
"plugins": [
|
|
|
|
"eslint-plugin-empty-returns"
|
|
|
|
],
|
2016-11-04 23:15:18 +01:00
|
|
|
"rules": {
|
2016-12-05 07:53:36 +01:00
|
|
|
"array-callback-return": "error",
|
2017-10-06 21:43:12 +02:00
|
|
|
"array-bracket-spacing": "error",
|
2017-06-05 09:01:02 +02:00
|
|
|
"arrow-spacing": [ "error", { "before": true, "after": true } ],
|
|
|
|
"block-scoped-var": 2,
|
|
|
|
"brace-style": [ "error", "1tbs", { "allowSingleLine": true } ],
|
|
|
|
"camelcase": 0,
|
|
|
|
"comma-dangle": [ "error",
|
|
|
|
{
|
|
|
|
"arrays": "always-multiline",
|
|
|
|
"objects": "always-multiline",
|
|
|
|
"imports": "always-multiline",
|
|
|
|
"exports": "always-multiline",
|
|
|
|
"functions": "never"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"complexity": [ 0, 4 ],
|
|
|
|
"curly": 2,
|
|
|
|
"dot-notation": [ "error", { "allowKeywords": true } ],
|
2018-03-13 13:04:16 +01:00
|
|
|
"empty-returns/main": "error",
|
2017-06-05 09:01:02 +02:00
|
|
|
"eol-last": [ "error", "always" ],
|
2017-09-28 19:47:08 +02:00
|
|
|
"eqeqeq": 2,
|
2017-06-05 09:01:02 +02:00
|
|
|
"func-style": [ "off", "expression" ],
|
|
|
|
"guard-for-in": 2,
|
2018-04-06 20:43:18 +02:00
|
|
|
"indent": ["error", 4, {
|
|
|
|
"ArrayExpression": "first",
|
|
|
|
"outerIIFEBody": 0,
|
|
|
|
"ObjectExpression": "first",
|
|
|
|
"SwitchCase": 0,
|
|
|
|
"CallExpression": {"arguments": "first"},
|
|
|
|
"FunctionExpression": {"parameters": "first"},
|
|
|
|
"FunctionDeclaration": {"parameters": "first"}
|
|
|
|
}],
|
2017-06-05 09:01:02 +02:00
|
|
|
"keyword-spacing": [ "error",
|
|
|
|
{
|
|
|
|
"before": true,
|
|
|
|
"after": true,
|
|
|
|
"overrides": {
|
|
|
|
"return": { "after": true },
|
|
|
|
"throw": { "after": true },
|
|
|
|
"case": { "after": true }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"max-depth": [ 0, 4 ],
|
|
|
|
"max-len": [ "error", 100, 2,
|
|
|
|
{
|
|
|
|
"ignoreUrls": true,
|
|
|
|
"ignoreComments": false,
|
|
|
|
"ignoreRegExpLiterals": true,
|
|
|
|
"ignoreStrings": true,
|
|
|
|
"ignoreTemplateLiterals": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"max-params": [ 0, 3 ],
|
|
|
|
"max-statements": [ 0, 10 ],
|
|
|
|
"new-cap": [ "error",
|
|
|
|
{
|
|
|
|
"newIsCap": true,
|
|
|
|
"capIsNew": false
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"new-parens": 2,
|
|
|
|
"newline-per-chained-call": 0,
|
2016-11-04 23:15:18 +01:00
|
|
|
"no-alert": 2,
|
2017-06-05 09:01:02 +02:00
|
|
|
"no-array-constructor": "error",
|
2016-11-04 23:15:18 +01:00
|
|
|
"no-bitwise": 2,
|
2017-06-05 09:01:02 +02:00
|
|
|
"no-caller": 2,
|
|
|
|
"no-case-declarations": "error",
|
2016-11-04 23:15:18 +01:00
|
|
|
"no-catch-shadow": 2,
|
2017-02-02 01:21:12 +01:00
|
|
|
"no-console": 0,
|
2017-06-05 09:01:02 +02:00
|
|
|
"no-const-assign": "error",
|
2016-11-04 23:15:18 +01:00
|
|
|
"no-control-regex": 2,
|
|
|
|
"no-debugger": 2,
|
2017-06-05 09:01:02 +02:00
|
|
|
"no-delete-var": 2,
|
2016-11-04 23:15:18 +01:00
|
|
|
"no-div-regex": 2,
|
2017-06-05 09:01:02 +02:00
|
|
|
"no-dupe-class-members": "error",
|
2016-11-04 23:15:18 +01:00
|
|
|
"no-dupe-keys": 2,
|
2017-06-05 09:01:02 +02:00
|
|
|
"no-duplicate-imports": "error",
|
2016-12-02 21:34:35 +01:00
|
|
|
"no-else-return": 2,
|
2016-12-05 02:35:14 +01:00
|
|
|
"no-empty": 2,
|
2016-11-29 17:59:32 +01:00
|
|
|
"no-empty-character-class": 2,
|
2016-11-04 23:15:18 +01:00
|
|
|
"no-eq-null": 2,
|
|
|
|
"no-eval": 2,
|
|
|
|
"no-ex-assign": 2,
|
2018-06-06 18:50:09 +02:00
|
|
|
"no-extra-parens": ["error", "all"],
|
2016-11-04 23:15:18 +01:00
|
|
|
"no-extra-semi": 2,
|
2017-06-05 09:01:02 +02:00
|
|
|
"no-fallthrough": 2,
|
2016-11-04 23:15:18 +01:00
|
|
|
"no-floating-decimal": 2,
|
2017-06-05 09:01:02 +02:00
|
|
|
"no-func-assign": 2,
|
2016-11-04 23:15:18 +01:00
|
|
|
"no-implied-eval": 2,
|
2017-06-05 09:01:02 +02:00
|
|
|
"no-iterator": "error",
|
|
|
|
"no-label-var": 2,
|
|
|
|
"no-labels": 2,
|
|
|
|
"no-loop-func": 2,
|
|
|
|
"no-mixed-requires": [ 0, false ],
|
2016-11-04 23:15:18 +01:00
|
|
|
"no-multi-str": 2,
|
|
|
|
"no-native-reassign": 2,
|
2017-06-05 09:01:02 +02:00
|
|
|
"no-nested-ternary": 0,
|
|
|
|
"no-new-func": "error",
|
|
|
|
"no-new-object": 2,
|
|
|
|
"no-new-wrappers": 2,
|
|
|
|
"no-obj-calls": 2,
|
|
|
|
"no-octal": 2,
|
|
|
|
"no-octal-escape": 2,
|
|
|
|
"no-param-reassign": 0,
|
2016-11-30 19:05:04 +01:00
|
|
|
"no-plusplus": 2,
|
2017-06-05 09:01:02 +02:00
|
|
|
"no-proto": 2,
|
|
|
|
"no-redeclare": 2,
|
|
|
|
"no-regex-spaces": 2,
|
|
|
|
"no-restricted-syntax": 0,
|
2016-11-04 23:15:18 +01:00
|
|
|
"no-return-assign": 2,
|
2017-06-05 09:01:02 +02:00
|
|
|
"no-script-url": 2,
|
2016-11-04 23:15:18 +01:00
|
|
|
"no-self-compare": 2,
|
2017-06-05 09:01:02 +02:00
|
|
|
"no-shadow": 0,
|
2016-11-04 23:15:18 +01:00
|
|
|
"no-sync": 2,
|
2017-06-05 09:01:02 +02:00
|
|
|
"no-ternary": 0,
|
2018-06-06 18:31:54 +02:00
|
|
|
"no-trailing-spaces": 2,
|
2017-06-05 09:01:02 +02:00
|
|
|
"no-undef": "error",
|
|
|
|
"no-undef-init": 2,
|
2017-02-02 01:21:12 +01:00
|
|
|
"no-underscore-dangle": 0,
|
2017-06-05 09:01:02 +02:00
|
|
|
"no-unneeded-ternary": [ "error", { "defaultAssignment": false } ],
|
|
|
|
"no-unreachable": 2,
|
|
|
|
"no-unused-expressions": 2,
|
|
|
|
"no-unused-vars": [ "error",
|
|
|
|
{
|
|
|
|
"vars": "local",
|
|
|
|
"args": "after-used",
|
|
|
|
"varsIgnorePattern": "print_elapsed_time|check_duplicate_ids"
|
|
|
|
}
|
|
|
|
],
|
2016-11-04 23:15:18 +01:00
|
|
|
"no-use-before-define": 2,
|
2017-06-05 09:01:02 +02:00
|
|
|
"no-useless-constructor": "error",
|
|
|
|
// The Zulip codebase complies partially with the "no-useless-escape"
|
|
|
|
// rule; only regex expressions haven't been updated yet.
|
|
|
|
// Updated regex expressions are currently being tested in casper
|
|
|
|
// files and will decide about a potential future enforcement of this rule.
|
|
|
|
"no-useless-escape": 0,
|
2018-06-04 21:09:11 +02:00
|
|
|
"space-unary-ops": 2,
|
2018-05-31 08:55:18 +02:00
|
|
|
"no-whitespace-before-property": 2,
|
2017-06-05 09:01:02 +02:00
|
|
|
"no-with": 2,
|
|
|
|
"one-var": [ "error", "never" ],
|
|
|
|
"padded-blocks": 0,
|
|
|
|
"prefer-const": [ "error",
|
|
|
|
{
|
|
|
|
"destructuring": "any",
|
|
|
|
"ignoreReadBeforeAssign": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"quote-props": [ "error", "as-needed",
|
|
|
|
{
|
|
|
|
"keywords": false,
|
|
|
|
"unnecessary": true,
|
|
|
|
"numbers": false
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"quotes": [ 0, "single" ],
|
2016-11-27 10:01:39 +01:00
|
|
|
"radix": 2,
|
2016-11-04 23:15:18 +01:00
|
|
|
"semi": 2,
|
2016-12-02 23:45:20 +01:00
|
|
|
"space-before-blocks": 2,
|
2017-06-05 09:01:02 +02:00
|
|
|
"space-before-function-paren": [ "error",
|
|
|
|
{
|
|
|
|
"anonymous": "always",
|
|
|
|
"named": "never",
|
|
|
|
"asyncArrow": "always"
|
|
|
|
}
|
|
|
|
],
|
2017-10-06 21:36:39 +02:00
|
|
|
"space-in-parens": 2,
|
2018-06-04 21:13:07 +02:00
|
|
|
"space-infix-ops": 2,
|
2017-06-05 09:01:02 +02:00
|
|
|
"spaced-comment": 0,
|
2017-02-02 01:21:12 +01:00
|
|
|
"strict": 0,
|
2017-06-05 09:01:02 +02:00
|
|
|
"template-curly-spacing": "error",
|
2016-11-04 23:15:18 +01:00
|
|
|
"unnecessary-strict": 0,
|
|
|
|
"use-isnan": 2,
|
2017-06-05 09:01:02 +02:00
|
|
|
"valid-typeof": [ "error", { "requireStringLiterals": true } ],
|
|
|
|
"wrap-iife": [ "error", "outside", { "functionPrototypeMethods": false } ],
|
2016-11-04 23:15:18 +01:00
|
|
|
"wrap-regex": 0,
|
2016-12-05 03:39:24 +01:00
|
|
|
"yoda": 2
|
2016-11-04 23:15:18 +01:00
|
|
|
}
|
|
|
|
}
|