aboutsummaryrefslogtreecommitdiff
path: root/.eslintrc.json
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-02-01 15:00:34 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-02-11 22:22:16 -0500
commit4629fb3639ec28e6c514b4a364b71e4192575b9b (patch)
tree8818d9b9f89b883565c5247e96cee9e92317d8f5 /.eslintrc.json
parentcb6e8d07d02e77389e3d395517863a2c9ff8e170 (diff)
Change no-undef from off to error
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
+ }
+ }
+ ]
}