forked from nicojs/typed-html
-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2ce36ff
commit 2f8a5ec
Showing
2 changed files
with
13 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@kitajs/ts-html-plugin': patch | ||
--- | ||
|
||
Fixed url docs for error codes |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
function urlDocs(error: `k${number}`) { | ||
return `https://html.kitajs.org/packages/ts-html-plugin#${error}`; | ||
} | ||
|
||
export const Xss = { | ||
code: '0 K601' as any, | ||
message: | ||
'Usage of xss-prone content without `safe` attribute. https://kitajs.github.io/ts-html-plugin#k601' | ||
message: `Usage of xss-prone content without \`safe\` attribute. ${urlDocs('k601')}` | ||
}; | ||
|
||
export const DoubleEscape = { | ||
code: '0 K602' as any, | ||
message: | ||
'Double escaping detected. Please remove the `safe` attribute. https://kitajs.github.io/ts-html-plugin#k602' | ||
message: `Double escaping detected. Please remove the \`safe\` attribute. ${urlDocs('k602')}` | ||
}; | ||
|
||
export const ComponentXss = { | ||
code: '0 K603' as any, | ||
message: | ||
'Xss-prone content inside a Component, wrap it into a Html.escapeHtml() call. https://kitajs.github.io/ts-html-plugin#k603' | ||
message: `Xss-prone content inside a Component, wrap it into a Html.escapeHtml() call. ${urlDocs('k603')}` | ||
}; | ||
|
||
export const UnusedSafe = { | ||
code: '0 K604' as any, | ||
message: 'Unused safe attribute. https://kitajs.github.io/ts-html-plugin#k604' | ||
message: `Unused safe attribute. ${urlDocs('k604')}` | ||
}; |