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

Re-factor how the ESLint no-var rule is enabled in the src/ folder #12441

Merged
merged 1 commit into from
Oct 3, 2020

Conversation

Snuffleupagus
Copy link
Collaborator

This simplifies/consolidates the ESLint configuration slightly in the src/ folder, and prevents the addition of any new files where var is being used.[1]
Hence we no longer need to manually add /* eslint no-var: error */ in files, which is easy to forget, and can instead disable the rule in the src/core/ files where var is still in use.


[1] Obviously the no-var rule can, in the same way as every other rule, be disabled on a case-by-case basis where actually necessary.

This simplifies/consolidates the ESLint configuration slightly in the `src/` folder, and prevents the addition of any new files where `var` is being used.[1]
Hence we no longer need to manually add `/* eslint no-var: error */` in files, which is easy to forget, and can instead disable the rule in the `src/core/` files where `var` is still in use.

---
[1] Obviously the `no-var` rule can, in the same way as every other rule, be disabled on a case-by-case basis where actually necessary.
@Snuffleupagus
Copy link
Collaborator Author

/botio lint

@pdfjsbot
Copy link

pdfjsbot commented Oct 3, 2020

From: Bot.io (Linux m4)


Received

Command cmd_lint from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.67.70.0:8877/5c28b3c1d420c81/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Oct 3, 2020

From: Bot.io (Windows)


Received

Command cmd_lint from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.215.176.217:8877/6d80d8dca258ccd/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Oct 3, 2020

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/5c28b3c1d420c81/output.txt

Total script time: 2.20 mins

  • Lint: Passed

@pdfjsbot
Copy link

pdfjsbot commented Oct 3, 2020

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/6d80d8dca258ccd/output.txt

Total script time: 2.96 mins

  • Lint: Passed

@timvandermeij timvandermeij merged commit 2823beb into mozilla:master Oct 3, 2020
@timvandermeij
Copy link
Contributor

Good idea; thanks!

@Snuffleupagus Snuffleupagus deleted the src-eslint-config branch October 4, 2020 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants