Skip to content

Commit

Permalink
fix linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
slavaleleka committed Nov 7, 2023
1 parent 81654b0 commit bf758af
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/agtree/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog][keepachangelog], and this project adheres to [Semantic Versioning][semver].


# 1.1.7 - 2023-11-07
## 1.1.7 - 2023-11-07

### Added

Expand Down
1 change: 1 addition & 0 deletions packages/agtree/src/validator/value.ts
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,7 @@ const validateReferrerPolicy = (modifier: Modifier): ValidationResult => {
const modifierValue = modifier.value.value;

if (!REFERRER_POLICY_DIRECTIVES.has(modifierValue)) {
// eslint-disable-next-line max-len
return getInvalidValidationResult(`${VALIDATION_ERROR_PREFIX.INVALID_REFERRER_POLICY_DIRECTIVE}: '${modifierName}': '${modifierValue}'`);
}

Expand Down
3 changes: 3 additions & 0 deletions packages/agtree/test/validator/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -950,15 +950,18 @@ describe('ModifierValidator', () => {
test.each([
{
actual: 'referrerpolicy=autoplay=self',
// eslint-disable-next-line max-len
expected: `${VALIDATION_ERROR_PREFIX.INVALID_REFERRER_POLICY_DIRECTIVE}: 'referrerpolicy': 'autoplay=self'`,
},
{
actual: 'referrerpolicy=no-origin',
// eslint-disable-next-line max-len
expected: `${VALIDATION_ERROR_PREFIX.INVALID_REFERRER_POLICY_DIRECTIVE}: 'referrerpolicy': 'no-origin'`,
},
{
// non-latin "o" in "origin"
actual: 'referrerpolicy=оrigin',
// eslint-disable-next-line max-len
expected: `${VALIDATION_ERROR_PREFIX.INVALID_REFERRER_POLICY_DIRECTIVE}: 'referrerpolicy': 'оrigin'`,
},
{
Expand Down

0 comments on commit bf758af

Please sign in to comment.