Граф коммитов

41 Коммитов

Автор SHA1 Сообщение Дата
renovate[bot] a404eb9b0a
Update dependency eslint-config-airbnb to v19 (#7330)
* Update dependency eslint-config-airbnb to v19

* bisect failure, use 18.1.0

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Joel Maher <joel.maher@gmail.com>
2022-08-11 15:47:47 -07:00
renovate[bot] 28e5ce438f
Update dependency eslint-config-prettier to v8 (#7064)
* Update dependency eslint-config-prettier to v8

* adjust .eslintrc.js file to comply with new config-prettier

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Joel Maher <joel.maher@gmail.com>
2022-08-11 13:37:14 -07:00
Joel Maher 0e3b38101d
upgrade eslint to latest (8.21.0) (#7506) 2022-08-11 08:45:21 -07:00
Valentin Rigal f2287eb752
Update to Webpack 5 (#7455)
* Update to webpack 5

* Update style-loader to ^3.3.0

* Update copy-webpack-plugin to 11.0.0

* Update css-loader & html-webpack-plugin

* Replace file-loader by a webpack asset

* Replace url-loader by a webpack asset

* Update code imports

* Update webpack config

* Drop process.env.NODE_ENV in eslintrc

* Move webpack related deps to devDependencies

* Suggestion: serve dev server via the webpack module
2022-06-08 15:27:41 +02:00
esanuandra a49e15df68
Fix conflict, add pollyjs dependecies (#7084)
Bug 1698835 - Add puppeteer adapter, add sample test for graphs view

Bug 1698835 - Update sample test with puppeteer

Bug 1698835 - Fix UnhandledPromiseRejectionWarning

Bug 1698835 - Configure jest-puppeteer

Bug 1698835 - Separate integration tests from unit tests

Bug 1698835 - Update yarn.lock

Bug 1698835 - Fix lint errors

Bug 1698835 - Update yarn.lock

Bug 1698835 - Add @neutrinojs/jest to dependencies

Bug 1698835 - Update yarn.lock

Bug 1698835 - Address pr requests, move recordings folder

Bug 1698835 - Fix chromium error

Bug 1698835 - Clean up and update recordings

Bug 1698835 - Add documentation

Bug 1698835 - Update docs
2021-05-31 15:12:57 +03:00
renovate[bot] 7dd2f32f83
Lock file maintenance (#6854)
* Lock file maintenance
* upgrade eslint-plugin-import to remove infinity symbol lint error and disable import/extensions rule
* upgrade neutrinojs
* add resolution for cacache since neutrino and webpack rely on an outdated version
that uses ssri v<8.0.1 which has an important security patch

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Sarah Clements <sclements313@gmail.com>
2021-04-02 18:23:41 -07:00
Bola Ahmed Buari 1fb930b3e6
Bug 1513597 - Enable and fix ESLint react/forbid-prop-types rules (#6308)
Co-authored-by: Tom Prince <mozilla@hocat.ca>
2020-04-23 12:19:25 -07:00
Musa Talluzi fbdb71d41c Reenable camelCase eslint rule and fix all violations 2019-11-12 10:36:55 -05:00
Cameron Dawson 256c244439 Disable per file: eslint jsx-a11y/no-static-element-interactions 2019-10-01 11:53:47 -07:00
Cameron Dawson b774521fb8 Disable per file: eslint jsx-a11y/no-noninteractive-element-interactions 2019-10-01 11:53:47 -07:00
Cameron Dawson 0b8f5825dd Disable per file: eslint jsx-a11y/control-has-associated-label 2019-10-01 11:53:47 -07:00
Cameron Dawson b88f62b97a
Enable passing eslint rule: jsx-a11y/label-has-for (#5406) 2019-09-28 21:32:07 -07:00
Armen Zambrano G 31990b982d Few linting exceptions 2019-08-21 21:00:59 -04:00
renovate[bot] eb93c4b7f9 Update dependency eslint-plugin-react to v7.14.3 (#5095)
* Update dependency eslint-plugin-react to v7.14.3
* Disable `react/prop-types` rule
2019-08-14 11:45:06 -04:00
Cameron Dawson 0c7be612de Bug 1531243 - Fix ESLint jsx--a11y/label-has-associated-control 2019-03-06 10:32:26 -08:00
Cameron Dawson 200eef2779 Bug 1531243 - Fix ESLint rule jsx-a11y/anchor-is-valid 2019-03-06 10:32:26 -08:00
Cameron Dawson 7619710074 Bug 1513581 - Fix ESLint react/no-access-state-in-setstate 2019-02-27 09:40:35 -08:00
Cameron Dawson deb71d65e0 Bug 1364045 - Convert all unit tests to Jest (#4603)
Also remove all Karma support and update the docs to only mention ``Jest``.

One of the test files was testing some AngularJS filters. I converted these
tests to test the equivalent helper functions.
2019-02-12 07:49:50 +00:00
Cameron Dawson 6eeff4bafe
Bug 1513601 - Fix/enable ESLint 'react/button-has-type' (#4377)
Also make tests less brittle
2018-12-18 14:22:32 -08:00
Cameron Dawson 5e8377a3ff
Bug 1364045 - Introduce Jest unit tests (#4369) 2018-12-13 08:24:52 -08:00
Ed Morley bf7b05389e
Bug 1513576 - Fix/enable ESLint 'react/default-props-match-prop-types' (#4368)
https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/default-props-match-prop-types.md
2018-12-12 19:22:00 +00:00
Ed Morley 0aa34cf04e Remove 'overrides' workaround for now-fixed .prettierignore bug 2018-12-02 17:05:41 +00:00
Ed Morley 65b7f4ab45
Bug 1507172 - Use Prettier for formatting JS/JSX (#4276)
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.
2018-11-16 08:28:34 +00:00
Ed Morley 4db0cfa973
Bug 1507406 - ESLint: Enforce more strict import style (#4279)
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
2018-11-16 08:07:49 +00:00
Ed Morley 69501e0de8 Bug 1505758 - Enable ESLint 'react/no-multi-comp'
https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-multi-comp.md
2018-11-08 16:27:37 +00:00
Ed Morley 362cbde850 Bug 1505758 - Fix/enable ESLint 'func-names'
https://eslint.org/docs/rules/func-names
2018-11-08 16:27:37 +00:00
Ed Morley 70e15b8334 Bug 1505758 - Fix/enable ESLint 'prefer-arrow-callback'
https://eslint.org/docs/rules/prefer-arrow-callback
2018-11-08 16:27:37 +00:00
Ed Morley ec87836e3b Bug 1505758 - Fix/enable ESLint 'prefer-destructuring'
https://eslint.org/docs/rules/prefer-destructuring
2018-11-08 16:27:37 +00:00
Ed Morley 107b67bd69 Bug 1505758 - Fix/enable ESLint 'object-shorthand'
https://eslint.org/docs/rules/object-shorthand
2018-11-08 16:27:37 +00:00
Ed Morley dd0165c0e0 Bug 1505758 - Fix/enable ESLint 'no-restricted-globals'
https://eslint.org/docs/rules/no-restricted-globals
2018-11-08 16:27:37 +00:00
Ed Morley 714e8260c5 Bug 1505758 - Fix/enable ESLint 'no-nested-ternary'
https://eslint.org/docs/rules/no-nested-ternary
2018-11-08 16:27:37 +00:00
Ed Morley 6b664dc144 Bug 1505758 - Fix/enable ESLint 'no-mixed-operators'
https://eslint.org/docs/rules/no-mixed-operators
2018-11-08 16:27:37 +00:00
Ed Morley b9d70dfffd Bug 1505758 - Fix/enable ESLint 'no-else-return'
https://eslint.org/docs/rules/no-else-return
2018-11-08 16:27:37 +00:00
Ed Morley 6d18047fd6 Bug 1505758 - Fix/enable ESLint 'no-prototype-builtins'
https://eslint.org/docs/rules/no-prototype-builtins
2018-11-08 16:27:37 +00:00
Ed Morley 0e8406a4aa Bug 1505758 - Fix/enable ESLint 'no-useless-escape'
https://eslint.org/docs/rules/no-useless-escape
2018-11-08 16:27:37 +00:00
Ed Morley 4ea8abe421 Bug 1505758 - Fix/enable ESLint 'radix'
https://eslint.org/docs/rules/radix
2018-11-08 16:27:37 +00:00
Ed Morley 7af125f626 Bug 1505758 - Fix/enable ESLint 'prefer-template'
https://eslint.org/docs/rules/prefer-template
2018-11-08 16:27:37 +00:00
Cameron Dawson f9a8d899ac
Bug 1183749 - Enable eslint rule: react/no-unused-state (#4240) 2018-11-06 12:23:09 -08:00
Ed Morley 565ae4c13e
Bug 1364894 - Upgrade from Neutrino 4 to 9 (#4216)
Neutrino controls our frontend linting, transpilation, source-maps,
testing, dev-server and optimisation of production builds.

Highlights of the upgrade are:

* Major version updates to the individual tools within (such as webpack,
  Babel and ESLint), significantly improving performance, fixing
  transpilation/minification correctness bugs, adding support for newer
  ECMAScript features, and increasing linter coverage.
* Hot reloading in the dev server now works for all entry-points and not
  just the jobs view, shortening the feedback cycle.
* Reduced bundle size due to webpack 4's tree shaking, scope hoisting,
  automatic shared/vendor code chunk splitting (no need for the manually
  maintained 'vendor' list).
* CSS is now extracted out of JS, which improves performance, reduces
  bundle size and prevents the initial white flash of un-styled content.
* Support for dynamic imports/code splitting (needed for bug 1502192).
* Support for Jest via a new Jest preset (unblocks bug 1364045).
* Support for public class field declarations (unblocks bug 1480166).
* Improved source-maps (increases the quality of production exception
  trace-backs and fixes several debugger breakpoint bugs).
* Reduced amount of custom configuration required for our fairly complex
  frontend needs, reducing maintenance burden and allowing for easier
  future Neutrino upgrades.

In addition this PR:

* Fixes the WhiteNoise `immutable_file_test()` regex, so that it now
  correctly enables browser caching of images, fonts and source maps.
* Enables webpack-dev-server's overlay feature, which displays any
  compilation errors in the browser, saving having to switch back
  to the console (this can be enabled for warnings too if desired).
* Enables webpack-dev-server's automatic browser-opening feature,
  which saves having to manually navigate to `localhost:5000` after
  running `yarn start`.
* Switches Karma tests to run Firefox in headless mode, reducing the
  workflow disruption when running `yarn test`.
* Uses the new webpack `performance` option to enable maximum asset
  file size thresholds, to help prevent bundle-size regressions.
* Rewrites the `package.json` script commands so that they now work
  correctly on Windows, even when setting environment variables.

Performance comparison:

* Local `yarn build`:
  - Cached: 2m34s -> 23s
  - Uncached: 2m34s -> 58s
* Local `yarn start`:
  - Cached: 34.5s -> 13.6s
  - Uncached: 34.5s -> 31.3s
* Local `yarn test`
  - Cached: 61.5s -> 19.8s
  - Uncached: 61.5s -> 22.0s
* Local `yarn lint`
  - Cached: 3.8s -> 1.8s
  - Uncached: 13.7s -> 13.4s
* Travis end-to-end time:
  9 minutes -> 6 minutes
* Heroku deploy end-to-end time:
  14 minutes -> 9 minutes
2018-11-02 18:48:28 +00:00
Ed Morley e1822b5f0a
Bug 1468650 - Use caching with ESLint & lint more files (#3663)
Enabling the ESLint caching reduces `yarn lint` time by 60%. See:
https://eslint.org/docs/user-guide/command-line-interface#caching

This also adds JS files in the repo root to the list of files that
are linted, and fixes a subsequent lint error in `.eslintrc.js`.
2018-06-13 22:39:55 -07:00
Casey Williams afa7d63d1d Bug 1336556 - Replace grunt build system with neutrino/webpack 2017-03-29 22:07:24 +01:00