summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.eslintrc.json5
-rw-r--r--package-lock.json6
-rw-r--r--package.json3
3 files changed, 12 insertions, 2 deletions
diff --git a/.eslintrc.json b/.eslintrc.json
index d4ae215b..39c5e964 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -10,6 +10,7 @@
"es2017": true,
"webextensions": true
},
+ "plugins": ["no-unsanitized"],
"ignorePatterns": [
"/ext/mixed/lib/",
"/ext/bg/js/templates.js"
@@ -32,7 +33,9 @@
"quote-props": ["error", "consistent"],
"quotes": ["error", "single", "avoid-escape"],
"require-atomic-updates": "off",
- "semi": "error"
+ "semi": "error",
+ "no-unsanitized/method": "error",
+ "no-unsanitized/property": "error"
},
"overrides": [
{
diff --git a/package-lock.json b/package-lock.json
index 0d8eb27f..11cf28bc 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -264,6 +264,12 @@
"v8-compile-cache": "^2.0.3"
}
},
+ "eslint-plugin-no-unsanitized": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-no-unsanitized/-/eslint-plugin-no-unsanitized-3.0.2.tgz",
+ "integrity": "sha512-JnwpoH8Sv4QOjrTDutENBHzSnyYtspdjtglYtqUtAHe6f6LLKqykJle+UwFPg23GGwt5hI3amS9CRDezW8GAww==",
+ "dev": true
+ },
"eslint-scope": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz",
diff --git a/package.json b/package.json
index eb1fb25c..8e71de59 100644
--- a/package.json
+++ b/package.json
@@ -25,6 +25,7 @@
},
"homepage": "https://foosoft.net/projects/yomichan/",
"devDependencies": {
- "eslint": "^6.8.0"
+ "eslint": "^6.8.0",
+ "eslint-plugin-no-unsanitized": "^3.0.2"
}
}