chore(style): Sort JSON keys in translations/en.json (#20785)
Sorts keys (non-recursively) in translations/en.json. The solution uses the prettier plugin https://github.com/Gudahtt/prettier-plugin-sort-json. We only format translations/en.json because it’s the only file we need to manually change. - Dependency added: prettier-plugin-sort-json version 4.0.0 - Dependency upgraded: prettier, from version 2.8.8 to 3.3.3.
This commit is contained in:
parent
06b2996167
commit
cec46f985a
|
@ -1,10 +1,15 @@
|
||||||
*
|
/*
|
||||||
|
|
||||||
|
# Format top-level js files.
|
||||||
!*.js
|
!*.js
|
||||||
!*/
|
|
||||||
*.clj-kondo
|
# Ignore all except src/js/**/*.js
|
||||||
*.shadow-cljs
|
!/src/
|
||||||
modules
|
/src/*
|
||||||
result
|
!/src/js
|
||||||
target
|
!/src/js/**/*.js
|
||||||
component-spec
|
|
||||||
/app
|
# Ignore all except translations/en.json
|
||||||
|
!/translations/
|
||||||
|
/translations/*
|
||||||
|
!/translations/en.json
|
||||||
|
|
|
@ -6,4 +6,8 @@ module.exports = {
|
||||||
tabWidth: 2,
|
tabWidth: 2,
|
||||||
trailingComma: 'all',
|
trailingComma: 'all',
|
||||||
useTabs: false,
|
useTabs: false,
|
||||||
|
|
||||||
|
// JSON sorting
|
||||||
|
jsonSortOrder: '{ "/.*/": "caseInsensitiveLexical" } ',
|
||||||
|
plugins: ['prettier-plugin-sort-json'],
|
||||||
};
|
};
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -317,7 +317,7 @@ lint: ##@test Run code style checks
|
||||||
scripts/lint/translations.clj && \
|
scripts/lint/translations.clj && \
|
||||||
zprint '{:search-config? true}' -sfc $$ALL_CLOJURE_FILES && \
|
zprint '{:search-config? true}' -sfc $$ALL_CLOJURE_FILES && \
|
||||||
sh scripts/lint/trailing-newline.sh && \
|
sh scripts/lint/trailing-newline.sh && \
|
||||||
node_modules/.bin/prettier --write .
|
node_modules/.bin/prettier --check .
|
||||||
|
|
||||||
# NOTE: We run the linter twice because of https://github.com/kkinnear/zprint/issues/271
|
# NOTE: We run the linter twice because of https://github.com/kkinnear/zprint/issues/271
|
||||||
lint-fix: export TARGET := clojure
|
lint-fix: export TARGET := clojure
|
||||||
|
|
|
@ -97,7 +97,8 @@
|
||||||
"jest-silent-reporter": "^0.5.0",
|
"jest-silent-reporter": "^0.5.0",
|
||||||
"nodemon": "^2.0.16",
|
"nodemon": "^2.0.16",
|
||||||
"nyc": "^14.1.1",
|
"nyc": "^14.1.1",
|
||||||
"prettier": "^2.8.8",
|
"prettier": "^3.3.3",
|
||||||
|
"prettier-plugin-sort-json": "^4.0.0",
|
||||||
"process": "0.11.10",
|
"process": "0.11.10",
|
||||||
"react-test-renderer": "18.1.0",
|
"react-test-renderer": "18.1.0",
|
||||||
"shadow-cljs": "2.26.2",
|
"shadow-cljs": "2.26.2",
|
||||||
|
|
3167
translations/en.json
3167
translations/en.json
File diff suppressed because it is too large
Load Diff
13
yarn.lock
13
yarn.lock
|
@ -9058,10 +9058,15 @@ prepend-http@^2.0.0:
|
||||||
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897"
|
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897"
|
||||||
integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=
|
integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=
|
||||||
|
|
||||||
prettier@^2.8.8:
|
prettier-plugin-sort-json@^4.0.0:
|
||||||
version "2.8.8"
|
version "4.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da"
|
resolved "https://registry.yarnpkg.com/prettier-plugin-sort-json/-/prettier-plugin-sort-json-4.0.0.tgz#b72a44b57183dd7f8cef5c07a0614f21d29a0e4a"
|
||||||
integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==
|
integrity sha512-zV5g+bWFD2zAqyQ8gCkwUTC49o9FxslaUdirwivt5GZHcf57hCocavykuyYqbExoEsuBOg8IU36OY7zmVEMOWA==
|
||||||
|
|
||||||
|
prettier@^3.3.3:
|
||||||
|
version "3.3.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.3.3.tgz#30c54fe0be0d8d12e6ae61dbb10109ea00d53105"
|
||||||
|
integrity sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==
|
||||||
|
|
||||||
pretty-format@^25.5.0:
|
pretty-format@^25.5.0:
|
||||||
version "25.5.0"
|
version "25.5.0"
|
||||||
|
|
Loading…
Reference in New Issue