Skip to content

Commit

Permalink
chore: add pre-commit checks for writting better code
Browse files Browse the repository at this point in the history
  • Loading branch information
neon-mmd committed Jun 1, 2023
1 parent 662cbcf commit 8dd18eb
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 12 deletions.
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/target

dump.rdb
package.json
package-lock.json
dump.rdb
.vscode
5 changes: 5 additions & 0 deletions .rusty-hook.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[hooks]
pre-commit = "cargo test && cargo fmt -- --check && cargo clippy && stylelint ./public/static/themes/*.css ./public/static/colorschemes/*.css ./public/static/*.js"

[logging]
verbose = true
13 changes: 13 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": "stylelint-config-standard",
"rules": {
"alpha-value-notation": "number",
"selector-class-pattern": null
},
"overrides": [
{
"files": ["*.js"],
"customSyntax": "postcss-lit"
}
]
}
71 changes: 62 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "websurfx"
version = "0.11.0"
version = "0.12.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand All @@ -22,3 +22,6 @@ redis = {version="*"}
md5 = {version="*"}
rand={version="*"}
once_cell = {version="*"}

[dev-dependencies]
rusty-hook = "^0.11.2"

0 comments on commit 8dd18eb

Please sign in to comment.