environment-agency-austria / tslint-eaa-contrib

TSLint rules for EAA projects
MIT License
2 stars 0 forks source link

Add tslint-consistent-codestyle rules #3

Closed christophka closed 6 years ago

christophka commented 6 years ago

I recently found the tslint-consistent-codestyle npm package and i find that the following rules would be nice:

Also, the package offers a very flexible rule on how to name things: naming-convention. Is there something that we would like to enforce? I think it would definitely help us with the naming for React.Context that tends to be upper case in our projects

maschino commented 6 years ago

I'm 👍 for all of your suggestions. Maybe we could use naming-convention to allow CamelCase for everything that's exported?

Otherwise those seem nice to have as well:

christophka commented 6 years ago

I did create a pull request that seems to cover everything in this issue. I configured the naming-convention rule, so that it kinda matches our code base. The most noteworthy part is, that all export const functions are PascalCase, except for every function starting with 'with' - since this is the use for our higher order components-functions in react. Everything is covered with this Pull Request: #4