Comments (7)
@buehler thanks! It makes sense to add such rule in the TypeScript section. I agree with you that it makes sense.
tslint's variable-name
rule seems to solve this partially so we can extend the tslint.json
configuration as well.
We can extend the rule further in ng2lint where we can check whether variable with leading _
is declared with private access modified.
from angular2-style-guide.
Yay ;-)
from angular2-style-guide.
Perfect, I'll wait for the new package then ;-)
Thanks for the cool styleguide!
Or should I make a PR?
Cheers
from angular2-style-guide.
You're welcome to open a PR with this addition to the TypeScript section :-)
from angular2-style-guide.
I found a styleguide by Microsoft:
https://github.com/Microsoft/TypeScript-Handbook/blob/master/pages/Classes.md
Well, they say, "name private vars without _ unless it's for a property"
I'll write an appropriate part for the typescript section
from angular2-style-guide.
@mgechev private members lint rule is already available from the angular2 repo.
https://github.com/angular/angular/blob/master/tools/tslint/requireInternalWithUnderscoreRule.ts
from angular2-style-guide.
Alright, I documented it in #33
Feel free to comment on the PR if you find something that is missing or needs improvement.
Cheers
from angular2-style-guide.
Related Issues (20)
- Inconsistent model file naming in directory structure example HOT 1
- Drop models HOT 9
- Name events without prefix 'on' HOT 1
- consider using GitBook HOT 6
- Where to put application interfaces? HOT 4
- Remove or change section on reusable libraries
- Simplify directory structure HOT 13
- Suggest naming facade files 'index.ts' rather than 'feature.ts' HOT 1
- Style for *ngFor HOT 3
- Suggestion: Add guides for component css styling to the styleguide
- pipes in directory structure under shared? HOT 1
- The recommended file/folder structure feels redundant and cluttered. HOT 19
- Simplify directory structure HOT 5
- Use HostBinding/HostListener instead of host property
- Style for Array HOT 3
- add eslint config example HOT 1
- Using badge on personal Angular2 projects HOT 1
- Avoid using forwardRef considerations HOT 1
- Discuss about directory structure to share code between projects
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular2-style-guide.