fullstack-development / fullstack-development/front-end-best-practices
Нейминг приватных полей класса
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 336
- Forks
- 76
- PR merge metrics
- No merged PRs in 30d
Description
Привет всем!
В goodPractice.md имеется пункт про следованию стайлгайду от AirBnB. И хотя там же присутствует оговорка
Все, что перечислено в гайде принять к исполнению, если это не перекрыто нашими правилами ниже
тем не менее, хотелось бы акцентировать внимание на спорных рекомендациях касательно нейминга (квази)приватных методов класса:
В js нет публичных и частных свойств, поэтому частные методы просто делать с префиксами "_" (нижнее подчеркивание)
Как вы считаете, возможно, стоит этот пункт переписать с учетом правил, изложенных в стайлгайде AirBnB, и использовать для имитации приватных полей WeakMap или, как вариант, символы?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read JS/goodPractice.md and JS/architecture.md, then compare the cited Airbnb naming guidance. This is an open design question rather than a specified edit; it is done when the project’s preferred guidance for pseudo-private class methods or fields is agreed and documented in the relevant section.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100