-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use ESLint:recommended #1207
use ESLint:recommended #1207
Conversation
cfffc0b
to
3bf5eec
Compare
@@ -525,8 +525,8 @@ aria.Grid.prototype.handleSort = function (headerNode) { | |||
var comparator = function (row1, row2) { | |||
var row1Text = row1.children[columnIndex].innerText; | |||
var row2Text = row2.children[columnIndex].innerText; | |||
var row1Value = parseInt(row1Text.replace(/[^0-9\.]+/g, '')); | |||
var row2Value = parseInt(row2Text.replace(/[^0-9\.]+/g, '')); | |||
var row1Value = parseInt(row1Text.replace(/[^0-9.]+/g, '')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if I actually prefer the previous version for readablity, so this could always be disabled for these lines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I prefer it either, though not so strongly that it seems worth disabling linting for the line
@spectranaut @mcking65 I can split this up if you want but I just used separate commits for each rule addressed to make it easier to look at those diffs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! Seems like it caught a fair number of substantive issues too :)
@@ -525,8 +525,8 @@ aria.Grid.prototype.handleSort = function (headerNode) { | |||
var comparator = function (row1, row2) { | |||
var row1Text = row1.children[columnIndex].innerText; | |||
var row2Text = row2.children[columnIndex].innerText; | |||
var row1Value = parseInt(row1Text.replace(/[^0-9\.]+/g, '')); | |||
var row2Value = parseInt(row2Text.replace(/[^0-9\.]+/g, '')); | |||
var row1Value = parseInt(row1Text.replace(/[^0-9.]+/g, '')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I prefer it either, though not so strongly that it seems worth disabling linting for the line
} | ||
flag = true; | ||
break; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😂
@@ -104,7 +104,7 @@ FormatToolbar.prototype.updateDisable = function (copyButton, cutButton, pasteBu | |||
}; | |||
|
|||
FormatToolbar.prototype.selectText = function (start, end, textarea) { | |||
if (typeof(textarea.selectionStart != undefined)) { | |||
if (typeof textarea.selectionStart !== "undefined") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😮
@@ -35,7 +35,7 @@ var PopupMenuAction = function (domNode, controllerObj) { | |||
msgPrefix = 'PopupMenu constructor argument domNode '; | |||
|
|||
// Check whether domNode is a DOM element | |||
if (!domNode instanceof Element) { | |||
if (!(domNode instanceof Element)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
welp, that was a thing that existed 😱
3bf5eec
to
0ddcf99
Compare
Option collides with built-in type
0ddcf99
to
9b956d2
Compare
@mcking65 @sh0ji @spectranaut can you give the second person thumbs up and merge? It caught a few bugs already, and the unused/undefined might be hiding more, but they would make the diff harder to parse if included here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me too!
@@ -51,7 +51,7 @@ const focusOnOrInCell = async function (t, cellElement, focusable) { | |||
}; | |||
|
|||
const findColIndex = function () { | |||
const el = document.activeElement; | |||
let el = document.activeElement; | |||
while (!el.hasAttribute('aria-colindex')) { | |||
el = el.parent; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow I'm surprise this never came up. I'll make an issue to fix this never execute code path... #1216
@@ -2,5 +2,10 @@ | |||
"extends": "eslint:recommended", | |||
"env": { | |||
"browser": true | |||
}, | |||
"rules": { | |||
"no-unused-vars": 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to fix this in the future? is there a follow up task for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it should be fixed going forward, but I didn't spin up an issue for the 3 that are turned off right now
Infrastructure: Add eslint rules from eslint:recommended config (pull #1207) Perdiscussion in issue #1180, ad the eslint:recommended shareable config to eslint. Then fix errors. * chore: switch to eslint:recommended * chore: eslint fix with new config * fix: no-const-assign * fix: no-empty * fix: no-useless-escape * fix: no-duplicate-case * fix: no-constant-condition * fix: no-unsafe-negation * chore: ignore no-cond-assign * fix: no-redeclare * Option collides with built-in type * fix: no-prototype-builtins * chore: ignore currently failing rules
Infrastructure: Add eslint rules from eslint:recommended config (pull w3c#1207) Perdiscussion in issue w3c#1180, ad the eslint:recommended shareable config to eslint. Then fix errors. * chore: switch to eslint:recommended * chore: eslint fix with new config * fix: no-const-assign * fix: no-empty * fix: no-useless-escape * fix: no-duplicate-case * fix: no-constant-condition * fix: no-unsafe-negation * chore: ignore no-cond-assign * fix: no-redeclare * Option collides with built-in type * fix: no-prototype-builtins * chore: ignore currently failing rules
No description provided.