fullstack-development / fullstack-development/front-end-best-practices

Регламентировать 'кавычки' в PUG файлах

Open
#48 8 comments 2 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.