mirror of https://github.com/zulip/zulip.git
lint: Format JSON files with Prettier.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
f03605bd73
commit
40be4df57a
|
@ -3,18 +3,13 @@
|
||||||
"node": true,
|
"node": true,
|
||||||
"es6": true
|
"es6": true
|
||||||
},
|
},
|
||||||
"extends": [
|
"extends": ["eslint:recommended", "prettier"],
|
||||||
"eslint:recommended",
|
|
||||||
"prettier"
|
|
||||||
],
|
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
"ecmaVersion": 2019,
|
"ecmaVersion": 2019,
|
||||||
"warnOnUnsupportedTypeScriptVersion": false,
|
"warnOnUnsupportedTypeScriptVersion": false,
|
||||||
"sourceType": "module"
|
"sourceType": "module"
|
||||||
},
|
},
|
||||||
"plugins": [
|
"plugins": ["eslint-plugin-empty-returns"],
|
||||||
"eslint-plugin-empty-returns"
|
|
||||||
],
|
|
||||||
"rules": {
|
"rules": {
|
||||||
"array-callback-return": "error",
|
"array-callback-return": "error",
|
||||||
"arrow-body-style": "error",
|
"arrow-body-style": "error",
|
||||||
|
@ -24,7 +19,8 @@
|
||||||
"empty-returns/main": "error",
|
"empty-returns/main": "error",
|
||||||
"eqeqeq": "error",
|
"eqeqeq": "error",
|
||||||
"guard-for-in": "error",
|
"guard-for-in": "error",
|
||||||
"new-cap": [ "error",
|
"new-cap": [
|
||||||
|
"error",
|
||||||
{
|
{
|
||||||
"capIsNew": false
|
"capIsNew": false
|
||||||
}
|
}
|
||||||
|
@ -59,9 +55,10 @@
|
||||||
"no-self-compare": "error",
|
"no-self-compare": "error",
|
||||||
"no-sync": "error",
|
"no-sync": "error",
|
||||||
"no-undef-init": "error",
|
"no-undef-init": "error",
|
||||||
"no-unneeded-ternary": [ "error", { "defaultAssignment": false } ],
|
"no-unneeded-ternary": ["error", {"defaultAssignment": false}],
|
||||||
"no-unused-expressions": "error",
|
"no-unused-expressions": "error",
|
||||||
"no-unused-vars": [ "error",
|
"no-unused-vars": [
|
||||||
|
"error",
|
||||||
{
|
{
|
||||||
"vars": "local",
|
"vars": "local",
|
||||||
"varsIgnorePattern": "print_elapsed_time|check_duplicate_ids"
|
"varsIgnorePattern": "print_elapsed_time|check_duplicate_ids"
|
||||||
|
@ -71,9 +68,10 @@
|
||||||
"no-useless-constructor": "error",
|
"no-useless-constructor": "error",
|
||||||
"no-var": "error",
|
"no-var": "error",
|
||||||
"object-shorthand": "error",
|
"object-shorthand": "error",
|
||||||
"one-var": [ "error", "never" ],
|
"one-var": ["error", "never"],
|
||||||
"prefer-arrow-callback": "error",
|
"prefer-arrow-callback": "error",
|
||||||
"prefer-const": [ "error",
|
"prefer-const": [
|
||||||
|
"error",
|
||||||
{
|
{
|
||||||
"ignoreReadBeforeAssign": true
|
"ignoreReadBeforeAssign": true
|
||||||
}
|
}
|
||||||
|
@ -82,15 +80,12 @@
|
||||||
"sort-imports": "error",
|
"sort-imports": "error",
|
||||||
"spaced-comment": "off",
|
"spaced-comment": "off",
|
||||||
"strict": "off",
|
"strict": "off",
|
||||||
"valid-typeof": [ "error", { "requireStringLiterals": true } ],
|
"valid-typeof": ["error", {"requireStringLiterals": true}],
|
||||||
"yoda": "error"
|
"yoda": "error"
|
||||||
},
|
},
|
||||||
"overrides": [
|
"overrides": [
|
||||||
{
|
{
|
||||||
"files": [
|
"files": ["frontend_tests/**/*.{js,ts}", "static/js/**/*.{js,ts}"],
|
||||||
"frontend_tests/**/*.{js,ts}",
|
|
||||||
"static/js/**/*.{js,ts}"
|
|
||||||
],
|
|
||||||
"globals": {
|
"globals": {
|
||||||
"$": false,
|
"$": false,
|
||||||
"ClipboardJS": false,
|
"ClipboardJS": false,
|
||||||
|
@ -301,10 +296,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": [
|
"files": ["frontend_tests/casper_tests/*.js", "frontend_tests/casper_lib/*.js"],
|
||||||
"frontend_tests/casper_tests/*.js",
|
|
||||||
"frontend_tests/casper_lib/*.js"
|
|
||||||
],
|
|
||||||
"rules": {
|
"rules": {
|
||||||
// Don’t require ES features that PhantomJS doesn’t support
|
// Don’t require ES features that PhantomJS doesn’t support
|
||||||
"no-var": "off",
|
"no-var": "off",
|
||||||
|
@ -314,10 +306,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": ["**/*.ts"],
|
"files": ["**/*.ts"],
|
||||||
"extends": [
|
"extends": ["plugin:@typescript-eslint/recommended", "prettier/@typescript-eslint"],
|
||||||
"plugin:@typescript-eslint/recommended",
|
|
||||||
"prettier/@typescript-eslint"
|
|
||||||
],
|
|
||||||
"parserOptions": {
|
"parserOptions": {
|
||||||
"project": "tsconfig.json"
|
"project": "tsconfig.json"
|
||||||
},
|
},
|
||||||
|
@ -330,7 +319,10 @@
|
||||||
"@typescript-eslint/array-type": "error",
|
"@typescript-eslint/array-type": "error",
|
||||||
"@typescript-eslint/await-thenable": "error",
|
"@typescript-eslint/await-thenable": "error",
|
||||||
"@typescript-eslint/consistent-type-assertions": "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/member-ordering": "error",
|
||||||
"@typescript-eslint/no-explicit-any": "off",
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
"@typescript-eslint/no-extraneous-class": "error",
|
"@typescript-eslint/no-extraneous-class": "error",
|
||||||
|
@ -338,7 +330,7 @@
|
||||||
"@typescript-eslint/no-parameter-properties": "error",
|
"@typescript-eslint/no-parameter-properties": "error",
|
||||||
"@typescript-eslint/no-unnecessary-qualifier": "error",
|
"@typescript-eslint/no-unnecessary-qualifier": "error",
|
||||||
"@typescript-eslint/no-unnecessary-type-assertion": "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-use-before-define": "error",
|
||||||
"@typescript-eslint/no-useless-constructor": "error",
|
"@typescript-eslint/no-useless-constructor": "error",
|
||||||
"@typescript-eslint/prefer-includes": "error",
|
"@typescript-eslint/prefer-includes": "error",
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"shared-node-browser": true,
|
"shared-node-browser": true,
|
||||||
"es6": true
|
"es6": true
|
||||||
},
|
},
|
||||||
"parserOptions": { "ecmaVersion": 2018 },
|
"parserOptions": {"ecmaVersion": 2018},
|
||||||
"globals": {
|
"globals": {
|
||||||
"assert": false,
|
"assert": false,
|
||||||
"casper": false,
|
"casper": false,
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
{
|
{
|
||||||
"defaultSeverity": "error",
|
"defaultSeverity": "error",
|
||||||
"extends": [
|
"extends": ["tslint:recommended"],
|
||||||
"tslint:recommended"
|
|
||||||
],
|
|
||||||
"jsRules": {},
|
"jsRules": {},
|
||||||
"rules": {},
|
"rules": {},
|
||||||
"rulesDirectory": []
|
"rulesDirectory": []
|
||||||
|
|
|
@ -45,17 +45,13 @@
|
||||||
"./static/js/loading.js",
|
"./static/js/loading.js",
|
||||||
"./static/styles/portico/billing.scss"
|
"./static/styles/portico/billing.scss"
|
||||||
],
|
],
|
||||||
"portico": [
|
"portico": ["./static/js/bundles/portico.js"],
|
||||||
"./static/js/bundles/portico.js"
|
|
||||||
],
|
|
||||||
"error-styles": [
|
"error-styles": [
|
||||||
"./static/third/bootstrap/css/bootstrap.css",
|
"./static/third/bootstrap/css/bootstrap.css",
|
||||||
"./static/third/bootstrap/css/bootstrap-responsive.css",
|
"./static/third/bootstrap/css/bootstrap-responsive.css",
|
||||||
"./static/styles/portico/portico-styles.scss"
|
"./static/styles/portico/portico-styles.scss"
|
||||||
],
|
],
|
||||||
"common": [
|
"common": ["./static/js/bundles/common.js"],
|
||||||
"./static/js/bundles/common.js"
|
|
||||||
],
|
|
||||||
"help": [
|
"help": [
|
||||||
"./static/js/bundles/portico.js",
|
"./static/js/bundles/portico.js",
|
||||||
"simplebar/dist/simplebar.css",
|
"simplebar/dist/simplebar.css",
|
||||||
|
@ -97,14 +93,8 @@
|
||||||
"./static/js/analytics/support.js",
|
"./static/js/analytics/support.js",
|
||||||
"./static/styles/app_components.scss"
|
"./static/styles/app_components.scss"
|
||||||
],
|
],
|
||||||
"dev-login": [
|
"dev-login": ["./static/js/bundles/portico.js", "./static/js/portico/dev-login.js"],
|
||||||
"./static/js/bundles/portico.js",
|
"desktop-login": ["./static/js/bundles/portico.js", "./static/js/portico/desktop-login.js"],
|
||||||
"./static/js/portico/dev-login.js"
|
|
||||||
],
|
|
||||||
"desktop-login": [
|
|
||||||
"./static/js/bundles/portico.js",
|
|
||||||
"./static/js/portico/desktop-login.js"
|
|
||||||
],
|
|
||||||
"desktop-redirect": [
|
"desktop-redirect": [
|
||||||
"./static/js/bundles/portico.js",
|
"./static/js/bundles/portico.js",
|
||||||
"./static/js/portico/desktop-redirect.js"
|
"./static/js/portico/desktop-redirect.js"
|
||||||
|
@ -128,11 +118,6 @@
|
||||||
"./static/js/stats/stats.js",
|
"./static/js/stats/stats.js",
|
||||||
"plotly.js/dist/plotly-basic.min.js"
|
"plotly.js/dist/plotly-basic.min.js"
|
||||||
],
|
],
|
||||||
"app": [
|
"app": ["./static/js/bundles/app.js", "katex/dist/katex.min.js"],
|
||||||
"./static/js/bundles/app.js",
|
"digest": ["./static/js/bundles/portico.js"]
|
||||||
"katex/dist/katex.min.js"
|
|
||||||
],
|
|
||||||
"digest": [
|
|
||||||
"./static/js/bundles/portico.js"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue