Merge pull request #488 from jonathanKingston/move-to-no-unescaped-eslint
Move to the Mozilla backed no-unsanitized ESLint plugin
This commit is contained in:
commit
26e6efd611
3 changed files with 19 additions and 9 deletions
22
.eslintrc.js
22
.eslintrc.js
|
@ -5,9 +5,6 @@ module.exports = {
|
|||
"node": true,
|
||||
"webextensions": true
|
||||
},
|
||||
"extends": [
|
||||
"eslint:recommended"
|
||||
],
|
||||
"globals": {
|
||||
"CustomizableUI": true,
|
||||
"CustomizableWidgets": true,
|
||||
|
@ -16,7 +13,10 @@ module.exports = {
|
|||
},
|
||||
"plugins": [
|
||||
"promise",
|
||||
"no-unescaped"
|
||||
"no-unsanitized"
|
||||
],
|
||||
"extends": [
|
||||
"eslint:recommended"
|
||||
],
|
||||
"root": true,
|
||||
"rules": {
|
||||
|
@ -29,8 +29,18 @@ module.exports = {
|
|||
"promise/no-promise-in-callback": "warn",
|
||||
"promise/no-return-wrap": "error",
|
||||
"promise/param-names": "error",
|
||||
"no-unescaped/no-key-assignment": "error",
|
||||
"no-unescaped/enforce": "error",
|
||||
|
||||
"no-unsanitized/method": [
|
||||
"error"
|
||||
],
|
||||
"no-unsanitized/property": [
|
||||
"error",
|
||||
{
|
||||
"escape": {
|
||||
"taggedTemplates": ["escaped"]
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
"eqeqeq": "error",
|
||||
"indent": ["error", 2],
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
"addons-linter": "^0.15.14",
|
||||
"deploy-txp": "^1.0.7",
|
||||
"eslint": "^3.17.1",
|
||||
"eslint-plugin-no-unescaped": "^1.1.0",
|
||||
"eslint-plugin-no-unsanitized": "^2.0.0",
|
||||
"eslint-plugin-promise": "^3.4.0",
|
||||
"htmllint-cli": "^0.0.5",
|
||||
"jpm": "^1.2.2",
|
||||
|
|
|
@ -577,7 +577,7 @@ Logic.registerPanel(P_CONTAINER_EDIT, {
|
|||
const colorRadioFieldset = document.getElementById("edit-container-panel-choose-color");
|
||||
colors.forEach((containerColor) => {
|
||||
const templateInstance = document.createElement("span");
|
||||
// eslint-disable-next-line no-unescaped/enforce
|
||||
// eslint-disable-next-line no-unsanitized/property
|
||||
templateInstance.innerHTML = colorRadioTemplate(containerColor);
|
||||
colorRadioFieldset.appendChild(templateInstance);
|
||||
});
|
||||
|
@ -590,7 +590,7 @@ Logic.registerPanel(P_CONTAINER_EDIT, {
|
|||
const iconRadioFieldset = document.getElementById("edit-container-panel-choose-icon");
|
||||
icons.forEach((containerIcon) => {
|
||||
const templateInstance = document.createElement("span");
|
||||
// eslint-disable-next-line no-unescaped/enforce
|
||||
// eslint-disable-next-line no-unsanitized/property
|
||||
templateInstance.innerHTML = iconRadioTemplate(containerIcon);
|
||||
iconRadioFieldset.appendChild(templateInstance);
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue