When `git push -f` is used, the "base" commit of the github push event
is whatever was previously in that branch.
That commit is likely not part of the history of the new branch,
so using the "List commits" API will not allow to find it
as a starting point.
Instead, if the API did not force pagination, we’d get the entire
repository history!
Using the "Compare two commits" API instead lets GitHub’s server
figure out which commits reachable from the new branch
that were not before, which is exactly the set of commits we need
to be "part of a push".
So that their purposes are clearer and it's easier to differentiate
between generated content and files committed to the repository.
* Neutrino build: `build/` -> `.build/`
* Sphinx build: `_build/` -> `.build-docs/`
* Django collectstatic: `treeherder/static/` -> `.django-static/`
To remove the EOL buildbot entries and add Taskcluster equivalents.
The headings/separator have been removed since there aren't enough
entries of each type to warrant them.
For:
* generated directories such as `build/`
* filetypes that are supported by Prettier, but that we haven't yet
converted to its style (eg CSS, HTML, JSON, YAML)
These entries are not needed when running Prettier via ESLint, but
help prevent the "format on save" feature of IDE prettier plugins
from auto-formatting files when making unrelated changes to them.
As and when we use Prettier with more filetypes, these can be removed.
Since it's more reliable (and strict) at code formatting than ESLint.
We use it via an ESLint plugin, and so disable the style-related AirBnB
preset rules, leaving the AirBnB guide to handle only correctness and
best practices rules.
It's highly encouraged to use an IDE integration or Git commit hook
to run Prettier (or `yarn lint --fix`) automatically. See:
* https://prettier.io/docs/en/editors.html
* https://prettier.io/docs/en/precommit.html
We may consider enabling a git commit hook out of the box (using eg
Husky) in the future, however they have previously been known to
interfere with partial-staging workflows, so would need to test the
fixes they have made for them thoroughly first.
In future PRs we may also want to start formatting JSON/CSS/Markdown
using Prettier too.
Imports must now be grouped like so (with newlines between each):
```
// "external" modules
import _ from 'lodash';
import chalk from 'chalk';
// modules from a "parent" directory
import foo from '../foo';
import qux from '../../foo/qux';
// "sibling" modules from the same or a sibling's directory
import bar from './bar';
import baz from './bar/baz';
```
The `import/order` rule has auto-fix support, so any errors can be
resolved using `yarn lint --fix`.
See:
https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md
The `timers` module is a Node.js built-in, which webpack will polyfill
during the build. Using it adds `timers-browserify` to the bundle
unnecessarily, given that browsers natively support `setTimeout`:
https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout
(This import was presumably copied from a react-native code example.)
The Perfherder equivalent of #4262 since the changes there only
affected auto-generated HTML, but Perfherder still uses its own
custom HTML template (until the React conversion is finished).
Previously all pages were using the following meta tag:
```
<meta name="viewport" content="width=device-width,initial-scale=1">
```
On mobile devices this causes the viewport to be set at the device
screen width, which is likely to be very small. Most of Treeherder's
pages do not function well under 800-900 pixels, so this meant mobile
users had to enable the "Request desktop site" feature for them to
be usable.
With this change we now don't set a viewport meta tag at all, which
causes Firefox for Android to use a default viewport of 980 pixels
(and similar other mobile browsers). This will mean they see scroll
bars, however the UI will at least be usable.
See:
https://developer.mozilla.org/en-US/docs/Mozilla/Mobile/Viewport_meta_tag
Since the failuresbybug API changed to deliver all results with no pagination (and its
associated meta), the bug count needed to be changed to tableData.length from tableData.count