switch and run local prettier

This commit is contained in:
Aminda Suomalainen 2024-06-20 08:52:00 +03:00
parent 2dc78601d7
commit 453a173004
Signed by: Mikaela
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q
15 changed files with 51 additions and 12 deletions

2
.gitattributes vendored
View File

@ -1 +1 @@
* text=auto eol=lf linguist-detectable * text=auto eol=lf linguist-detectable

View File

@ -1,3 +1,5 @@
# @format
version: 2 version: 2
updates: updates:
- package-ecosystem: "github-actions" - package-ecosystem: "github-actions"

View File

@ -1,3 +1,5 @@
# @format
on: on:
push: push:
paths: paths:

2
.gitignore vendored
View File

@ -6,6 +6,8 @@
!.github !.github
!.gitignore !.gitignore
!.pre-commit-config.yaml !.pre-commit-config.yaml
!.prettierrc
# Other ignores # Other ignores
node_modules node_modules
pnpm-lock.yaml

View File

@ -1,8 +1,11 @@
# @format
# See https://pre-commit.com for more information # See https://pre-commit.com for more information
# See https://pre-commit.ci for more information # See https://pre-commit.ci for more information
ci: ci:
# https://github.com/pre-commit-ci/issues/issues/83 # https://github.com/pre-commit-ci/issues/issues/83
autoupdate_schedule: quarterly autoupdate_schedule: quarterly
skip: [prettier]
default_language_version: default_language_version:
python: pypy3 python: pypy3
@ -34,10 +37,12 @@ repos:
- id: check-dependabot - id: check-dependabot
- id: check-github-workflows - id: check-github-workflows
- repo: https://github.com/pre-commit/mirrors-prettier - repo: local
rev: "v4.0.0-alpha.8"
hooks: hooks:
- id: prettier - id: prettier
name: prettier
entry: pnpm exec prettier --cache --ignore-unknown --write
language: system
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python - repo: https://github.com/editorconfig-checker/editorconfig-checker.python
rev: "2.7.3" rev: "2.7.3"

7
.prettierrc Normal file
View File

@ -0,0 +1,7 @@
{
"insertPragma": true,
"proseWrap": "always",
"singleAttributePerLine": true,
"plugins": ["prettier-plugin-sh"],
"overrides": [{ "files": ".prettierrc", "options": { "parser": "json" } }]
}

View File

@ -1,3 +1,5 @@
# @format
cff-version: 1.2.0 cff-version: 1.2.0
message: "If you use this, please cite it as below." message: "If you use this, please cite it as below."
authors: authors:

View File

@ -1,4 +1,4 @@
# PRs touching any file will require my review # PRs touching any file will require my review
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#example-of-a-codeowners-file # https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#example-of-a-codeowners-file
# NOTE: This will not affect other repositories even being in .github :( # NOTE: This will not affect other repositories even being in .github :(
* @Mikaela * @Mikaela

View File

@ -1 +1,3 @@
<!-- @format -->
Please refer to [aminda.eu/discuss#rules](https://aminda.eu/discuss.html#rules). Please refer to [aminda.eu/discuss#rules](https://aminda.eu/discuss.html#rules).

View File

@ -1,14 +1,16 @@
<!-- @format -->
# Contributing # Contributing
Contributions are welcomed assuming my repositories are the correct place Contributions are welcomed assuming my repositories are the correct place for it
for it (the target is my repository or a PR I have open to another repository). (the target is my repository or a PR I have open to another repository).
Issues being assigned to me doesn't matter, I use that just as a tool for Issues being assigned to me doesn't matter, I use that just as a tool for
rediscovering them easily, http://github.com/issues?q=is:open%20assignee:Mikaela rediscovering them easily, http://github.com/issues?q=is:open%20assignee:Mikaela
I also accept PRs to repositories that are mirrors (if that is easier for you I also accept PRs to repositories that are mirrors (if that is easier for you
than opening at the original location) as patches are easy enough to export than opening at the original location) as patches are easy enough to export from
from GitHub or `git remote`s to use, the merge might just take a bit longer GitHub or `git remote`s to use, the merge might just take a bit longer
(including the time the mirror takes to update). (including the time the mirror takes to update).
## General steps ## General steps
@ -16,9 +18,10 @@ from GitHub or `git remote`s to use, the merge might just take a bit longer
1. In case [editorconfig](https://editorconfig.org/) isn't 1. In case [editorconfig](https://editorconfig.org/) isn't
[natively supported by your editor of choice](https://editorconfig.org/#pre-installed), [natively supported by your editor of choice](https://editorconfig.org/#pre-installed),
please consider [installing a plugin](https://editorconfig.org/#download). please consider [installing a plugin](https://editorconfig.org/#download).
E.g. VS Cod{e,ium} users can `CTRL-P` and execute `ext install EditorConfig.EditorConfig`. E.g. VS Cod{e,ium} users can `CTRL-P` and execute
2. If the repository in question has a `.pre-commit-config.yaml` file, `ext install EditorConfig.EditorConfig`.
please install [`pre-commit`](https://pre-commit.com/) and run 2. If the repository in question has a `.pre-commit-config.yaml` file, please
`pre-commit install` in your local clone at least once. install [`pre-commit`](https://pre-commit.com/) and run `pre-commit install`
in your local clone at least once.
- [![Packaging status of pre-commit](https://repology.org/badge/vertical-allrepos/python:pre-commit.svg)](https://repology.org/project/python:pre-commit/versions) - [![Packaging status of pre-commit](https://repology.org/badge/vertical-allrepos/python:pre-commit.svg)](https://repology.org/project/python:pre-commit/versions)

View File

@ -1,3 +1,5 @@
# @format
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/displaying-a-sponsor-button-in-your-repository # https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/displaying-a-sponsor-button-in-your-repository
# NOTE: If no protocol is specified, http:// is assumed. # NOTE: If no protocol is specified, http:// is assumed.
custom: ["https://liberapay.com/Mikaela", "https://revolut.me/aminda"] custom: ["https://liberapay.com/Mikaela", "https://revolut.me/aminda"]

View File

@ -1,3 +1,5 @@
<!-- @format -->
GitHub community health files GitHub community health files
- https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file#creating-a-repository-for-default-files - https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file#creating-a-repository-for-default-files

View File

@ -1 +1,3 @@
<!-- @format -->
Please see https://www.aminda.eu/.well-known/security.txt Please see https://www.aminda.eu/.well-known/security.txt

View File

@ -1 +1,3 @@
<!-- @format -->
Please see https://www.aminda.eu/discuss.html Please see https://www.aminda.eu/discuss.html

6
package.json Normal file
View File

@ -0,0 +1,6 @@
{
"devDependencies": {
"prettier": "3.3.2",
"prettier-plugin-sh": "0.14.0"
}
}