mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-03-21 18:04:39 -05:00
Add configs for better support of different development environments (#1092)
* Add prettierrc and editorconfig * Updated README with `npm run cf` steps & also a git command that will fix a line ending error * Added reference * Prettier ;_; * Add gitattributes to make sure git uses core.autocrlf on windows Co-authored-by: William Lam <w.lam@honteam.com>
This commit is contained in:
parent
222529b454
commit
cc396b8ac1
7
.editorconfig
Normal file
7
.editorconfig
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
root = true
|
||||
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
2
.gitattributes
vendored
Normal file
2
.gitattributes
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
# Set the default behavior, in case people don't have core.autocrlf set.
|
||||
* text=auto
|
||||
6
.prettierrc.js
Normal file
6
.prettierrc.js
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
/**
|
||||
* @type {import('prettier').Config}
|
||||
*/
|
||||
module.exports = {
|
||||
// defaults only so far
|
||||
};
|
||||
13
README.md
13
README.md
|
|
@ -118,3 +118,16 @@ Note: This is only useful if you have access to a production running on Render.c
|
|||
2. Copy generated files from output folder to gear-ids.ts file
|
||||
3. Get .png from Lean's repository
|
||||
4. Generate .avif image
|
||||
|
||||
### Fix errors from the CI Pipeline
|
||||
|
||||
If you change any files and the CI pipeline errors out on certain formatting/linting steps (e.g. the `Prettier` or `Stylelint` step), run this command in the repo's root directory:
|
||||
|
||||
```sh
|
||||
npm run cf
|
||||
```
|
||||
|
||||
Before committing, if for some reason you see an abnormally high amount of files changed, simply run `git add --renormalize .` and it will fix the error.
|
||||
|
||||
- Background info: this is caused by the line endings on your local repo not matching those with the remote repo's, which should remove the vast majority of unstaged files that appears to have no changes at all.
|
||||
- Reference: https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user