Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
eslint: Make subdirectory configurations more consistent.
Anders Kaseorga83c2c62963d
diff --git a/.eslintrc.json b/.eslintrc.jsonindex 3e2c3c6afc2..85dd42a6742 100644--- a/.eslintrc.json+++ b/.eslintrc.json@@ -1,12 +1,11 @@{"env": {- "node": true,- "es6": true+ "es2020": true,+ "node": true},"extends": ["eslint:recommended", "prettier"],"parser": "babel-eslint","parserOptions": {- "ecmaVersion": 2019,"warnOnUnsupportedTypeScriptVersion": false,"sourceType": "module"},@@ -86,7 +85,7 @@},"overrides": [{- "files": ["frontend_tests/**/*.{js,ts}", "static/js/**/*.{js,ts}"],+ "files": ["frontend_tests/**", "static/js/**"],"globals": {"$": false,"ClipboardJS": false,@@ -296,15 +295,6 @@"zxcvbn": false}},- {- "files": ["frontend_tests/casper_tests/*.js", "frontend_tests/casper_lib/*.js"],- "rules": {- // Don’t require ES features that PhantomJS doesn’t support- "no-var": "off",- "object-shorthand": "off",- "prefer-arrow-callback": "off"- }- },{"files": ["**/*.ts"],"extends": ["plugin:@typescript-eslint/recommended", "prettier/@typescript-eslint"],@@ -340,6 +330,52 @@"@typescript-eslint/promise-function-async": "error","@typescript-eslint/unified-signatures": "error"}+ },+ {+ "files": ["frontend_tests/**"],+ "globals": {+ "assert": false,+ "casper": false,+ "document": false,+ "set_global": false,+ "window": false,+ "zrequire": false+ },+ "rules": {+ "no-sync": "off"+ }+ },+ {+ "files": ["frontend_tests/casper_lib/**", "frontend_tests/casper_tests/**"],+ "env": {+ "browser": true,+ "es2020": false+ },+ "rules": {+ // Don’t require ES features that PhantomJS doesn’t support+ "no-var": "off",+ "object-shorthand": "off",+ "prefer-arrow-callback": "off"+ }+ },+ {+ "files": ["static/**"],+ "env": {+ "browser": true,+ "commonjs": true,+ "node": false+ },+ "rules": {+ "no-console": "error"+ }+ },+ {+ "files": ["static/shared/**"],+ "env": {+ "browser": false,+ "commonjs": false,+ "shared-node-browser": true+ }}]}diff --git a/frontend_tests/.eslintrc.json b/frontend_tests/.eslintrc.jsondeleted file mode 100644index 78d379ee889..00000000000--- a/frontend_tests/.eslintrc.json+++ /dev/null@@ -1,19 +0,0 @@-{- "env": {- "shared-node-browser": true,- "es6": true- },- "parserOptions": {"ecmaVersion": 2018},- "globals": {- "assert": false,- "casper": false,- "document": false,- "set_global": false,- "window": false,- "zrequire": false- },- "rules": {- "no-sync": 0,- "prefer-const": "error"- }-}diff --git a/static/.eslintrc.json b/static/.eslintrc.jsondeleted file mode 100644index a9335eca72b..00000000000--- a/static/.eslintrc.json+++ /dev/null@@ -1,8 +0,0 @@-{- "env": {- "browser": true- },- "rules": {- "no-console": "error"- }-}