add standard js for linting and tests

This commit is contained in:
shibao 2022-01-22 23:34:20 -05:00
parent 04d798aaa7
commit 1a526cd580
3 changed files with 3486 additions and 9 deletions

3488
assets/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,9 @@
"license": "MIT",
"scripts": {
"deploy": "NODE_ENV=production webpack --mode production",
"watch": "webpack --mode development --watch --watch-options-stdin"
"watch": "webpack --mode development --watch --watch-options-stdin",
"format": "standard --fix",
"test": "standard"
},
"dependencies": {
"@fortawesome/fontawesome-free": "^5.15.4",
@ -30,6 +32,7 @@
"postcss-loader": "^6.1.1",
"postcss-preset-env": "^6.7.0",
"sass-loader": "^12.1.0",
"standard": "^16.0.4",
"style-loader": "^3.2.1",
"tailwindcss": "^2.2.7",
"terser-webpack-plugin": "^5.1.3",

View File

@ -69,7 +69,9 @@ defmodule Cannery.MixProject do
setup: ["deps.get", "compile", "ecto.setup", "cmd npm install --prefix assets"],
"ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
"ecto.reset": ["ecto.drop", "ecto.setup"],
format: ["cmd npm run format --prefix assets", "format"],
test: [
"cmd npm run test --prefix assets",
"dialyzer",
"credo --strict",
"format --check-formatted",