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

Add consistent copyright notice + use strict to all JS+TS files #15917

Merged
merged 7 commits into from
May 8, 2022

Conversation

queengooborg
Copy link
Collaborator

@queengooborg queengooborg commented Apr 20, 2022

This PR is a cherry-pick of #5890 that makes the top of our files consistent by performing the following:

  • Removing #! lines from all the files (they were added to non-executable files as well and don't help since the files aren't marked executable anyways)
  • Add 'use strict' to all files
  • Add attribution to all files (and remove improperly-worded copyright notice)

Fixes #5879.

@github-actions github-actions bot added bulk_update 📦 An update to a mass amount of data, or scripts/linters related to such changes data:js 📟 Compat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScript linter 🏡 Issues or pull requests regarding the tests / linter of the JSON files. scripts 📜 Issues or pull requests regarding the scripts in scripts/. labels Apr 20, 2022
Copy link
Collaborator

@foolip foolip left a 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, but I'd like someone from Mozilla to review, since this changes copyright notices and there might be considerations I'm not aware of. @Rumyra can you review?

@queengooborg
Copy link
Collaborator Author

In #12161 (comment), @caugner pointed out that ES modules are implicitly strict (and some quick research confirms this). Should we remove the use strict statements in advance?

@foolip
Copy link
Collaborator

foolip commented May 5, 2022

@queengooborg how about removing them after the conversion, or as part of it?

@github-actions
Copy link

github-actions bot commented May 7, 2022

This pull request has merge conflicts that must be resolved before we can merge this.

@queengooborg
Copy link
Collaborator Author

@schalkneethling Would you mind reviewing this PR?

@schalkneethling
Copy link

@schalkneethling Would you mind reviewing this PR?

Funny you should ask 😸 - I just learned about this new "standard"/tool from the Free software foundation https://reuse.software - Not saying we should immediately adopt it here, but surely something to consider.

Copy link
Contributor

@caugner caugner left a comment

Choose a reason for hiding this comment

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

LGTM

@queengooborg queengooborg merged commit 6d8e628 into mdn:main May 8, 2022
@queengooborg queengooborg deleted the refactor/copyright-and-strict branch May 8, 2022 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bulk_update 📦 An update to a mass amount of data, or scripts/linters related to such changes data:js 📟 Compat data for JS/ECMAScript features. https://developer.mozilla.org/docs/Web/JavaScript linter 🏡 Issues or pull requests regarding the tests / linter of the JSON files. scripts 📜 Issues or pull requests regarding the scripts in scripts/.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove copyright notices from source files
4 participants