summaryrefslogtreecommitdiff
path: root/.eslintrc.json
diff options
context:
space:
mode:
Diffstat (limited to '.eslintrc.json')
-rw-r--r--.eslintrc.json37
1 files changed, 35 insertions, 2 deletions
diff --git a/.eslintrc.json b/.eslintrc.json
index 81fe517f..9b1a19b3 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -23,7 +23,8 @@
"no-case-declarations": "error",
"no-const-assign": "error",
"no-constant-condition": "off",
- "no-undef": "off",
+ "no-global-assign": "error",
+ "no-undef": "error",
"no-unused-vars": ["error", {"vars": "local", "args": "after-used", "argsIgnorePattern": "^_", "caughtErrors": "none"}],
"no-unused-expressions": "error",
"no-var": "error",
@@ -32,5 +33,37 @@
"quotes": ["error", "single", "avoid-escape"],
"require-atomic-updates": "off",
"semi": "error"
- }
+ },
+ "overrides": [
+ {
+ "files": ["*.js"],
+ "excludedFiles": ["ext/mixed/js/core.js"],
+ "globals": {
+ "yomichan": "readonly",
+ "errorToJson": "readonly",
+ "jsonToError": "readonly",
+ "logError": "readonly",
+ "isObject": "readonly",
+ "hasOwn": "readonly",
+ "toIterable": "readonly",
+ "stringReverse": "readonly",
+ "promiseTimeout": "readonly",
+ "stringReplaceAsync": "readonly",
+ "EventDispatcher": "readonly",
+ "EXTENSION_IS_BROWSER_EDGE": "readonly"
+ }
+ },
+ {
+ "files": ["ext/mixed/js/core.js"],
+ "globals": {
+ "chrome": "writable"
+ }
+ },
+ {
+ "files": ["ext/bg/js/settings/*.js"],
+ "env": {
+ "jquery": true
+ }
+ }
+ ]
}