mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Format YAML and JSON Files With Prettier (#4304)
* ci: format yaml and json files with prettier * chore: add changelog entry * fix: format everything * ci: run pretter on all files * ci: rename prettier step
This commit is contained in:
parent
f933d9cdf2
commit
2233b46512
20 changed files with 303 additions and 268 deletions
|
@ -1,4 +1,4 @@
|
||||||
Checks: '-*,
|
Checks: "-*,
|
||||||
clang-diagnostic-*,
|
clang-diagnostic-*,
|
||||||
llvm-*,
|
llvm-*,
|
||||||
misc-*,
|
misc-*,
|
||||||
|
@ -30,7 +30,7 @@ Checks: '-*,
|
||||||
-readability-function-cognitive-complexity,
|
-readability-function-cognitive-complexity,
|
||||||
-bugprone-easily-swappable-parameters,
|
-bugprone-easily-swappable-parameters,
|
||||||
-cert-err58-cpp,
|
-cert-err58-cpp,
|
||||||
'
|
"
|
||||||
CheckOptions:
|
CheckOptions:
|
||||||
- key: readability-identifier-naming.ClassCase
|
- key: readability-identifier-naming.ClassCase
|
||||||
value: CamelCase
|
value: CamelCase
|
||||||
|
|
1
.github/ISSUE_TEMPLATE/a_make_a_report.yml
vendored
1
.github/ISSUE_TEMPLATE/a_make_a_report.yml
vendored
|
@ -50,4 +50,3 @@ body:
|
||||||
label: OS and Chatterino Version
|
label: OS and Chatterino Version
|
||||||
description: The name of your Operating System and the version shown in Chatterino's about settings page (⚙ -> about tab).
|
description: The name of your Operating System and the version shown in Chatterino's about settings page (⚙ -> about tab).
|
||||||
placeholder: Chatterino 2.3.5 (commit 81a62764, 2022-04-05) on Windows 10 Version 2009, kernel 10.0.19043
|
placeholder: Chatterino 2.3.5 (commit 81a62764, 2022-04-05) on Windows 10 Version 2009, kernel 10.0.19043
|
||||||
|
|
||||||
|
|
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
@ -164,7 +164,7 @@ jobs:
|
||||||
id: review
|
id: review
|
||||||
with:
|
with:
|
||||||
build_dir: build
|
build_dir: build
|
||||||
config_file: '.clang-tidy'
|
config_file: ".clang-tidy"
|
||||||
split_workflow: true
|
split_workflow: true
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
|
|
8
.github/workflows/changelog-check.yml
vendored
8
.github/workflows/changelog-check.yml
vendored
|
@ -2,8 +2,8 @@ name: Changelog Check
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [master]
|
||||||
types: [ opened, synchronize, reopened, ready_for_review, labeled, unlabeled ]
|
types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-changelog:
|
check-changelog:
|
||||||
|
@ -13,5 +13,5 @@ jobs:
|
||||||
- name: Changelog check
|
- name: Changelog check
|
||||||
uses: dangoslen/changelog-enforcer@v3
|
uses: dangoslen/changelog-enforcer@v3
|
||||||
with:
|
with:
|
||||||
changeLogPath: 'CHANGELOG.md'
|
changeLogPath: "CHANGELOG.md"
|
||||||
skipLabels: 'no changelog entry needed, ci, submodules'
|
skipLabels: "no changelog entry needed, ci, submodules"
|
||||||
|
|
8
.github/workflows/homebrew.yml
vendored
8
.github/workflows/homebrew.yml
vendored
|
@ -1,9 +1,9 @@
|
||||||
name: 'Publish Homebrew Cask on Release'
|
name: "Publish Homebrew Cask on Release"
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
# Should match semver for mainline releases (not including -beta)
|
# Should match semver for mainline releases (not including -beta)
|
||||||
- 'v2.[0-9]+.[0-9]+'
|
- "v2.[0-9]+.[0-9]+"
|
||||||
# TODO: handle beta and nightly releases
|
# TODO: handle beta and nightly releases
|
||||||
# Need to make those casks manually first
|
# Need to make those casks manually first
|
||||||
# - v2.[0-9]+.[0-9]+-beta(?:[0-9]+)
|
# - v2.[0-9]+.[0-9]+-beta(?:[0-9]+)
|
||||||
|
@ -16,8 +16,8 @@ env:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update_stable_homebrew_cask:
|
update_stable_homebrew_cask:
|
||||||
name: 'Update the stable homebrew cask'
|
name: "Update the stable homebrew cask"
|
||||||
runs-on: 'macos-latest'
|
runs-on: "macos-latest"
|
||||||
steps:
|
steps:
|
||||||
# Pulls out the version from the ref (e.g. refs/tags/v2.3.1 -> 2.3.1)
|
# Pulls out the version from the ref (e.g. refs/tags/v2.3.1 -> 2.3.1)
|
||||||
- name: Execute brew bump-cask-pr with version
|
- name: Execute brew bump-cask-pr with version
|
||||||
|
|
4
.github/workflows/lint.yml
vendored
4
.github/workflows/lint.yml
vendored
|
@ -18,8 +18,8 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Lint Markdown files
|
- name: Check formatting with Prettier
|
||||||
uses: actionsx/prettier@v2
|
uses: actionsx/prettier@v2
|
||||||
with:
|
with:
|
||||||
# prettier CLI arguments.
|
# prettier CLI arguments.
|
||||||
args: --check '**/*.md'
|
args: --check .
|
||||||
|
|
4
.github/workflows/post-clang-tidy-review.yml
vendored
4
.github/workflows/post-clang-tidy-review.yml
vendored
|
@ -12,7 +12,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: 'Download artifact'
|
- name: "Download artifact"
|
||||||
uses: actions/github-script@v6
|
uses: actions/github-script@v6
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
|
@ -32,7 +32,7 @@ jobs:
|
||||||
});
|
});
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
fs.writeFileSync('${{github.workspace}}/clang-tidy-review.zip', Buffer.from(download.data));
|
fs.writeFileSync('${{github.workspace}}/clang-tidy-review.zip', Buffer.from(download.data));
|
||||||
- name: 'Unzip artifact'
|
- name: "Unzip artifact"
|
||||||
run: unzip clang-tidy-review.zip
|
run: unzip clang-tidy-review.zip
|
||||||
|
|
||||||
- uses: ZedThree/clang-tidy-review/post@v0.10.1
|
- uses: ZedThree/clang-tidy-review/post@v0.10.1
|
||||||
|
|
|
@ -1,6 +1,23 @@
|
||||||
|
# emoji.json should remain minified
|
||||||
|
resources/emoji.json
|
||||||
|
|
||||||
# Ignore submodule files
|
# Ignore submodule files
|
||||||
lib/*/
|
lib/*/
|
||||||
conan-pkgs/*/
|
conan-pkgs/*/
|
||||||
cmake/sanitizers-cmake/
|
cmake/sanitizers-cmake/
|
||||||
|
|
||||||
.github/
|
# Build folders
|
||||||
|
*build-*/
|
||||||
|
[bB]uild
|
||||||
|
/_build/
|
||||||
|
|
||||||
|
# Editors
|
||||||
|
.vscode
|
||||||
|
.vs
|
||||||
|
.idea
|
||||||
|
dependencies
|
||||||
|
.cache
|
||||||
|
.editorconfig
|
||||||
|
|
||||||
|
# vcpkg
|
||||||
|
vcpkg_installed/
|
||||||
|
|
6
.prettierrc
Normal file
6
.prettierrc
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
trailingComma: es5
|
||||||
|
endOfLine: auto
|
||||||
|
overrides:
|
||||||
|
- files: "*.md"
|
||||||
|
options:
|
||||||
|
proseWrap: preserve
|
|
@ -1,6 +0,0 @@
|
||||||
trailingComma = "es5"
|
|
||||||
|
|
||||||
[[overrides]]
|
|
||||||
files = ["*.md"]
|
|
||||||
[overrides.options]
|
|
||||||
proseWrap = "preserve"
|
|
|
@ -35,6 +35,7 @@
|
||||||
- Dev: Fixed `inconsistent-missing-override` warnings. (#4296)
|
- Dev: Fixed `inconsistent-missing-override` warnings. (#4296)
|
||||||
- Dev: Fixed `final-dtor-non-final-class` warnings. (#4296)
|
- Dev: Fixed `final-dtor-non-final-class` warnings. (#4296)
|
||||||
- Dev: Fixed `ambiguous-reversed-operator` warnings. (#4296)
|
- Dev: Fixed `ambiguous-reversed-operator` warnings. (#4296)
|
||||||
|
- Dev: Format YAML and JSON files with prettier. (#4304)
|
||||||
|
|
||||||
## 2.4.0
|
## 2.4.0
|
||||||
|
|
||||||
|
|
|
@ -9,14 +9,13 @@ AllowShortLoopsOnASingleLine: false
|
||||||
AlwaysBreakAfterDefinitionReturnType: false
|
AlwaysBreakAfterDefinitionReturnType: false
|
||||||
AlwaysBreakBeforeMultilineStrings: false
|
AlwaysBreakBeforeMultilineStrings: false
|
||||||
BasedOnStyle: Google
|
BasedOnStyle: Google
|
||||||
BraceWrapping: {
|
BraceWrapping:
|
||||||
AfterClass: 'true'
|
AfterClass: "true"
|
||||||
AfterControlStatement: 'true'
|
AfterControlStatement: "true"
|
||||||
AfterFunction: 'true'
|
AfterFunction: "true"
|
||||||
AfterNamespace: 'false'
|
AfterNamespace: "false"
|
||||||
BeforeCatch: 'true'
|
BeforeCatch: "true"
|
||||||
BeforeElse: 'true'
|
BeforeElse: "true"
|
||||||
}
|
|
||||||
BreakBeforeBraces: Custom
|
BreakBeforeBraces: Custom
|
||||||
BreakConstructorInitializersBeforeComma: true
|
BreakConstructorInitializersBeforeComma: true
|
||||||
ColumnLimit: 80
|
ColumnLimit: 80
|
||||||
|
@ -27,7 +26,28 @@ IndentCaseLabels: true
|
||||||
IndentWidth: 4
|
IndentWidth: 4
|
||||||
IndentWrappedFunctionNames: true
|
IndentWrappedFunctionNames: true
|
||||||
IndentPPDirectives: AfterHash
|
IndentPPDirectives: AfterHash
|
||||||
IncludeBlocks: Preserve
|
SortIncludes: CaseInsensitive
|
||||||
|
IncludeBlocks: Regroup
|
||||||
|
IncludeCategories:
|
||||||
|
# Project includes
|
||||||
|
- Regex: '^"[a-zA-Z\._-]+(/[a-zA-Z0-9\._-]+)*"$'
|
||||||
|
Priority: 1
|
||||||
|
# Third party library includes
|
||||||
|
- Regex: '<[[:alnum:].]+/[a-zA-Z0-9\._\/-]+>'
|
||||||
|
Priority: 3
|
||||||
|
# Qt includes
|
||||||
|
- Regex: '^<Q[a-zA-Z0-9\._\/-]+>$'
|
||||||
|
Priority: 3
|
||||||
|
CaseSensitive: true
|
||||||
|
# LibCommuni includes
|
||||||
|
- Regex: "^<Irc[a-zA-Z]+>$"
|
||||||
|
Priority: 3
|
||||||
|
# Misc libraries
|
||||||
|
- Regex: '^<[a-zA-Z_0-9]+\.h(pp)?>$'
|
||||||
|
Priority: 3
|
||||||
|
# Standard library includes
|
||||||
|
- Regex: "^<[a-zA-Z_]+>$"
|
||||||
|
Priority: 4
|
||||||
NamespaceIndentation: Inner
|
NamespaceIndentation: Inner
|
||||||
PointerBindsToType: false
|
PointerBindsToType: false
|
||||||
SpacesBeforeTrailingComments: 2
|
SpacesBeforeTrailingComments: 2
|
||||||
|
|
|
@ -9,14 +9,13 @@ AllowShortLoopsOnASingleLine: false
|
||||||
AlwaysBreakAfterDefinitionReturnType: false
|
AlwaysBreakAfterDefinitionReturnType: false
|
||||||
AlwaysBreakBeforeMultilineStrings: false
|
AlwaysBreakBeforeMultilineStrings: false
|
||||||
BasedOnStyle: Google
|
BasedOnStyle: Google
|
||||||
BraceWrapping: {
|
BraceWrapping:
|
||||||
AfterClass: 'true'
|
AfterClass: "true"
|
||||||
AfterControlStatement: 'true'
|
AfterControlStatement: "true"
|
||||||
AfterFunction: 'true'
|
AfterFunction: "true"
|
||||||
AfterNamespace: 'false'
|
AfterNamespace: "false"
|
||||||
BeforeCatch: 'true'
|
BeforeCatch: "true"
|
||||||
BeforeElse: 'true'
|
BeforeElse: "true"
|
||||||
}
|
|
||||||
BreakBeforeBraces: Custom
|
BreakBeforeBraces: Custom
|
||||||
BreakConstructorInitializersBeforeComma: true
|
BreakConstructorInitializersBeforeComma: true
|
||||||
ColumnLimit: 80
|
ColumnLimit: 80
|
||||||
|
@ -30,24 +29,24 @@ IndentPPDirectives: AfterHash
|
||||||
SortIncludes: CaseInsensitive
|
SortIncludes: CaseInsensitive
|
||||||
IncludeBlocks: Regroup
|
IncludeBlocks: Regroup
|
||||||
IncludeCategories:
|
IncludeCategories:
|
||||||
# Project includes
|
# Project includes
|
||||||
- Regex: '^"[a-zA-Z\._-]+(/[a-zA-Z0-9\._-]+)*"$'
|
- Regex: '^"[a-zA-Z\._-]+(/[a-zA-Z0-9\._-]+)*"$'
|
||||||
Priority: 1
|
Priority: 1
|
||||||
# Third party library includes
|
# Third party library includes
|
||||||
- Regex: '<[[:alnum:].]+/[a-zA-Z0-9\._\/-]+>'
|
- Regex: '<[[:alnum:].]+/[a-zA-Z0-9\._\/-]+>'
|
||||||
Priority: 3
|
Priority: 3
|
||||||
# Qt includes
|
# Qt includes
|
||||||
- Regex: '^<Q[a-zA-Z0-9\._\/-]+>$'
|
- Regex: '^<Q[a-zA-Z0-9\._\/-]+>$'
|
||||||
Priority: 3
|
Priority: 3
|
||||||
CaseSensitive: true
|
CaseSensitive: true
|
||||||
# LibCommuni includes
|
# LibCommuni includes
|
||||||
- Regex: '^<Irc[a-zA-Z]+>$'
|
- Regex: "^<Irc[a-zA-Z]+>$"
|
||||||
Priority: 3
|
Priority: 3
|
||||||
# Misc libraries
|
# Misc libraries
|
||||||
- Regex: '^<[a-zA-Z_0-9]+\.h(pp)?>$'
|
- Regex: '^<[a-zA-Z_0-9]+\.h(pp)?>$'
|
||||||
Priority: 3
|
Priority: 3
|
||||||
# Standard library includes
|
# Standard library includes
|
||||||
- Regex: '^<[a-zA-Z_]+>$'
|
- Regex: "^<[a-zA-Z_]+>$"
|
||||||
Priority: 4
|
Priority: 4
|
||||||
NamespaceIndentation: Inner
|
NamespaceIndentation: Inner
|
||||||
PointerBindsToType: false
|
PointerBindsToType: false
|
||||||
|
|
|
@ -9,14 +9,13 @@ AllowShortLoopsOnASingleLine: false
|
||||||
AlwaysBreakAfterDefinitionReturnType: false
|
AlwaysBreakAfterDefinitionReturnType: false
|
||||||
AlwaysBreakBeforeMultilineStrings: false
|
AlwaysBreakBeforeMultilineStrings: false
|
||||||
BasedOnStyle: Google
|
BasedOnStyle: Google
|
||||||
BraceWrapping: {
|
BraceWrapping:
|
||||||
AfterClass: 'true'
|
AfterClass: "true"
|
||||||
AfterControlStatement: 'true'
|
AfterControlStatement: "true"
|
||||||
AfterFunction: 'true'
|
AfterFunction: "true"
|
||||||
AfterNamespace: 'false'
|
AfterNamespace: "false"
|
||||||
BeforeCatch: 'true'
|
BeforeCatch: "true"
|
||||||
BeforeElse: 'true'
|
BeforeElse: "true"
|
||||||
}
|
|
||||||
BreakBeforeBraces: Custom
|
BreakBeforeBraces: Custom
|
||||||
BreakConstructorInitializersBeforeComma: true
|
BreakConstructorInitializersBeforeComma: true
|
||||||
ColumnLimit: 80
|
ColumnLimit: 80
|
||||||
|
@ -30,24 +29,24 @@ IndentPPDirectives: AfterHash
|
||||||
SortIncludes: CaseInsensitive
|
SortIncludes: CaseInsensitive
|
||||||
IncludeBlocks: Regroup
|
IncludeBlocks: Regroup
|
||||||
IncludeCategories:
|
IncludeCategories:
|
||||||
# Project includes
|
# Project includes
|
||||||
- Regex: '^"[a-zA-Z\._-]+(/[a-zA-Z0-9\._-]+)*"$'
|
- Regex: '^"[a-zA-Z\._-]+(/[a-zA-Z0-9\._-]+)*"$'
|
||||||
Priority: 1
|
Priority: 1
|
||||||
# Third party library includes
|
# Third party library includes
|
||||||
- Regex: '<[[:alnum:].]+/[a-zA-Z0-9\._\/-]+>'
|
- Regex: '<[[:alnum:].]+/[a-zA-Z0-9\._\/-]+>'
|
||||||
Priority: 3
|
Priority: 3
|
||||||
# Qt includes
|
# Qt includes
|
||||||
- Regex: '^<Q[a-zA-Z0-9\._\/-]+>$'
|
- Regex: '^<Q[a-zA-Z0-9\._\/-]+>$'
|
||||||
Priority: 3
|
Priority: 3
|
||||||
CaseSensitive: true
|
CaseSensitive: true
|
||||||
# LibCommuni includes
|
# LibCommuni includes
|
||||||
- Regex: '^<Irc[a-zA-Z]+>$'
|
- Regex: "^<Irc[a-zA-Z]+>$"
|
||||||
Priority: 3
|
Priority: 3
|
||||||
# Misc libraries
|
# Misc libraries
|
||||||
- Regex: '^<[a-zA-Z_0-9]+\.h(pp)?>$'
|
- Regex: '^<[a-zA-Z_0-9]+\.h(pp)?>$'
|
||||||
Priority: 3
|
Priority: 3
|
||||||
# Standard library includes
|
# Standard library includes
|
||||||
- Regex: '^<[a-zA-Z_]+>$'
|
- Regex: "^<[a-zA-Z_]+>$"
|
||||||
Priority: 4
|
Priority: 4
|
||||||
NamespaceIndentation: Inner
|
NamespaceIndentation: Inner
|
||||||
PointerBindsToType: false
|
PointerBindsToType: false
|
||||||
|
|
Loading…
Reference in a new issue