Commit Graph

35 Commits

Author SHA1 Message Date
Tim Abbott 0ac78cb14d code-style: Simplify discussion of third-party code. 2017-10-06 13:28:45 -07:00
Tim Abbott a632c8471d code-style: Improve state and logs discussion. 2017-10-06 13:26:13 -07:00
Tim Abbott e660faa225 docs: Remove code style section on jQuery global state.
I don't think anyone has tried to do this for a long time, since the
channel module makes it pretty clear how to do an ajax call.
2017-10-06 13:24:26 -07:00
Tim Abbott 0054fa17f1 docs: Simplify javascript var discussion.
We don't need as much as before, since it's enforced by the linter.
2017-10-06 13:24:06 -07:00
derAnfaenger 7ff697d053 linter: Add rule against using `pk` instead of `id`.
There's one exception here, for model._meta.pk.  To support this
nicely, we added this exclude-pattern feature.
2017-10-06 12:56:26 -07:00
derAnfaenger 64b8930225 linter: Add rules against improper shebangs. 2017-10-06 12:46:19 -07:00
derAnfaenger 71159fe19a code style guide: Remove obsolete space-around-bracket rule.
For .py files, our pep8 linter enforces this rule.
For .js files, eslint enforces this rule.
2017-10-06 12:46:12 -07:00
derAnfaenger c022b7a8fa linter: Add rule against using the `style` attribute.
This has a ton of exclude rules, for two reasons:

(1) We haven't been particularly systematic about avoiding unnecessary
inline style in the past, so there's a lot of code we need to fix.

(2) There are cases where one wants to dynamically compute style
rules. For the latter category, ideally we'd figure out a way to
exclude these automatically (e.g. checking for mustache tags in the
style tag).
2017-10-06 08:33:10 -07:00
derAnfaenger 2cdde8b168 linter: Add rule against verbose $(document).ready() calls. 2017-10-05 10:11:34 -07:00
derAnfaenger 6b99022a02 linter: Add rule against using inline event handlers. 2017-10-05 10:08:40 -07:00
derAnfaenger c01981a65f linter: Extend no-space-before-bracket linting rule. 2017-10-05 10:05:27 -07:00
derAnfaenger c957d1857e code style guide: Update and remove outdated rules.
These are all enforced by our linters, and thus a source of clutter in
this code style guide.
2017-10-05 10:05:17 -07:00
Tim Abbott 8d4f084623 code-style: Remove discussion of absolute_import.
It's no longer accurate on Python 3.
2017-10-04 14:09:05 -07:00
Tim Abbott b7974fc9f8 docs: Delete useless/wrong content from JavaScript code style.
One of these isn't true (not requiring braces) and the rest are
already handled by our linters.
2017-10-04 13:59:38 -07:00
Tim Abbott a001b8aef3 docs: Remove unnecessary CSS section from code style.
This is already handled by our linter, so no need to repeat it here.
2017-10-04 13:58:50 -07:00
Tim Abbott 4230871503 docs: Update code style guide for Python. 2017-10-04 13:53:06 -07:00
neiljp (Neil Pilgrim) dbc8415fa5 docs: typos in code-style.md; zephyr -> zerver. 2017-10-04 13:52:31 -07:00
Vishnu Ks 2267f09813 docs: Change place to ask help from mailing list to chat.zulip.org. 2017-10-04 08:20:29 -07:00
Joshua Pan 64984f5bf4 Rename tools/lint-all to tools/lint.
Fixes #4574.
2017-04-21 14:57:47 -07:00
hackerkid 4c0a5cf7fb docs: Update code-style.md to reflect timezone import change. 2017-04-16 12:28:56 -07:00
Luis Saul Trinidad d8fad9587c code-style.md: Fix typo for selected_related().
This changes a mention to QuerySet's method `.select_related()` which was written as `.selected_related()`.
2017-04-03 06:43:19 -07:00
Tim Abbott 7a048133bf docs: Fix typo in link to translating docs. 2017-03-04 20:58:50 -08:00
Rishi Gupta 3348083017 docs: Add code style section about naive datetime objects. 2017-03-01 23:03:56 -08:00
Tim Abbott 1c73ddd4c6 docs: Advertise tagging strings for translation in a few places. 2017-02-28 20:41:40 -08:00
Jackson 013fab70ad Fix grammatical and spelling errors in Zulip/docs. 2017-01-16 20:16:12 -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
Anders Kaseorg 207cf6302b Always start python via shebang lines.
This is preparation for supporting using Python 3 in production.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2016-11-26 14:46:37 -08:00
Tim Abbott c970a87dfa code-style: Fix broken links to anti for-in styleguides.
These two pages were moved over the last few years.
2016-10-24 11:10:25 -07:00
Steve Howell cdd03dec4d Extract media queries to media.css.
Create `media.css` using media queries that had been at the bottom
of `zulip.css`, then update miscellaneous setttings/docs files.

I also add `.screen-medium-show` and `.screen-narrow-show` to
`media.css`, as they seem to be an important part of our
responsive design.

Fixes #1532.
2016-08-05 10:32:55 -07:00
Tim Abbott 2338421c6d lint: Add documentation lint check for JavaScript spelling. 2016-07-12 19:22:21 -07:00
Tim Abbott 1838cd4d8f docs: Split out version control guidelines. 2016-06-26 10:04:06 -07:00
Tim Abbott 89b5eaaa7d docs: Improve several headings. 2016-06-26 09:54:19 -07:00
Eklavya Sharma 14c4ff2d25 docs/code-style.md: Use ASCII spaces consistently.
At some places, '\xc2\xa0' was used instead of ' '.  This characters looks
identical, but can hamper searches and lint checks.
2016-06-17 11:33:41 -07:00
Taranjeet a45bde7822 Docs: Fix typos in docs. 2016-06-02 10:31:41 -07:00
Sumana Harihareswara 337155f280 Remove rST files to replace with Markdown.
Currently (https://github.com/rtfd/recommonmark/issues/3)
the recommonmark bridge (which allows Sphinx to read
Markdown) does not support tables, so the directory structure
doc is now a bulleted list instead of a set of tables.
2016-05-31 10:55:49 -07:00