我应该在 .gitignore 文件中写 jsconfig.json 还是 tsconfig.json ?

should i write jsconfig.json or tsconfig.json in .gitignore file?

我必须在我的项目中使用 jsconfig 文件,jsconfig 文件如下所示:

{
    "compilerOptions": {
        "baseUrl": ".",
        "paths": {
            "*": [
                "src/*"
            ],
            "test/*": [
                "test/*"
            ]
        }
    }
}

在nodejs或任何前端项目中,我们应该忽略.gitignore文件中的jsconfig.json或tsconfig.json吗? 最佳做法是什么?

您应该将您的配置文件留在您的代码存储库中,这样当您或其他人克隆您的项目时,可以运行使用您现在使用的相同配置