Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
❓Why are editorconfig, npmignore, and gitattributes/gitignore included by default #653
Granted, they have no adverse affect on the project...
except to pollute it with extra junk we don't need
Why are these files included by default on new project creation?
Thanks for reporting this.
Agree on the .gitattributes and .npmignore. We will be removing those as they do not apply to the solution.
However, we believe the .editorconfig and .gitignore provide value to the developers.
Thanks @chakkaradeep on removing the two unnecessary files.
Respectfully disagree with you on
IMHO, templates from vendors should provide the necessary functionality, but not impose style. Any of your enterprise customers are likely to have their own coding standards. I guess the solution is to remove what the MSFT generator does and replace it with our own on every project. Tedious, but doable.
Leaving this open until the
@andrewconnell I don't believe we are imposing anything. What contradicting styles or configurations do you think we are imposing that is going to degrade the development standards of an enterprise? Would like to know if that is the case, then maybe we could update those files to have the right configurations.
Also, the template does not stop the developer from overwriting the configurations. So, I am unclear as to how that results in imposing styles. If you as a developer have in your workflow to put your own configuration, you would do so anyways.
You're correct... the developer can make changes after creating the project... no debate there. And just to state the obvious: this isn't a bug / complaint... just a debate.
The very presence of these two files (
Consider an analogy: when I create a new ASP.NET MVC project in Visual Studio, do you see any FxCop or StyleCop rules provisioned with the project? When I the ASP.NET Core Yeoman generator, you don't see any style-like files, including
So I ask: what makes SPFx so special from other MSFT templates that it should include that stuff?
We believe these add additional value to the development flow. We have received positive feedback on the tslint.json and have provided ways to turn it off, if needed, based on the feedback. Moreover, the tslint configurations work with the SPFx build pipeline and toolchain giving the much-needed help for developers to avoid any accidental/unwanted errors when building web parts and other SPFx components.
We are not saying SPFx is special rather providing options/ways to help developers write better code. The developer, at the end of the day, can decide not to use any of these and remove/ignore them if they want to.
We don't have any intention to remove these files other than the .gitattributes and .npmignore from the template. I am closing this issue as this is by design.