fullstack-development / fullstack-development/front-end-best-practices
Регламентировать 'кавычки' в PUG файлах
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 336
- Forks
- 76
- PR merge metrics
- No merged PRs in 30d
Description
На данный момент имеется несколько разногласных issues для нескольких людей, где в одном issue указано, что все кавычки в pug файлах необходимо заменить на двойные, а в issue другого человека, другой ревьювер написал о необходимости использовать двойные кавычки в pug HTML атрибутах, а в местах где используется js код - одинарные. Нужно регламентировать данный момент в best practices, во избежание спорных моментов, и желательно использовать второй вариант, где:
- const anyWord = "word"; // Плохо, т.к это уже js код, хоть и внутри PUG файла,
// у него должны быть одинарные кавычки
button(type="button")= anyWord // type="button" - HTML атрибут,
// он должен быть в двойных кавычках
- const anyWord = 'word'; // Хорошо
button(type="button")= anyWord
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
Start by reviewing the repository’s existing best-practices documentation and the PUG-related guidance referenced by this issue. Document the convention shown in the examples: double quotes for HTML attributes and single quotes for JavaScript code in PUG files. Done means the rule is recorded clearly enough to prevent conflicting review guidance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- pug
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100