Closed
Bug 1944976
Opened 10 months ago
Closed 9 months ago
Several eslint rules throw when checking node.arguments
Categories
(Developer Infrastructure :: Lint and Formatting, defect)
Developer Infrastructure
Lint and Formatting
Tracking
(firefox137 fixed)
RESOLVED
FIXED
137 Branch
| Tracking | Status | |
|---|---|---|
| firefox137 | --- | fixed |
People
(Reporter: jdescottes, Assigned: jdescottes)
Details
Attachments
(1 file)
Several eslint rules are assuming some methods have arguments and will throw if it's not the case. For instance:
let firstArg = node.arguments[0];
if (!exprs.has(firstArg.type)) {
Will throw when writing an expression such as ok();. This can be slightly annoying while writing tests. At least in my editor (sublime text), a panel will popup showing the stacktrace, and in general it just prevents other linting rules from checking anything in the file.
| Assignee | ||
Updated•10 months ago
|
Type: task → defect
| Assignee | ||
Comment 1•10 months ago
|
||
Avoid some linter rules throwing during validation due to unexpected
argument lengths.
Arguably some of those cases should probably also be caught by other linting
rules.
Updated•10 months ago
|
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f281a24bed72
Fix eslint rules to avoid throwing when arguments are missing r=frontend-codestyle-reviewers,Gijs
Comment 3•9 months ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
status-firefox137:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 137 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•