mirror of https://github.com/zulip/zulip.git
lint: Use Prettier for JSON files.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
40be4df57a
commit
2e029eb58b
|
@ -3,19 +3,22 @@ root = true
|
||||||
[*]
|
[*]
|
||||||
end_of_line = lf
|
end_of_line = lf
|
||||||
charset = utf-8
|
charset = utf-8
|
||||||
trim_trailing_whitespace = true
|
|
||||||
insert_final_newline = true
|
|
||||||
|
|
||||||
[*.{sh,py,pyi,js,ts,json,xml,css,scss,hbs,html}]
|
|
||||||
indent_style = space
|
indent_style = space
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.{sh,py,pyi,xml,css,scss,hbs,html}]
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
|
||||||
[*.py]
|
[{*.{js,json,ts},check-openapi}]
|
||||||
max_line_length = 110
|
indent_size = 4
|
||||||
|
|
||||||
[*.{js,ts}]
|
|
||||||
max_line_length = 100
|
max_line_length = 100
|
||||||
|
|
||||||
[*.{svg,rb,pp}]
|
[*.{py,pyi}]
|
||||||
indent_style = space
|
max_line_length = 110
|
||||||
|
|
||||||
|
[*.{svg,rb,pp,yaml,yml}]
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[package.json]
|
||||||
indent_size = 2
|
indent_size = 2
|
||||||
|
|
|
@ -1 +1,6 @@
|
||||||
|
/corporate/tests/stripe_fixtures
|
||||||
|
/locale
|
||||||
/static/third
|
/static/third
|
||||||
|
/tools/setup/emoji/emoji_map.json
|
||||||
|
/zerver/tests/fixtures
|
||||||
|
/zerver/webhooks/*/fixtures
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
bracketSpacing: false,
|
bracketSpacing: false,
|
||||||
tabWidth: 4,
|
|
||||||
trailingComma: "all",
|
trailingComma: "all",
|
||||||
overrides: [
|
overrides: [
|
||||||
{
|
{
|
||||||
|
@ -10,9 +9,10 @@ module.exports = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
files: ["**.yml", "**.yaml"],
|
files: ["tsconfig.json"],
|
||||||
options: {
|
options: {
|
||||||
tabWidth: 2,
|
parser: "json5",
|
||||||
|
quoteProps: "preserve",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
|
@ -94,7 +94,7 @@ def run() -> None:
|
||||||
description="Sorts Python import statements",
|
description="Sorts Python import statements",
|
||||||
check_arg=['--check-only', '--diff'])
|
check_arg=['--check-only', '--diff'])
|
||||||
linter_config.external_linter('prettier', ['node_modules/.bin/prettier', '--check'],
|
linter_config.external_linter('prettier', ['node_modules/.bin/prettier', '--check'],
|
||||||
['js', 'ts', 'yaml', 'yml'],
|
['js', 'json', 'ts', 'yaml', 'yml'],
|
||||||
fix_arg=['--write'],
|
fix_arg=['--write'],
|
||||||
description="Formats JavaScript and YAML",
|
description="Formats JavaScript and YAML",
|
||||||
# https://github.com/prettier/prettier/pull/8703
|
# https://github.com/prettier/prettier/pull/8703
|
||||||
|
|
Loading…
Reference in New Issue