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

Chore: migrate master to main #15062

Merged
merged 5 commits into from Oct 15, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Expand Up @@ -6,7 +6,7 @@

#### Prerequisites checklist

- [ ] I have read the [contributing guidelines](https://github.com/eslint/eslint/blob/master/CONTRIBUTING.md).
- [ ] I have read the [contributing guidelines](https://github.com/eslint/eslint/blob/main/CONTRIBUTING.md).
Copy link
Sponsor Contributor

Choose a reason for hiding this comment

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

Suggested change
- [ ] I have read the [contributing guidelines](https://github.com/eslint/eslint/blob/main/CONTRIBUTING.md).
- [ ] I have read the [contributing guidelines](https://github.com/eslint/eslint/blob/HEAD/CONTRIBUTING.md).

this way it will always work, now and later, and won't need to be coordinated with the default branch change.

Same for every URL in the PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the review @ljharb. I made the changes in all the URLs.


#### What is the purpose of this pull request? (put an "X" next to an item)

Expand All @@ -16,9 +16,9 @@
-->

[ ] Documentation update
[ ] Bug fix ([template](https://raw.githubusercontent.com/eslint/eslint/master/templates/bug-report.md))
[ ] New rule ([template](https://raw.githubusercontent.com/eslint/eslint/master/templates/rule-proposal.md))
[ ] Changes an existing rule ([template](https://raw.githubusercontent.com/eslint/eslint/master/templates/rule-change-proposal.md))
[ ] Bug fix ([template](https://raw.githubusercontent.com/eslint/eslint/main/templates/bug-report.md))
[ ] New rule ([template](https://raw.githubusercontent.com/eslint/eslint/main/templates/rule-proposal.md))
[ ] Changes an existing rule ([template](https://raw.githubusercontent.com/eslint/eslint/main/templates/rule-change-proposal.md))
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
@@ -1,9 +1,9 @@
name: CI
on:
push:
branches: [master]
branches: [main]
niteshseram marked this conversation as resolved.
Show resolved Hide resolved
pull_request:
branches: [master]
branches: [main]
niteshseram marked this conversation as resolved.
Show resolved Hide resolved

jobs:
verify_files:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql-analysis.yml
Expand Up @@ -13,10 +13,10 @@ name: "CodeQL"

on:
push:
branches: [ master ]
branches: [ main ]
niteshseram marked this conversation as resolved.
Show resolved Hide resolved
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
branches: [ main ]
niteshseram marked this conversation as resolved.
Show resolved Hide resolved
schedule:
- cron: '28 17 * * 5'

Expand Down
10 changes: 5 additions & 5 deletions Makefile.js
Expand Up @@ -236,7 +236,7 @@ function commitSiteToGit(tag) {
exec(`git tag ${tag}`);
}

exec("git fetch origin && git rebase origin/master");
exec("git fetch origin && git rebase origin/main");
niteshseram marked this conversation as resolved.
Show resolved Hide resolved
cd(currentDir);
}

Expand All @@ -249,7 +249,7 @@ function publishSite() {
const currentDir = pwd();

cd(SITE_DIR);
exec("git push origin master --tags");
exec("git push origin main --tags");
niteshseram marked this conversation as resolved.
Show resolved Hide resolved
cd(currentDir);
}

Expand Down Expand Up @@ -647,8 +647,8 @@ target.gensite = function(prereleaseVersion) {
tempFiles.forEach((filename, i) => {
if (test("-f", filename) && path.extname(filename) === ".md") {

const rulesUrl = "https://github.com/eslint/eslint/tree/master/lib/rules/",
docsUrl = "https://github.com/eslint/eslint/tree/master/docs/rules/",
const rulesUrl = "https://github.com/eslint/eslint/tree/main/lib/rules/",
docsUrl = "https://github.com/eslint/eslint/tree/main/docs/rules/",
baseName = path.basename(filename),
sourceBaseName = `${path.basename(filename, ".md")}.js`,
sourcePath = path.join("lib/rules", sourceBaseName),
Expand Down Expand Up @@ -695,7 +695,7 @@ target.gensite = function(prereleaseVersion) {
"---",
`title: ${title}`,
"layout: doc",
`edit_link: https://github.com/eslint/eslint/edit/master/${filePath}`,
`edit_link: https://github.com/eslint/eslint/edit/main/${filePath}`,
ruleType,
"---",
"<!-- Note: No pull requests accepted for this file. See README.md in the root directory for details. -->",
Expand Down
10 changes: 5 additions & 5 deletions docs/developer-guide/code-path-analysis.md
Expand Up @@ -226,9 +226,9 @@ module.exports = function(context) {
```

See Also:
[no-unreachable](https://github.com/eslint/eslint/blob/master/lib/rules/no-unreachable.js),
[no-fallthrough](https://github.com/eslint/eslint/blob/master/lib/rules/no-fallthrough.js),
[consistent-return](https://github.com/eslint/eslint/blob/master/lib/rules/consistent-return.js)
[no-unreachable](https://github.com/eslint/eslint/blob/main/lib/rules/no-unreachable.js),
[no-fallthrough](https://github.com/eslint/eslint/blob/main/lib/rules/no-fallthrough.js),
[consistent-return](https://github.com/eslint/eslint/blob/main/lib/rules/consistent-return.js)

### To check state of a code path

Expand Down Expand Up @@ -324,8 +324,8 @@ module.exports = function(context) {
```

See Also:
[constructor-super](https://github.com/eslint/eslint/blob/master/lib/rules/constructor-super.js),
[no-this-before-super](https://github.com/eslint/eslint/blob/master/lib/rules/no-this-before-super.js)
[constructor-super](https://github.com/eslint/eslint/blob/main/lib/rules/constructor-super.js),
[no-this-before-super](https://github.com/eslint/eslint/blob/main/lib/rules/no-this-before-super.js)

## Code Path Examples

Expand Down
6 changes: 3 additions & 3 deletions docs/developer-guide/contributing/pull-requests.md
Expand Up @@ -88,7 +88,7 @@ Before you send the pull request, be sure to rebase onto the upstream source. Th

```
git fetch upstream
git rebase upstream/master
git rebase upstream/main
```

### Step 4: Run the tests<a name="step4"></a>
Expand Down Expand Up @@ -164,15 +164,15 @@ $ git commit
$ git push origin issue1234
```

When updating the code, it's usually better to add additional commits to your branch rather than amending the original commit, because reviewers can easily tell which changes were made in response to a particular review. When we merge pull requests, we will squash all the commits from your branch into a single commit on the `master` branch.
When updating the code, it's usually better to add additional commits to your branch rather than amending the original commit, because reviewers can easily tell which changes were made in response to a particular review. When we merge pull requests, we will squash all the commits from your branch into a single commit on the `main` branch.

### Rebasing

If your code is out-of-date, we might ask you to rebase. That means we want you to apply your changes on top of the latest upstream code. Make sure you have set up a [development environment](../development-environment.md) and then you can rebase using these commands:

```
$ git fetch upstream
$ git rebase upstream/master
$ git rebase upstream/main
```

You might find that there are merge conflicts when you attempt to rebase. Please [resolve the conflicts](https://help.github.com/articles/resolving-merge-conflicts-after-a-git-rebase/) and then do a forced push to your branch:
Expand Down
4 changes: 2 additions & 2 deletions docs/developer-guide/working-with-rules-deprecated.md
Expand Up @@ -493,8 +493,8 @@ To keep the linting process efficient and unobtrusive, it is useful to verify th
The `npm run perf` command gives a high-level overview of ESLint running time with default rules (`eslint:recommended`) enabled.

```bash
$ git checkout master
Switched to branch 'master'
$ git checkout main
Switched to branch 'main'

$ npm run perf
CPU Speed is 2200 with multiplier 7500000
Expand Down
4 changes: 2 additions & 2 deletions docs/developer-guide/working-with-rules.md
Expand Up @@ -674,8 +674,8 @@ To keep the linting process efficient and unobtrusive, it is useful to verify th
When developing in the ESLint core repository, the `npm run perf` command gives a high-level overview of ESLint running time with all core rules enabled.

```bash
$ git checkout master
Switched to branch 'master'
$ git checkout main
Switched to branch 'main'

$ npm run perf
CPU Speed is 2200 with multiplier 7500000
Expand Down