Mark Stacey
466ece4588
Revert "Merge pull request #7599 from MetaMask/Version-v7.7.0" ( #7648 )
...
This reverts commit 1110287fe1
, reversing
changes made to 72eb233ee9
.
2019-12-05 10:23:43 -10:00
Whymarrh Whitby
bb4c4189fb
eslint: Enable more react/jsx-* rules ( #7592 )
2019-12-03 13:39:25 -04:00
Whymarrh Whitby
718f0010a4
Enable react/no-unused-state rule for ESLint ( #7609 )
...
* eslint: Enable react/no-unused-state rule
* Fix unused state issues
* Remove now unused validFileImport localized message
2019-12-03 13:39:25 -04:00
Whymarrh Whitby
04064d5d19
Enable no-var rule for ESLint ( #7590 )
...
* eslint: Enable no-var rule
* yarn lint --fix
2019-12-03 13:39:25 -04:00
Whymarrh Whitby
926c8848f1
Enable default-case rule for ESLint ( #7572 )
...
* eslint: Enable default-case rule
* Fix missing default cases
* Fix tests failing due to incorrect assumptions
2019-11-27 12:38:35 -03:30
Whymarrh Whitby
aa41057628
Update ESLint rules for curly braces style ( #7477 )
...
* eslint: Enable curly and brace-style
* yarn lint --fix
2019-11-19 20:33:20 -03:30
Whymarrh Whitby
b0890b6b32
Enforce a single boolean attr notation in JSX ( #7465 )
...
This changeset enables the ESLint rule enforcing a single notation for boolean
attributes in JSX—explictly setting the value to `true` is no longer allowed
(as it was never needed).[1]
From the docs for JSX:[2]
> If you pass no value for a prop, it defaults to `true`.
[1]:https://github.com/yannickcr/eslint-plugin-react/blob/80935658/docs/rules/jsx-boolean-value.md
[2]:https://reactjs.org/docs/jsx-in-depth.html#props-default-to-true
I have chosen to use this default as it the most consistent with HTML (a la
`checked` and `disabled`).
2019-11-18 19:53:41 -03:30
Whymarrh Whitby
51bfe56510
Disallow spaces around the equal sign in JSX ( #7459 )
2019-11-18 14:19:03 -03:30
Whymarrh Whitby
f1384e7522
Disable unnecessary curly braces in JSX ( #7454 )
2019-11-18 11:38:47 -03:30
Whymarrh Whitby
659b4360bc
Add ESLint rule forbidding extraneous defaultProps ( #7453 )
2019-11-18 11:38:10 -03:30
Mark Stacey
a57ff0b681
Add eslint import plugin to help detect unresolved paths
...
Most of the rules in the import plugin are only useful for projects
using purely ES6 imports. The `no-unresolved` rule works with mixed
CommonJS and ES6 though, so we at least benefit from that in the
meantime.
2019-11-14 09:06:31 -04:00
Whymarrh Whitby
3d1f214cb0
Remove trailing commas from JSON files ( #7284 )
2019-10-16 22:01:19 -02:30
Whymarrh Whitby
4d88e1cf86
Enable indent linting via ESLint ( #6936 )
...
* Enable indent linting via ESLint
* yarn run lint:fix
2019-07-31 10:17:11 -10:00
Mark Stacey
2eea388680
Remove unused expressions ( #6839 )
...
Unused expressions are generally a mistake, as they don't do anything.
The exceptions to this rule (short-circuit expressions and ternary
expressions) have been allowed.
The `webrtc-adapter` was previously ignored by eslint because it has a
side-effect upon being imported. I removed the local variable instead,
which should preserve the same side-effect without making eslint
complain.
2019-07-12 12:41:39 -03:00
Mark Stacey
95f198550e
Declare variables before use ( #6806 )
...
While working on #6805 , I noticed that many variables were being used
before they were declared. Technically this worked fine in practice
because we were using the `transform-es2015-block-scoping` Babel plugin,
which transforms `let` and `const` to `var`, which is hoisted. However,
after removing that Babel transformation, many things broke.
All instances of variables or classes being used before declared have
been fixed.
The `no-use-before-define` eslint rule has been added to catch these
cases going forward. The rule is disabled for function declarations for
the moment, because those are always hoisted. We could disable that too
if we want to, but it's purely stylistic and would require a lot more
changes.
2019-07-05 14:01:34 -03:00
Whymarrh Whitby
094e4cf555
Check for unused function arguments ( #6583 )
...
* eslint: Check for unused function arguments
* eslint: Ignore unused '_' in argument list
Also allow any number of '_' e.g., '__' or '___' which is to be used sparingly
* Remove and rename unused arguments
2019-05-08 15:51:33 -04:00
Whymarrh Whitby
1988e1e96b
ESLint fixes ( #5775 )
...
* eslint . --fix
* Upgrade all ESLint warnings to errors
2018-11-16 14:54:55 -10:00
brunobar79
8c032323a2
add QUnit to eslint globals
2018-07-02 19:37:21 -04:00
brunobar79
0fad48592c
add $ to globals
2018-07-02 18:49:49 -04:00
brunobar79
61fcec78f8
update eslint rules and paths
2018-07-02 18:35:30 -04:00
Dan
ea28c8a437
Replaces currency-input.js with NumericInput
2018-05-29 09:21:54 -02:30
bitpshr
7129d7c0f3
Require loglevel singleton in each module that uses it
2018-04-13 17:56:28 -04:00
kumavis
fa66b78b8b
Merge branch 'master' into lint-sys-fix
2018-04-02 15:03:54 -07:00
kumavis
2b6557a024
lint - lint json files in app/
2018-04-02 14:47:47 -07:00
kumavis
3f6554b637
lint - rules - disallow 'event' global
2018-04-02 12:51:45 -07:00
Lazaridis
bb6af25e20
add ESLint exceptions for //= and //-, re #3568
2018-03-16 03:22:10 +02:00
Chi Kei Chan
ac50db52a9
Fix linter
2017-10-20 21:51:37 -07:00
Chi Kei Chan
5aaa2d679b
Add ShapeShift UI
2017-10-20 21:51:37 -07:00
Chi Kei Chan
c6a3d00d80
Fix merge conflict; separate onboarding buy screen
2017-10-20 21:51:37 -07:00
kumavis
da7471e095
lint fixes
2017-08-03 14:48:19 -07:00
Dan Finlay
61f5c42a45
Add support for async/await
2017-05-12 12:04:42 -07:00
Thomas Huang
1895fa1489
Add mocha and chai plugins eslint
2017-05-04 14:32:42 -07:00
Dan Finlay
8aca5bf4b5
Add debug logging to ui routing logic.
2017-02-20 13:14:12 -08:00
kumavis
acdd168fbc
lint -ignore extra spaces before values in obj expression
2017-01-26 22:30:46 -08:00
Dan Finlay
958cbfbde4
Merge branch 'i328-MultiVault-v1' into i715-AddImportMenu
2017-01-17 13:58:54 -08:00
kumavis
79040c2e68
lint - warn on unhandled err
2017-01-11 14:41:31 -08:00
Kevin Serrano
0c23925c23
Fix lint rules for ternary operator placement.
2016-11-11 15:37:22 -08:00
Dan Finlay
b3cb675a8b
Develop import subviews
2016-11-04 15:32:02 -07:00
Dan Finlay
383f8ea7dc
Linted & added salting to vault
2016-10-20 11:33:18 -07:00
kumavis
254dddda97
soften lint warnings
2016-09-15 12:44:47 -07:00
Dan Finlay
be74589f49
Fix extension tests
2016-07-25 17:33:22 -07:00
Dan Finlay
6658bea8d4
Implement some cross-browser practices ( #473 )
...
* Add mozilla plugin key to manifest
* Move all chrome references into platform-checking module
Addresses #453
* Add chrome global back to linter blacklist
* Add tests
2016-07-21 10:45:32 -07:00
kumavis
f0633463d0
stop pedantic linting
2016-06-23 16:53:27 -07:00
Dan Finlay
a08c3bc01b
Auto linted
2016-06-21 13:18:32 -07:00
Dan Finlay
f7f8f8b1c5
Turn spaces back on
2016-06-21 13:06:41 -07:00
Dan Finlay
7b2f061fbb
Some manual fixes
2016-06-21 12:51:04 -07:00
Dan Finlay
45506d6758
Got eslint running correctly
2016-06-21 12:40:09 -07:00