Skip to content

Commit ff6f899

Browse files
authored
build: enable toml-sort-fix (#1949)
Partial: AAP-44002
1 parent 6e8b22b commit ff6f899

File tree

8 files changed

+53
-37
lines changed

8 files changed

+53
-37
lines changed

.config/dictionary.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ suboptions
242242
subshells
243243
sysninja
244244
seccomp
245+
tamasfe
245246
taskfile
246247
tasklist
247248
testenv
@@ -254,6 +255,7 @@ tls
254255
toctree
255256
todos
256257
tomaciazek
258+
tomlsort
257259
towerhost
258260
towncrier
259261
toxenv

.config/mise.toml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
[env]
2+
# https://github.com/nodejs/corepack/issues/550
3+
COREPACK_ENABLE_DOWNLOAD_PROMPT = 0
24
# Command such `yarn webpack-dev` might fail with
35
# Reached heap limit Allocation failed - JavaScript heap out of memory
46
# https://nodejs.org/api/cli.html#--max-old-space-sizesize-in-megabytes
57
# default 16 MiB for 64-bit systems and 8 MiB for 32-bit systems
68
NODE_OPTIONS = "--max-old-space-size=8192"
7-
89
# 'vsa' is acronym for 'visual studio ansible'
910
# we use HOME location below to avoid polluting the project directory with,
1011
# temporary data and to allow us to mount the codebase on multiple machines
1112
# for build and testing purposes.
1213
VIRTUAL_ENV = "{{ xdg_cache_home }}/.local/share/virtualenvs/vsa"
1314

14-
# https://github.com/nodejs/corepack/issues/550
15-
COREPACK_ENABLE_DOWNLOAD_PROMPT = 0
15+
# Do not use other hooks than preinstall or postinstall because they will
16+
# not work without 'mise activate' command, something that we do not use on CI.
17+
[hooks]
1618

1719
[settings]
1820
# Needs to be enabled for hooks to work
@@ -21,10 +23,3 @@ experimental = true
2123
[tools]
2224
# do not add tools unsupported on windows such: gh, yarn
2325
direnv = "latest"
24-
25-
[hooks]
26-
# Do not use other hooks than preinstall or postinstall because they will
27-
# not work without 'mise activate' command, something that we do not use on CI.
28-
29-
# Enabling corepack will install the `pnpm` package manager specified in package.json
30-
preinstall = "bash -c 'echo 123'"

.gitleaks.toml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
[allowlist]
2-
description = "Global Allowlist"
3-
4-
# Ignore based on any subset of the file path
5-
paths = [
6-
# Ignore yarn
7-
'''\.yarn''',
8-
]
2+
description = "Global Allowlist"
3+
# Ignore based on any subset of the file path
4+
paths = [
5+
# Ignore yarn
6+
'''\.yarn'''
7+
]

.pre-commit-config.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ exclude: >
2020
)$
2121
minimum_pre_commit_version: 4.0.0 # Related to https://github.com/ekalinin/nodeenv/issues/369
2222
repos:
23+
- repo: https://github.com/pappasam/toml-sort
24+
rev: v0.24.2
25+
hooks:
26+
- id: toml-sort-fix
2327
- repo: https://github.com/astral-sh/ruff-pre-commit
2428
rev: "v0.11.6"
2529
hooks:
@@ -30,9 +34,6 @@ repos:
3034
rev: v8.17.3
3135
hooks:
3236
- id: cspell
33-
args:
34-
- --config=cspell.config.yaml
35-
# name: Spell check with cspell
3637
- repo: https://github.com/codespell-project/codespell
3738
rev: v2.4.1
3839
hooks:

.taplo.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[formatting]
2+
# cspell: disable-next-line
3+
# compatibility between toml-sort-fix pre-commit hook and panekj.even-betterer-toml extension
4+
align_comments = false
5+
array_trailing_comma = false
6+
compact_arrays = true
7+
compact_entries = false
8+
compact_inline_tables = true
9+
inline_table_expand = false
10+
reorder_keys = true

.vscode/extensions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
22
"recommendations": [
3-
"DavidAnson.vscode-markdownlint",
43
"charliermarsh.ruff",
4+
"DavidAnson.vscode-markdownlint",
55
"dbaeumer.vscode-eslint",
66
"esbenp.prettier-vscode",
77
"hbenl.vscode-mocha-test-adapter",
8+
"tamasfe.even-better-toml",
89
"timonwong.shellcheck"
910
],
1011
"unwantedRecommendations": ["ms-python.black-formatter"]

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
"[typescript]": {
1414
"editor.defaultFormatter": "esbenp.prettier-vscode"
1515
},
16+
"[toml]": {
17+
"editor.defaultFormatter": "tamasfe.even-better-toml"
18+
},
1619
"[shellscript]": {
1720
"editor.tabSize": 4
1821
},

pyproject.toml

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@ skip = "out,node_modules,.mypy_cache,.ruff_cache,site,codicon.css,yarn.lock,pack
99
# vscode python extension from showing errors while trying to collect tests.
1010
[tool.pytest.ini_options]
1111
norecursedirs = [
12-
"*.egg",
13-
".cache",
14-
".eggs",
15-
".git",
16-
".github",
17-
".mypy_cache",
18-
".projects",
19-
".tox",
20-
"build",
21-
"collections",
22-
"dist",
23-
"docs",
24-
"out",
25-
"node_modules",
12+
"*.egg",
13+
".cache",
14+
".eggs",
15+
".git",
16+
".github",
17+
".mypy_cache",
18+
".projects",
19+
".tox",
20+
"build",
21+
"collections",
22+
"dist",
23+
"docs",
24+
"out",
25+
"node_modules"
2626
]
2727

2828
[tool.ruff]
@@ -31,7 +31,14 @@ fix = true
3131
line-length = 100
3232
target-version = "py310"
3333

34+
[tool.tomlsort]
35+
in_place = true
36+
sort_inline_tables = true
37+
sort_table_keys = true
38+
3439
[tool.uv.pip]
40+
annotation-style = "line"
41+
custom-compile-command = "task -e deps"
3542
no-emit-package = [
3643
"ansible-core",
3744
"exceptiongroup", # <py311
@@ -44,5 +51,3 @@ no-emit-package = [
4451
"wheel",
4552
"uv"
4653
]
47-
annotation-style = "line"
48-
custom-compile-command = "task -e deps"

0 commit comments

Comments
 (0)