Turn on ESLint in editor
Categories
(MailNews Core :: Composition, task)
Tracking
(Not tracked)
People
(Reporter: darktrojan, Assigned: darktrojan)
References
Details
Attachments
(2 files)
|
652.74 KB,
patch
|
Details | Diff | Splinter Review | |
|
220.73 KB,
patch
|
aceman
:
review+
|
Details | Diff | Splinter Review |
I've done the linting in editor, ignoring most of the parts Thunderbird doesn't ship.
| Assignee | ||
Comment 1•7 years ago
|
||
These changes were done by eslint --fix. Not asking for review, as nobody who values their sanity wants to review a computer-generated 22000-line patch.
| Assignee | ||
Comment 2•7 years ago
|
||
Good luck, and remember, most of this code never sees the light of day, so don't be too picky.
| Assignee | ||
Comment 3•7 years ago
|
||
| Assignee | ||
Comment 5•7 years ago
|
||
(In reply to :aceman from comment #4)
Disable whole linting? Why?
Again?
I said why, in the very first chunk of the diff. We don't use this code (I wish it would be chopped out and put in another file, but that's not going to happen anytime soon) and it's not worth my time hunting down the errors in it.
::: editor/ui/composer/content/editor.js
@@ -556,5 @@
- return await SaveDocument(false, false, editor.contentsMIMEType);
Was this 'await' wrong? Does eslint find this stuff?
Not wrong, just pointless. The async function returns a Promise, and SaveDocument returns a Promise. There's probably no difference at all at runtime.
::: editor/ui/composer/content/editorUtilities.js
@@ -279,5 @@/** *********** General editing command utilities ***************/
function GetDocumentTitle() {
try {
- return new XPCNativeWrapper(GetCurrentEditor().document, "title").title;
Found by eslint?
Yeah, I don't think XPCNativeWrapper is really a thing any more. Anyway, I just accessed the document the same way SetDocumentTitle does, so I think this okay.
::: editor/ui/dialogs/content/EdTableProps.js
@@ -657,5 @@gActiveEditor.selectTableColumn(); break; }
- // Get number of cells selected
- var tableOrCellElement = gActiveEditor.getSelectedOrParentTableElement(tagNameObj, countObj);
The countObj is used below. Maybe you only wanted to kill tableOrCellElement
?
Well spotted, I didn't realise that was an out-arg.
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/2f1b233c4f65
Turn on ESLint in editor (automatic changes by eslint --fix); rs=me
https://hg.mozilla.org/comm-central/rev/09d757485ede
Turn on ESLint in editor (manual changes); r=aceman
| Assignee | ||
Updated•7 years ago
|
Updated•6 years ago
|
Description
•