Commit Graph

13677 Commits

Author SHA1 Message Date
Maydha K c51d2c3d8f docs: Add user guide for signing out 2016-12-05 16:59:18 -08:00
Vamshi Balanaga f89e732d9e integrations: Add webhook code, API endpoint, and tests for mention. 2016-12-05 16:46:32 -08:00
sidhant bhavnani 4634c3d656 Change call signature for users_subscribed_to_stream()
The function users_subscribed_to_stream() now takes realm now, instead of domain.
2016-12-05 15:46:19 -08:00
Tim Abbott fb3a6eead0 .eslintrc.json: Convert tabs to spaces. 2016-12-05 10:02:19 -08:00
Arpith Siromoney 6ae613c235 Eslint: Add additioanl rules, some for GCI.
This commit adds rules for GCI, turns on rules that do not error
on our codebase, and changes frontend_tests/.eslintrc.json's no-sync
rule to off (as per AirBnB's style guide).

Rules for GCI:
no-restricted-syntax, no-nested-ternary, spaced-comment,
space-infix-ops, newline-per-chained-call, padded-blocks,
no-whitespace-before-property, space-in-parens

Rules that do not error:
no-useless-constructor, no-dupe-class-members, no-duplicate-imports,
no-iterator, no-undef, dot-notation, no-case-declarations, no-unneeded-ternary,
eol-last,

Finally, eqeqeq is changed from 2 to ['error', 'allow-null'], going
from jslint defaults to airbnb's recommendation (there were no errors)
2016-12-05 10:01:56 -08:00
lonerz dc6849952b eslint: change space-before-function-paren from warning to error.
Also fix violations.
2016-12-05 09:50:37 -08:00
Cynthia Lin f354892ba4 docs: Add user guide for *Create a stream* 2016-12-05 05:48:13 -08:00
lonerz a8b39e6c0f Switch yoda eslint rule from warning to error (in .eslintrc) 2016-12-04 19:48:10 -08:00
lonerz 025fe9980b Switch no-empty eslint rule from warning to error (in .eslintrc) 2016-12-05 01:35:14 +00:00
bulat22101 9f68efa47b mypy: Convert zerver/tests/ to use typing.Text. 2016-12-04 14:47:21 -08:00
Jianchun1 88e2ff3e1c docs: Add chinese translation style guide. 2016-12-04 14:36:04 -08:00
Noel Tautges 07a74a8d9c mypy: Convert zerver/views/webhooks/ to use typing.Text. 2016-12-04 11:45:46 -06:00
Arpith Siromoney cfa2987d27 Eslint: add rules that do not error 2016-12-04 08:34:59 -08:00
Tim Abbott 15bfedec99 travis: Improve debuggability of server wget failures.
The main improvement here is causing `wget` errors to be ignored so
that we see the server logs in the event of a `wget` failure.
2016-12-03 20:48:57 -08:00
Cynthia Lin dd62123d4b docs: Add user guide for *Format Your Messages*. 2016-12-03 20:44:01 -08:00
AZtheAsian 441743cb89 integrations: Add webhook code, API endpoint, and tests for stripe.
This integration still needs documentation.
2016-12-03 20:42:43 -08:00
Rafid Aslam 0290aeb6ab lint: Fix several no-unused-vars eslint rule violations.
These changes were extracted by tabbott from the original commit
to merge now because they have been reviewed as safe.
2016-12-03 18:43:47 -08:00
Rafid Aslam 426cb13e23 Remove `enforce_arity` function from util.js.
Remove `enforce_arity` function from util.js, because it is
not used anymore.
2016-12-03 18:43:46 -08:00
anirudhjain75 3b891ef080 integrations: Add webhook payloads for mention. 2016-12-03 18:04:22 -08:00
Tim Abbott abc581898f eslint: Add components.js module to globals list. 2016-12-03 18:02:47 -08:00
Tim Abbott d5dd7a27d5 Remove tools/deprecated/inject-messages. 2016-12-03 16:58:17 -08:00
Tim Abbott 1a161c6e33 eslint: Fix comma-dangle rules in JS support files.
This was done via eslint --fix.
2016-12-03 15:00:24 -08:00
Tim Abbott 2447f4a5b4 eslint: Update most casper tests to use new comma-dangle rules.
* In most cases, eslint --fix with the right comma-dangle settings was
  able to update the code correctly.

* The exceptions were cases where the parser incorrectly treated the
arguments to functions as lists/objects and added commas; these are
detectable with linters, and we fixed manually.  Since this is test
code, we can be reasonably confident that just fixing the failures
suffices to correct any bugs introduced by making changes
automatically.
2016-12-03 15:00:24 -08:00
Tim Abbott 459421d045 eslint: Update node tests to use new comma-dangle rules.
* In most cases, eslint --fix with the right comma-dangle settings was
  able to update the code correctly.

* The exceptions were cases where the parser incorrectly treated the
  arguments to functions like `assert_equal` as arguments; we fixed
  these manually.  Since this is test code, we can be reasonably
  confident that just fixing the failures suffices to correct any bugs
  introduced by making changes automatically.
2016-12-03 15:00:24 -08:00
Joy Chen 77938f6247 mypy: Annotate *bots/githook-post-receive* 2016-12-03 15:58:22 -06:00
Joy Chen 97a9fea89d delete check_output backport: Python 2.6 no longer supported 2016-12-03 15:57:20 -06:00
Reid Barton ecfa397567 Fix several type annotations for mypy 0.4.6 compatibility.
A few functions had arguments removed without having their type
annotations updated accordingly. As a result mypy version 0.4.6
thinks that the first type in the annotation is supposed to be
the type of `self`, a new mypy feature which we are not intending
to use here.
2016-12-03 13:45:52 -08:00
nikolay abc2ff4a06 pep8: Fix many rule E128 violations.
[Tweaked by tabbott to adjust some approaches used in wrapping]
2016-12-03 13:33:31 -08:00
Jason Le 144d82305d mypy: Annotate puppet/zulip_ops. 2016-12-03 11:00:25 -08:00
bulat22101 a6f91064a2 pep8: Fix E129 violations 2016-12-03 10:56:36 -08:00
bulat22101 adebc75740 pep8: Fix E502 violations 2016-12-03 10:56:36 -08:00
Rafid Aslam e6fa4bc2fd tests: Change doc file in run-casper 'Tips for debugging'.
Change `docs/testing.rst` to `docs/testing-with-casper.md` in
'Tips for debugging' because there is no `testing.rst` file, and
remote debugging description is placed in `testing-with-casper.md`.
2016-12-03 10:45:44 -08:00
anirudhjain75 a697261e74 integrations: Add webhook payloads for papertrail. 2016-12-03 10:28:49 -08:00
Robert Hönig 5ba3e214da Add user guide for *Editing past messages*. 2016-12-03 14:20:06 +00:00
Bickio 7bf3ac7e90 integrations: Add webhook payloads for Stripe. 2016-12-02 20:05:37 -08:00
Tim Abbott 8259adaba5 lint: Add custom lint check for console.log statements.
This was previously checked for by jslint, and eslint doesn't seem to
have a nice exclude rule for it.
2016-12-02 20:05:18 -08:00
kevv87 1fb9220354 lint: Remove old jslint linter.
Now that we're using eslint, jslint is no longer required.
2016-12-02 18:49:42 -08:00
Tim Abbott 2c940b93ab js: Fix some minor whitespace issues. 2016-12-02 18:39:30 -08:00
AZtheAsian 5e9918135b eslint: change quote-props from off to error and fix violations. 2016-12-02 18:35:53 -08:00
Juan Verhook 1923045ca6 Annotate api/zulip/__init__.py.
Note that we still can't run mypy against this file and other files,
because of how the interface is dynamically created via _register.  We
will need to change that or use a stub file to make it possible to
annotate this.

This was tweaked by tabbott to fix some bugs.
2016-12-02 18:26:47 -08:00
Krzysztof Zbudniewek b8fc3f0e65 eslint: change space-before-blocks from warning to error and fix violations 2016-12-02 17:40:09 -08:00
Arpith Siromoney 4491ea8d6b reactions: Add support for removing emoji reactions.
This commit adds support for removing reactions via DELETE requests to
the /reactions endpoint with parameters emoji_name and message_id.

The reaction is deleted from the database and a reaction event is sent
out with 'op' set to 'remove'.

Tests are added to check:
1. Removing a reaction that does not exist fails
2. When removing a reaction, the event payload and users are correct
2016-12-02 16:39:53 -08:00
Sidhant Bhavnani 8c0c12c1d9 pep8: Fix E303 violations. 2016-12-02 15:34:11 -08:00
Brock Whittaker 9f0383520c settings: Fix Zulip Labs Spacing Issue.
This fixes the spacing issue with Zulip Labs not having a space between
the icon.
2016-12-02 14:49:05 -08:00
AZtheAsian 9c0ebc7359 eslint: change no-else-return to error and fix violations 2016-12-02 14:43:09 -08:00
Brock Whittaker d8636980ae settings: Convert bot and alert word settings to use new buttons. 2016-12-02 13:03:43 -08:00
Tim Abbott d184288e00 css: Add box-shadow and bg-white components. 2016-12-02 13:03:43 -08:00
Tim Abbott 6e86515b15 css: Move display-none and inline-block to components.css. 2016-12-02 13:03:43 -08:00
Tim Abbott a7681c3c2f css: Move .light to components.css. 2016-12-02 13:03:43 -08:00
Tim Abbott b61d6bc251 settings: Use new checkboxes and buttons in display settings. 2016-12-02 13:03:40 -08:00