frederikprijck / angularjs-webpack-starter

:rocket: A modern frontend setup for AngularJS projects using NPM, TypeScript and Webpack.
184 stars 59 forks source link

Add code formatting files #4

Closed peterblazejewicz closed 7 years ago

peterblazejewicz commented 7 years ago

This is optional, but I think it could be beneficial for users as project is a template.

The .prettierrc contains a rule that switch default double quotes to single quotes (ones used in tsconfig) The .editorconfig reflects settings used in source code - so when sample code is used e.g. in VSCode and code is formatted a minimal change occurs compared to original example code

Thanks!

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 77.528% when pulling 07def1ef3b95e88bc352a6f3c00df48658128fa7 on peterblazejewicz:feature/code-format-configs into 92ccf7929e9933f956dac5f992a062cb3c894811 on frederikprijck:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 77.528% when pulling 88d64d3e1b8aec360bde29579a6acd9e18c5b821 on peterblazejewicz:feature/code-format-configs into 92ccf7929e9933f956dac5f992a062cb3c894811 on frederikprijck:master.

frederikprijck commented 7 years ago

Hi @peterblazejewicz,

Thanks for the PR.

Iirc .prettierrc is for when you're using prettier, which I am not in this starter. Adding a .prettierrc file wouldn't make sense from that perspective. If you do prefer to add the prettierrc file, I think we should have a prettier step in the build aswell. But my guess is, this isn't realy the scope of the repo (but feel free to add it to the PR, if it's trivial I'll probably merge it in)

I'm not sure about .editorconfig neither. The reason for this starter is to show you how a modern setup can look like. Adding an .editorconfig doesn't sound like the scope of this repo neither, as I do not think it's this repo's responsibility to force certain editor configurations.

However I do not see any harm in adding it, so if you can remove the prettierrc file, I can merge this in. Merging in prettierrc would require more changes, aswell as an extra build step. Feel free if you do want to add prettier! :)

peterblazejewicz commented 7 years ago

@frederikprijck Sorry for a delay, was at work. I've rebased the PR and now it just adds configuration files into .gitignore. This should allow a user like me - to actively use your template 'as is', but without a need to add configuration file changes via commits. I work with your content as we have a legacy up in NG1.* that begs for migration paths. Thanks!

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 77.528% when pulling bd10e7e8044953491c3d1bde001af793694b077a on peterblazejewicz:feature/code-format-configs into 92ccf7929e9933f956dac5f992a062cb3c894811 on frederikprijck:master.

peterblazejewicz commented 7 years ago

ops, wait a sec - I forgot to reverse file additions. Done

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 77.528% when pulling 0b132ea49906ba80f0f00cb35a843754bb121736 on peterblazejewicz:feature/code-format-configs into 92ccf7929e9933f956dac5f992a062cb3c894811 on frederikprijck:master.

frederikprijck commented 7 years ago

So if I understand this correct, you're adding these two files to the .gitignore because you're using them on your project ?

Why should this be part of the repository? Because someone wants to ignore them doesn't mean other people can't include them in git, right ?

I don't think leaving this out would be an issue for your migration path of any legacy AngularJS project, or am I missing something ?

peterblazejewicz commented 7 years ago

Forget, I'm not using them in my own project. I'm using a git based project. Thanks for your time though!