summaryrefslogtreecommitdiffstats
path: root/package.json
diff options
context:
space:
mode:
authorNick Schonning <nschonni@gmail.com>2023-05-31 20:25:13 -0400
committerGitHub <noreply@github.com>2023-06-01 02:25:13 +0200
commitd39bce963f0a48d9349101828776fd280a1e11c5 (patch)
tree53f41fd43d36badc6c4372a749abc07ee1da9a3c /package.json
parent69057467cba138d2c9e459f565e88ea5979f61b0 (diff)
Add fix/lint helper dev targets (#23561)
Diffstat (limited to 'package.json')
-rw-r--r--package.json29
1 files changed, 18 insertions, 11 deletions
diff --git a/package.json b/package.json
index c299bd509b5..b71f1dff423 100644
--- a/package.json
+++ b/package.json
@@ -5,21 +5,28 @@
"node": ">=16"
},
"scripts": {
- "postversion": "git push --tags",
"build:development": "cross-env RAILS_ENV=development NODE_ENV=development ./bin/webpack",
"build:production": "cross-env RAILS_ENV=production NODE_ENV=production ./bin/webpack",
- "manage:translations": "node ./config/webpack/translationRunner.js",
+ "fix:js": "yarn lint:js --fix",
+ "fix:json": "prettier --write \"**/*.json\"",
+ "fix:md": "prettier --write \"**/*.md\"",
+ "fix:sass": "stylelint --fix \"**/*.{css,scss}\" && prettier --write \"**/*.{css,scss}\"",
+ "fix:yml": "prettier --write \"**/*.{yaml,yml}\"",
+ "fix": "yarn fix:js && yarn fix:json && yarn fix:sass && yarn fix:yml",
"i18n:extract": "formatjs extract 'app/javascript/**/*.{js,jsx,ts,tsx}' '--ignore=**/*.d.ts' --out-file app/javascript/mastodon/locales/en.json --format config/formatjs-formatter.js",
+ "jest": "cross-env NODE_ENV=test jest",
+ "lint:js": "eslint . --ext=.js,.jsx,.ts,.tsx --cache --report-unused-disable-directives",
+ "lint:json": "prettier --check \"**/*.json\"",
+ "lint:md": "prettier --check \"**/*.md\"",
+ "lint:sass": "stylelint \"**/*.{css,scss}\" && prettier --check \"**/*.{css,scss}\"",
+ "lint:yml": "prettier --check \"**/*.{yaml,yml}\"",
+ "lint": "yarn lint:js && yarn lint:json && yarn lint:sass && yarn lint:yml",
+ "manage:translations": "node ./config/webpack/translationRunner.js",
+ "postversion": "git push --tags",
+ "prepare": "husky install",
"start": "node ./streaming/index.js",
- "test": "${npm_execpath} run test:lint:js && ${npm_execpath} run test:typecheck && ${npm_execpath} run test:jest",
- "test:lint": "${npm_execpath} run test:lint:js && ${npm_execpath} run test:lint:sass",
- "test:lint:js": "eslint --ext=.js,.jsx,.ts,.tsx . --cache --report-unused-disable-directives",
- "test:lint:sass": "stylelint \"**/*.{css,scss}\" && prettier --check \"**/*.{css,scss}\"",
- "test:typecheck": "tsc --noEmit",
- "test:jest": "cross-env NODE_ENV=test jest",
- "format": "prettier --write .",
- "format-check": "prettier --check .",
- "prepare": "husky install"
+ "test": "yarn lint && yarn run typecheck && yarn jest",
+ "typecheck": "tsc --noEmit"
},
"repository": {
"type": "git",