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

bug: eslintrc.cjs is untracked in git when initlizing a repo #1251

Closed
ggrochow opened this issue Feb 28, 2023 · 1 comment · Fixed by #1252
Closed

bug: eslintrc.cjs is untracked in git when initlizing a repo #1251

ggrochow opened this issue Feb 28, 2023 · 1 comment · Fixed by #1252

Comments

@ggrochow
Copy link
Contributor

Provide environment information

System:
OS: Windows 10 10.0.19044
CPU: (16) x64 Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz
Memory: 23.49 GB / 31.92 GB
Binaries:
Node: 16.14.2 - C:\Program Files\nodejs\node.EXE
npm: 8.5.0 - C:\Program Files\nodejs\npm.CMD

Describe the bug

When creating a new t3-app while initializing a git repo with the CLI, the _eslintrc.cjs file is not included by default.
Its being renamed after the git repo is initialized and the files are added, so a git status shows _eslintrc.cjs as deleted, and .eslintrc.cjs as untracked.

Reproduction repo

N/A

To reproduce

npm create t3-app@latest
select yes on the Initialize a new git repository? option

run git status

On branch main

No commits yet

Changes to be committed:
  (use "git rm --cached <file>..." to unstage)
        new file:   .env.example
        new file:   .gitignore
        new file:   README.md
        new file:   _eslintrc.cjs
        new file:   next.config.mjs
        new file:   package-lock.json
        new file:   package.json
        new file:   public/favicon.ico
        new file:   src/env.mjs
        new file:   src/pages/_app.tsx
        new file:   src/pages/index.module.css
        new file:   src/pages/index.tsx
        new file:   src/styles/globals.css
        new file:   tsconfig.json

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        deleted:    _eslintrc.cjs

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        .eslintrc.cjs

Additional information

I think this could be fixed by moving the renameSnyc to before intializeGit call, and would be happy to open a PR for it if this seems correct.

@c-ehrlich
Copy link
Member

Thanks for catching this. I think you're right. Feel free to open a PR :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants