Conversation
Member
Author
|
@nikolai-shabalin ку-ку |
Contributor
There was a problem hiding this comment.
Хотелось бы восстановить
| const requiredAttributes = { | ||
| // todo вынести в конфиг правила | ||
| rel: ['noreferrer', 'noopener'] | ||
| rel: ['noopener'] |
Contributor
There was a problem hiding this comment.
Не нужно исправлять. Это работает
| @@ -1,10 +1,10 @@ | |||
| # htmlacademy/a-target-rel | |||
| Правило проверяет наличие атрибута `rel` со значениями `noreferrer` и `noopener` у ссылок` <a>` с атрибутом `target="_blank"`. Правило принимает значения true или false. | |||
| This rule checks that `<a>` links with `target="_blank"` have a `rel` attribute with both `noreferrer` and `noopener` values. Accepts `true` or `false`. | |||
Contributor
There was a problem hiding this comment.
Надо вернуть все переводы назад. И подумать на .en-.ru версиями
|
|
||
| module.exports = { | ||
| name: 'htmlacademy/img-svg-req-dimensions', | ||
| name: 'htmlacademy/replaced-elements-req-dimensions', |
Contributor
There was a problem hiding this comment.
Вернуть название как было, так как replaced-elements, про куда больший ассортимент тегов, чем конкретный список svg и img
| @@ -1,11 +1,11 @@ | |||
| # htmlacademy/img-svg-req-dimensions | |||
| # htmlacademy/replaced-elements-req-dimensions | |||
Contributor
There was a problem hiding this comment.
Вернуть имя правила
| } | ||
|
|
||
| const hasWebpSource = sourceElements.some((source) => attribute_has_value(source, 'type', 'image/webp')); | ||
| const hasAvifSource = sourceElements.some((source) => attribute_has_value(source, 'type', 'image/avif')); |
Contributor
There was a problem hiding this comment.
AVIF сделать отдельным правилом и не добавлять в WEBP
| @@ -1,5 +1,14 @@ | |||
| # Changelog | |||
|
|
|||
| ## 2.0.0 — ??? | |||
|
|
||
| const rulesDir = path.join(__dirname, './rules'); | ||
| const ruleFiles = fs.readdirSync(rulesDir); | ||
| const ruleFiles = fs.readdirSync(rulesDir).filter((file) => !file.startsWith('.')); |
Contributor
There was a problem hiding this comment.
Это лишнее внутри ./rules/ нет таких файлов и папок
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Major update of LintHTML custom rules aligned with htmlacademy/linthtml-config-htmlacademy#28 and htmlacademy/codeguide#75.
scope (now covers img, svg, video, iframe)