Skip to content
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

Merged
merged 4 commits into from Jun 15, 2020
Merged

Disallow using eslint disable statement for camelcase #9482

merged 4 commits into from Jun 15, 2020

Conversation

nishantwrp
Copy link
Contributor

Overview

  1. This PR fixes or fixes part of NA.
  2. This PR does the following: Disallow using eslint disable statement for camelcase

Essential Checklist

  • The PR title starts with "Fix #bugnum: ", followed by a short, clear summary of the changes. (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • The linter/Karma presubmit checks have passed locally on your machine.
  • "Allow edits from maintainers" is checked. (See here for instructions on how to enable it.)
    • This lets reviewers restart your CircleCI tests for you.
  • The PR is made from a branch that's not called "develop".

PR Pointers

  • Oppiabot will notify you when you don't add a PR_CHANGELOG label. If you are unable to do so, please @-mention a code owner (who will be in the Reviewers list), or ask on Gitter.
  • For what code owners will expect, see the Code Owner's wiki page.
  • Make sure your PR follows conventions in the style guide, otherwise this will lead to review delays
  • Never force push. If you do, your PR will be closed.

@oppiabot
Copy link

oppiabot bot commented Jun 10, 2020

Assigning @kevinlee12 for the first-pass review of this pull request. Thanks!

Comment on lines 68 to 69
'typings/guppy-defs-b5055b963fdbea5c6c1e92dbf58fdaf3ea0cd8ba.d.ts',
'core/templates/services/UpgradedServices.ts']
Copy link
Contributor Author

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
Copy link

codecov bot commented Jun 11, 2020

Codecov Report

Merging #9482 into develop will not change coverage.
The diff coverage is 100.00%.

@@           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           
Flag Coverage Δ
#frontend 55.75% <100.00%> (ø)
Impacted Files Coverage Δ
...nts/ck-editor-helpers/ck-editor-4-rte.directive.ts 4.71% <ø> (ø)
...tom-forms-directives/apply-validation.directive.ts 100.00% <ø> (ø)
...plates/domain/exploration/SolutionObjectFactory.ts 94.74% <ø> (ø)
...omain/statistics/LearnerAnswerInfoObjectFactory.ts 100.00% <ø> (ø)
...topics-and-skills-dashboard-backend-api.service.ts 69.23% <ø> (ø)
.../contribution-opportunities-backend-api.service.ts 85.00% <ø> (ø)
...b/services/state-improvement-suggestion.service.ts 89.66% <ø> (ø)
...ge/services/exploration-recommendations.service.ts 37.84% <ø> (ø)
...on-player-page/services/stats-reporting.service.ts 30.26% <ø> (ø)
core/templates/services/playthrough.service.ts 77.86% <ø> (ø)
... and 3 more

Copy link
Member

@vojtechjelinek vojtechjelinek left a 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 */
Copy link
Member

Choose a reason for hiding this comment

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

Why remove this?

Copy link
Contributor Author

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.

Copy link
Member

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 */
Copy link
Member

Choose a reason for hiding this comment

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

Why remove this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ditto

@brianrodri
Copy link
Contributor

LGTM for codeowner files

@brianrodri brianrodri removed their assignment Jun 11, 2020
@nishantwrp nishantwrp removed their assignment Jun 11, 2020
@@ -56,6 +56,20 @@
_MESSAGE_TYPE_SUCCESS = 'SUCCESS'
_MESSAGE_TYPE_FAILED = 'FAILED'

_BANNED_ESLINT_DISABLE_STATEMENTS = [
{
'pattern': r'eslint-(disable|enable)(-next-line)? camelcase',
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Member

@DubeySandeep DubeySandeep left a 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*

@DubeySandeep DubeySandeep removed their assignment Jun 12, 2020
@nishantwrp
Copy link
Contributor Author

Copy link
Contributor

@sagangwee sagangwee left a 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!

@sagangwee sagangwee removed their assignment Jun 13, 2020
Copy link
Contributor

@Hudda Hudda left a 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

@Hudda Hudda removed their assignment Jun 13, 2020
Copy link
Contributor

@bansalnitish bansalnitish left a comment

Choose a reason for hiding this comment

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

LGTM!

@bansalnitish bansalnitish removed their assignment Jun 13, 2020
Copy link
Contributor

@nithusha21 nithusha21 left a 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!

@nithusha21 nithusha21 removed their assignment Jun 13, 2020
Copy link
Member

@aks681 aks681 left a comment

Choose a reason for hiding this comment

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

Lgtm as codeowner

@aks681 aks681 assigned nishantwrp and unassigned aks681 Jun 14, 2020
@nishantwrp
Copy link
Contributor Author

@vojtechjelinek I think this can be merged now!

@vojtechjelinek vojtechjelinek merged commit 32e12b9 into oppia:develop Jun 15, 2020
shavavo pushed a commit to shavavo/oppia that referenced this pull request Aug 20, 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.

None yet