Skip to content

Commit bd1bbfe

Browse files
authored
Enhance Code Consistency Across Repository with .editorconfig (#19023)
1 parent 226afd4 commit bd1bbfe

File tree

274 files changed

+1271
-1217
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

274 files changed

+1271
-1217
lines changed

.devcontainer/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ if you see such error message when you open this project in codespaces:
3434
![Alt text](troubleshooting.png)
3535

3636
a simple workaround is change `/signin` endpoint into another one, then login with GitHub account and close the tab, then change it back to `/signin` endpoint. Then all things will be fine.
37-
The reason is `signin` endpoint is not allowed in codespaces, details can be found [here](https://github.com/orgs/community/discussions/5204)
37+
The reason is `signin` endpoint is not allowed in codespaces, details can be found [here](https://github.com/orgs/community/discussions/5204)

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// README at: https://github.com/devcontainers/templates/tree/main/src/anaconda
33
{
44
"name": "Python 3.12",
5-
"build": {
5+
"build": {
66
"context": "..",
77
"dockerfile": "Dockerfile"
88
},

.devcontainer/noop.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
This file copied into the container along with environment.yml* from the parent
2-
folder. This file is included to prevents the Dockerfile COPY instruction from
3-
failing if no environment.yml is found.
2+
folder. This file is included to prevents the Dockerfile COPY instruction from
3+
failing if no environment.yml is found.

web/.editorconfig renamed to .editorconfig

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,35 @@ root = true
55

66
# Unix-style newlines with a newline ending every file
77
[*]
8+
charset = utf-8
89
end_of_line = lf
910
insert_final_newline = true
11+
trim_trailing_whitespace = true
12+
13+
[*.py]
14+
indent_size = 4
15+
indent_style = space
16+
17+
[*.{yml,yaml}]
18+
indent_style = space
19+
indent_size = 2
20+
21+
[*.toml]
22+
indent_size = 4
23+
indent_style = space
24+
25+
# Markdown and MDX are whitespace sensitive languages.
26+
# Do not remove trailing spaces.
27+
[*.{md,mdx}]
28+
trim_trailing_whitespace = false
1029

1130
# Matches multiple files with brace expansion notation
1231
# Set default charset
1332
[*.{js,tsx}]
14-
charset = utf-8
1533
indent_style = space
1634
indent_size = 2
1735

18-
19-
# Matches the exact files either package.json or .travis.yml
20-
[{package.json,.travis.yml}]
36+
# Matches the exact files package.json
37+
[package.json]
2138
indent_style = space
2239
indent_size = 2

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Ensure that .sh scripts use LF as line separator, even if they are checked out
2-
# to Windows(NTFS) file-system, by a user of Docker for Windows.
2+
# to Windows(NTFS) file-system, by a user of Docker for Windows.
33
# These .sh scripts will be run from the Container after `docker compose up -d`.
44
# If they appear to be CRLF style, Dash from the Container will fail to execute
55
# them.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"Verbose": false,
3+
"Debug": false,
4+
"IgnoreDefaults": false,
5+
"SpacesAfterTabs": false,
6+
"NoColor": false,
7+
"Exclude": [
8+
"^web/public/vs/",
9+
"^web/public/pdf.worker.min.mjs$",
10+
"web/app/components/base/icons/src/vender/"
11+
],
12+
"AllowedContentTypes": [],
13+
"PassedFiles": [],
14+
"Disable": {
15+
"EndOfLine": false,
16+
"Indentation": false,
17+
"IndentSize": true,
18+
"InsertFinalNewline": false,
19+
"TrimTrailingWhitespace": false,
20+
"MaxLineLength": false
21+
}
22+
}

.github/workflows/style.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ concurrency:
99
group: style-${{ github.head_ref || github.run_id }}
1010
cancel-in-progress: true
1111

12+
permissions:
13+
checks: write
14+
statuses: write
15+
contents: read
16+
17+
1218
jobs:
1319
python-style:
1420
name: Python Style
@@ -163,3 +169,14 @@ jobs:
163169
VALIDATE_DOCKERFILE_HADOLINT: true
164170
VALIDATE_XML: true
165171
VALIDATE_YAML: true
172+
173+
- name: EditorConfig checks
174+
uses: super-linter/super-linter/slim@v7
175+
env:
176+
DEFAULT_BRANCH: main
177+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
178+
IGNORE_GENERATED_FILES: true
179+
IGNORE_GITIGNORED_FILES: true
180+
# EditorConfig validation
181+
VALIDATE_EDITORCONFIG: true
182+
EDITORCONFIG_FILE_NAME: editorconfig-checker.json

CONTRIBUTING_ES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,4 @@ Recomendamos revisar este documento cuidadosamente antes de proceder con la conf
9090
No dudes en contactarnos si encuentras algún problema durante el proceso de configuración.
9191
## Obteniendo Ayuda
9292

93-
Si alguna vez te quedas atascado o tienes una pregunta urgente mientras contribuyes, simplemente envíanos tus consultas a través del issue relacionado de GitHub, o únete a nuestro [Discord](https://discord.gg/8Tpq4AcN9c) para una charla rápida.
93+
Si alguna vez te quedas atascado o tienes una pregunta urgente mientras contribuyes, simplemente envíanos tus consultas a través del issue relacionado de GitHub, o únete a nuestro [Discord](https://discord.gg/8Tpq4AcN9c) para una charla rápida.

CONTRIBUTING_FR.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,4 @@ Nous recommandons de revoir attentivement ce document avant de procéder à la c
9090
N'hésitez pas à nous contacter si vous rencontrez des problèmes pendant le processus de configuration.
9191
## Obtenir de l'aide
9292

93-
Si jamais vous êtes bloqué ou avez une question urgente en contribuant, envoyez-nous simplement vos questions via le problème GitHub concerné, ou rejoignez notre [Discord](https://discord.gg/8Tpq4AcN9c) pour une discussion rapide.
93+
Si jamais vous êtes bloqué ou avez une question urgente en contribuant, envoyez-nous simplement vos questions via le problème GitHub concerné, ou rejoignez notre [Discord](https://discord.gg/8Tpq4AcN9c) pour une discussion rapide.

CONTRIBUTING_KR.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,4 @@ PR 설명에 기존 이슈를 연결하거나 새 이슈를 여는 것을 잊지
9090
설정 과정에서 문제가 발생하면 언제든지 연락해 주세요.
9191
## 도움 받기
9292

93-
기여하는 동안 막히거나 긴급한 질문이 있으면, 관련 GitHub 이슈를 통해 질문을 보내거나, 빠른 대화를 위해 우리의 [Discord](https://discord.gg/8Tpq4AcN9c)에 참여하세요.
93+
기여하는 동안 막히거나 긴급한 질문이 있으면, 관련 GitHub 이슈를 통해 질문을 보내거나, 빠른 대화를 위해 우리의 [Discord](https://discord.gg/8Tpq4AcN9c)에 참여하세요.

0 commit comments

Comments
 (0)