Skip to content

Switch to ESLint#839

Merged
Perryvw merged 18 commits intoTypeScriptToLua:masterfrom
ark120202:eslint
May 9, 2020
Merged

Switch to ESLint#839
Perryvw merged 18 commits intoTypeScriptToLua:masterfrom
ark120202:eslint

Conversation

@ark120202
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Member

@Perryvw Perryvw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this forced destructuring, and can we force consistent string characters (ie " instead of ')?


if (classTbl[Symbol.hasInstance] !== undefined) {
// eslint-disable-next-line no-implicit-coercion
return !!classTbl[Symbol.hasInstance](obj);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldnt it be nicer to just change this to an actual comparison

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A comparison with true? I'm fine with doing that for now, but in the future (when we'll implement boolean coercion algorithm) I think it should use Boolean(...), since TypeScript doesn't check implementations of well-known symbols.

@ark120202 ark120202 marked this pull request as ready for review April 30, 2020 10:09
// Variables NOT declared in for loop - catch iterator values in temps and assign
// for ____value0 in ${iterable} do
// ${initializer} = ____value0
// eslint-disable-next-line no-lonely-if
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This rule seems a little awkward. I think this is very much a case-by-case basis and would prefer not to have a few eslint-disables as possible.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess that's true, though I don't think I had any issues with it in years of being in my config. I have disabled this rule and also fixed this case, since it actually turned out to look neater with the logic flow here

@Perryvw Perryvw merged commit 7556611 into TypeScriptToLua:master May 9, 2020
@ark120202 ark120202 deleted the eslint branch May 9, 2020 14:23
@ark120202 ark120202 mentioned this pull request May 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants