Skip to content

Commit

Permalink
add eslint-plugin-no-unsanitized for DOM XSS linting
Browse files Browse the repository at this point in the history
  • Loading branch information
mozfreddyb committed Oct 10, 2019
1 parent 8229c6f commit ea7475c
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,25 @@
"src/test/js/**",
"src/webpack/**"
],
"plugins": ["no-unsanitized"],
"rules": {
"no-negated-condition": "warn",
"no-unsanitized/method": ["error",
{
"escape": {
"methods": [
"DOMPurify.sanitize"
]
}
}],
"no-unsanitized/property": ["error",
{
"escape": {
"methods": [
"DOMPurify.sanitize"
]
}
}],
"no-unused-vars": "warn",
"prefer-destructuring": "warn",
"unicorn/no-for-loop": "warn",
Expand Down Expand Up @@ -80,6 +97,7 @@
"devDependencies": {
"ava": "^2.4.0",
"css-loader": "^3.2.0",
"eslint-plugin-no-unsanitized": "^3.0.2",
"lint-staged": "^9.4.2",
"vue-loader": "^15.7.1",
"vue-style-loader": "^4.1.2",
Expand Down

0 comments on commit ea7475c

Please sign in to comment.