Closed
Bug 1344308
Opened 9 years ago
Closed 9 years ago
Share and extend toolkit's eslint rules in PSM
Categories
(Core :: Security: PSM, enhancement, P1)
Core
Security: PSM
Tracking
()
RESOLVED
FIXED
mozilla55
| Tracking | Status | |
|---|---|---|
| firefox55 | --- | fixed |
People
(Reporter: sfoster, Assigned: sfoster)
References
Details
(Whiteboard: [psm-assigned])
Attachments
(1 file)
The security/manager/.eslintrc.js has a lot of overlap with toolkit's .eslintrc.js. I'm proposing to directly extend toolkit's rules and remove the overlap so we start to converge on a common set of rules. Where PSM's rule are more explicit, we'll keep them in place. And fix any resulting lint errors under security/manager obviously.
Updated•9 years ago
|
Status: NEW → ASSIGNED
Priority: -- → P1
Whiteboard: [psm-assigned]
| Comment hidden (mozreview-request) |
| Assignee | ||
Comment 2•9 years ago
|
||
A couple try runs:
Try w. linux64 bit build, xpcshell and mochitest chrome tests:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=6c8b8d3cac82c64cf69396135562ff4662d534e5
Try win32/linux/macosx and PSM tests: https://treeherder.mozilla.org/#/jobs?repo=try&revision=ea5d71f14377abcef5bfeee88640cfbd63c95780
The change to mochitest.eslintrc.js especially may have an impact outside the security/manager component.
| Assignee | ||
Updated•9 years ago
|
Attachment #8844047 -
Flags: review?(jaws)
Comment 3•9 years ago
|
||
| mozreview-review | ||
Comment on attachment 8844047 [details]
Bug 1344308 - Extend toolkit's eslint rules and fix lint errors in PSM
https://reviewboard.mozilla.org/r/117602/#review119338
::: security/manager/.eslintrc.js:62
(Diff revision 1)
> // Disallow modifying variables of class declarations.
> "no-class-assign": "error",
>
> // Disallow assignment in conditional expressions, except if the assignment
> // is within parentheses.
> - "no-cond-assign": ["error", "except-parens"],
> + // "no-cond-assign": ["error", "except-parens"],
Why does this rule get commented out? toolkit/.eslintrc.js has this rule enabled, except it doesn't use the 'except-parens' option.
Since this rule is commented out, it looks like it would use the toolkit version. Can we delete this line now?
::: security/manager/.eslintrc.js:175
(Diff revision 1)
> + // "env": {
> + // "browser": true
> + // },
Should this section be removed?
::: security/manager/pki/resources/content/device_manager.js:435
(Diff revision 1)
> }
>
> // ------------------------------------- Old code
>
> -function showTokenInfo()
> -{
> +function showTokenInfo() {
> + // ClearInfoList();
We should just delete this line.
::: security/manager/ssl/tests/mochitest/mixedcontent/.eslintrc.js:6
(Diff revision 1)
> "use strict";
>
> module.exports = { // eslint-disable-line no-undef
> - "extends": "../../../../../../testing/mochitest/mochitest.eslintrc.js"
> + "extends": "../../../../../../testing/mochitest/mochitest.eslintrc.js",
> + "rules": {
> + "brace-style": "off"
Can you add your commit message comment here saying why this rule is turned off?
Attachment #8844047 -
Flags: review?(jaws) → review+
| Assignee | ||
Comment 4•9 years ago
|
||
The addition of the plugin property in testing/mochitest/mochitest.eslintrc.js is already making its way to central in bug 1344690. I'll update this patch and attempt to land when that shows up on m-c.
Depends on: 1344690
| Comment hidden (mozreview-request) |
| Assignee | ||
Comment 6•9 years ago
|
||
| mozreview-review-reply | ||
Comment on attachment 8844047 [details]
Bug 1344308 - Extend toolkit's eslint rules and fix lint errors in PSM
https://reviewboard.mozilla.org/r/117602/#review119338
> Why does this rule get commented out? toolkit/.eslintrc.js has this rule enabled, except it doesn't use the 'except-parens' option.
>
> Since this rule is commented out, it looks like it would use the toolkit version. Can we delete this line now?
Yeah it needs deleting. I had a couple of commented blocks in this patch which I didn't finish deleting before pushing for review.
| Assignee | ||
Comment 7•9 years ago
|
||
| mozreview-review | ||
Comment on attachment 8844047 [details]
Bug 1344308 - Extend toolkit's eslint rules and fix lint errors in PSM
https://reviewboard.mozilla.org/r/117602/#review119666
Got those nits taken care of, I think this is ready to go.
| Comment hidden (mozreview-request) |
| Comment hidden (mozreview-request) |
Comment 10•9 years ago
|
||
Pushed by sfoster@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/93fa88dcfe7d
Extend toolkit's eslint rules and fix lint errors in PSM r=jaws
Comment 11•9 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox55:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in
before you can comment on or make changes to this bug.
Description
•