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
Disallow using eslint disable statement for camelcase #9482
Disallow using eslint disable statement for camelcase #9482
Conversation
Assigning @kevinlee12 for the first-pass review of this pull request. Thanks! |
scripts/linters/js_ts_linter.py
Outdated
'typings/guppy-defs-b5055b963fdbea5c6c1e92dbf58fdaf3ea0cd8ba.d.ts', | ||
'core/templates/services/UpgradedServices.ts'] |
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.
These were needed because these files had variables in snake_case
that couldn't use quotes.
Codecov Report
@@ Coverage Diff @@
## develop #9482 +/- ##
========================================
Coverage 55.75% 55.75%
========================================
Files 966 966
Lines 38605 38605
Branches 4719 4719
========================================
Hits 21523 21523
Misses 15775 15775
Partials 1307 1307
|
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.
LGTM! Just a two nits.
@@ -149,7 +144,6 @@ export class SolutionObjectFactory { | |||
// TODO(ankita240796): Remove the bracket notation once Angular2 gets in. | |||
/* eslint-disable dot-notation */ | |||
createNew( | |||
/* eslint-enable dot-notation */ |
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.
Why remove 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.
there was no use of 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.
Okay, I was just confused since previously the stuf on line 150 was kept.
@@ -136,7 +132,6 @@ export class SolutionObjectFactory { | |||
private shof: SubtitledHtmlObjectFactory, | |||
private ehfs: ExplorationHtmlFormatterService) {} | |||
createFromBackendDict(solutionBackendDict: SolutionBackendDict): Solution { | |||
/* eslint-enable dot-notation */ |
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.
Why remove 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.
ditto
LGTM for codeowner files |
scripts/linters/js_ts_linter.py
Outdated
@@ -56,6 +56,20 @@ | |||
_MESSAGE_TYPE_SUCCESS = 'SUCCESS' | |||
_MESSAGE_TYPE_FAILED = 'FAILED' | |||
|
|||
_BANNED_ESLINT_DISABLE_STATEMENTS = [ | |||
{ | |||
'pattern': r'eslint-(disable|enable)(-next-line)? camelcase', |
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.
Can we use BAD_PATTERNS_JS_AND_TS_REGEXP
instead of creating a new block 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.
done! didn't know we had something like 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.
LGTM for the codeowner files*
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.
@nishantwrp LGTM for codeowners. Thanks!
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.
LGTM as codeowner. Thanks @nishantwrp
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.
LGTM!
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.
LGTM as a codeowner!
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.
Lgtm as codeowner
@vojtechjelinek I think this can be merged now! |
Overview
Essential Checklist
PR Pointers