Added local tooling config files to the tooling/ directory

This commit is contained in:
Kieran Eglin 2024-06-13 15:23:19 -07:00
parent 132f8e8da6
commit 6545c7e466
No known key found for this signature in database
GPG key ID: 193984967FCF432D
8 changed files with 8 additions and 5 deletions

View file

@ -1,3 +0,0 @@
assets/vendor/
deps/
_build/

View file

@ -87,6 +87,9 @@ defmodule Pinchflat.MixProject do
# See the documentation for `Mix` for more info on aliases.
defp aliases do
[
format: "format --dot-formatter=tooling/.formatter.exs",
check: "check --config=tooling/.check.exs",
credo: "credo --config-file=tooling/.credo.exs",
setup: ["deps.get", "ecto.setup", "assets.setup", "assets.build"],
"ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
"ecto.reset": ["ecto.drop", "ecto.setup"],

View file

@ -5,7 +5,9 @@
"sqleton": "^2.2.0"
},
"scripts": {
"create-erd": "sqleton -o priv/repo/erd.png priv/repo/pinchflat_dev.db"
"create-erd": "sqleton -o priv/repo/erd.png priv/repo/pinchflat_dev.db",
"lint:check": "prettier . --check --config=tooling/.prettierrc.js --ignore-path=tooling/.prettierignore --ignore-path=.gitignore",
"lint:fix": "prettier . --write --config=tooling/.prettierrc.js --ignore-path=tooling/.prettierignore --ignore-path=.gitignore"
},
"private": true
}

View file

@ -16,7 +16,7 @@
{:compiler, env: %{"MIX_ENV" => "test"}},
{:formatter, env: %{"MIX_ENV" => "test"}},
{:sobelow, "mix sobelow --config"},
{:prettier_formatting, "yarn run prettier . --check", fix: "yarn run prettier . --write"},
{:prettier_formatting, "yarn run lint:check", fix: "yarn run lint:fix"},
{:npm_test, false}
## curated tools may be disabled (e.g. the check for compilation warnings)

1
tooling/.prettierignore Normal file
View file

@ -0,0 +1 @@
../assets/vendor/