Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

lint: Format JSON files with Prettier.

Anders Kaseorg40be4df57a80
diff --git a/.eslintrc.json b/.eslintrc.json
index c84c406591e..4a7bee0aece 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -3,18 +3,13 @@
"node": true,
"es6": true
},
- "extends": [
- "eslint:recommended",
- "prettier"
- ],
+ "extends": ["eslint:recommended", "prettier"],
"parserOptions": {
"ecmaVersion": 2019,
"warnOnUnsupportedTypeScriptVersion": false,
"sourceType": "module"
},
- "plugins": [
- "eslint-plugin-empty-returns"
- ],
+ "plugins": ["eslint-plugin-empty-returns"],
"rules": {
"array-callback-return": "error",
"arrow-body-style": "error",
@@ -24,7 +19,8 @@
"empty-returns/main": "error",
"eqeqeq": "error",
"guard-for-in": "error",
- "new-cap": [ "error",
+ "new-cap": [
+ "error",
{
"capIsNew": false
}
@@ -59,9 +55,10 @@
"no-self-compare": "error",
"no-sync": "error",
"no-undef-init": "error",
- "no-unneeded-ternary": [ "error", { "defaultAssignment": false } ],
+ "no-unneeded-ternary": ["error", {"defaultAssignment": false}],
"no-unused-expressions": "error",
- "no-unused-vars": [ "error",
+ "no-unused-vars": [
+ "error",
{
"vars": "local",
"varsIgnorePattern": "print_elapsed_time|check_duplicate_ids"
@@ -71,9 +68,10 @@
"no-useless-constructor": "error",
"no-var": "error",
"object-shorthand": "error",
- "one-var": [ "error", "never" ],
+ "one-var": ["error", "never"],
"prefer-arrow-callback": "error",
- "prefer-const": [ "error",
+ "prefer-const": [
+ "error",
{
"ignoreReadBeforeAssign": true
}
@@ -82,15 +80,12 @@
"sort-imports": "error",
"spaced-comment": "off",
"strict": "off",
- "valid-typeof": [ "error", { "requireStringLiterals": true } ],
+ "valid-typeof": ["error", {"requireStringLiterals": true}],
"yoda": "error"
},
"overrides": [
{
- "files": [
- "frontend_tests/**/*.{js,ts}",
- "static/js/**/*.{js,ts}"
- ],
+ "files": ["frontend_tests/**/*.{js,ts}", "static/js/**/*.{js,ts}"],
"globals": {
"$": false,
"ClipboardJS": false,
@@ -301,10 +296,7 @@
}
},
{
- "files": [
- "frontend_tests/casper_tests/*.js",
- "frontend_tests/casper_lib/*.js"
- ],
+ "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",
@@ -314,10 +306,7 @@
},
{
"files": ["**/*.ts"],
- "extends": [
- "plugin:@typescript-eslint/recommended",
- "prettier/@typescript-eslint"
- ],
+ "extends": ["plugin:@typescript-eslint/recommended", "prettier/@typescript-eslint"],
"parserOptions": {
"project": "tsconfig.json"
},
@@ -330,7 +319,10 @@
"@typescript-eslint/array-type": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/consistent-type-assertions": "error",
- "@typescript-eslint/explicit-function-return-type": ["error", { "allowExpressions": true }],
+ "@typescript-eslint/explicit-function-return-type": [
+ "error",
+ {"allowExpressions": true}
+ ],
"@typescript-eslint/member-ordering": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-extraneous-class": "error",
@@ -338,7 +330,7 @@
"@typescript-eslint/no-parameter-properties": "error",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
- "@typescript-eslint/no-unused-vars": ["error", { "varsIgnorePattern": "^_" } ],
+ "@typescript-eslint/no-unused-vars": ["error", {"varsIgnorePattern": "^_"}],
"@typescript-eslint/no-use-before-define": "error",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/prefer-includes": "error",
diff --git a/frontend_tests/.eslintrc.json b/frontend_tests/.eslintrc.json
index 4cd05701bc4..78d379ee889 100644
--- a/frontend_tests/.eslintrc.json
+++ b/frontend_tests/.eslintrc.json
@@ -3,7 +3,7 @@
"shared-node-browser": true,
"es6": true
},
- "parserOptions": { "ecmaVersion": 2018 },
+ "parserOptions": {"ecmaVersion": 2018},
"globals": {
"assert": false,
"casper": false,
diff --git a/static/js/tslint.json b/static/js/tslint.json
index 7b73ab8410a..4f93ae90edf 100644
--- a/static/js/tslint.json
+++ b/static/js/tslint.json
@@ -1,8 +1,6 @@
{
"defaultSeverity": "error",
- "extends": [
- "tslint:recommended"
- ],
+ "extends": ["tslint:recommended"],
"jsRules": {},
"rules": {},
"rulesDirectory": []
diff --git a/tools/webpack.assets.json b/tools/webpack.assets.json
index 4ae9918aded..34b172cb054 100644
--- a/tools/webpack.assets.json
+++ b/tools/webpack.assets.json
@@ -45,17 +45,13 @@
"./static/js/loading.js",
"./static/styles/portico/billing.scss"
],
- "portico": [
- "./static/js/bundles/portico.js"
- ],
+ "portico": ["./static/js/bundles/portico.js"],
"error-styles": [
"./static/third/bootstrap/css/bootstrap.css",
"./static/third/bootstrap/css/bootstrap-responsive.css",
"./static/styles/portico/portico-styles.scss"
],
- "common": [
- "./static/js/bundles/common.js"
- ],
+ "common": ["./static/js/bundles/common.js"],
"help": [
"./static/js/bundles/portico.js",
"simplebar/dist/simplebar.css",
@@ -97,14 +93,8 @@
"./static/js/analytics/support.js",
"./static/styles/app_components.scss"
],
- "dev-login": [
- "./static/js/bundles/portico.js",
- "./static/js/portico/dev-login.js"
- ],
- "desktop-login": [
- "./static/js/bundles/portico.js",
- "./static/js/portico/desktop-login.js"
- ],
+ "dev-login": ["./static/js/bundles/portico.js", "./static/js/portico/dev-login.js"],
+ "desktop-login": ["./static/js/bundles/portico.js", "./static/js/portico/desktop-login.js"],
"desktop-redirect": [
"./static/js/bundles/portico.js",
"./static/js/portico/desktop-redirect.js"
@@ -128,11 +118,6 @@
"./static/js/stats/stats.js",
"plotly.js/dist/plotly-basic.min.js"
],
- "app": [
- "./static/js/bundles/app.js",
- "katex/dist/katex.min.js"
- ],
- "digest": [
- "./static/js/bundles/portico.js"
- ]
+ "app": ["./static/js/bundles/app.js", "katex/dist/katex.min.js"],
+ "digest": ["./static/js/bundles/portico.js"]
}