a37b2cd24e
- up until this commit, git hooks were only used by a handful of people because they were a pain: - they'd only be set up when you did `yarn setup` - the existing hooks ran `yarn lint` on all projects, which was incredibly slow - as a result, not many of us actually had them enabled, but this would cause issues in CI because people were pushing un-linted commits - other JS projects tend to use husky to automate the git hook setup and lint-staged to speed up linting on changed files - this commit switches to using them both - `lint-staged` only runs `eslint` on staged JS files that are about to be committed - if there's a linting error, it will stop the commit - I've configured the pre-commit hook to successfully exit in CI because we don't want to run pre-commit hooks right now - this means we can remove Grunt - yay!
124 lines
3.2 KiB
JSON
124 lines
3.2 KiB
JSON
{
|
|
"name": "ghost-monorepo",
|
|
"version": "0.0.0-private",
|
|
"description": "The professional publishing platform",
|
|
"private": true,
|
|
"repository": "https://github.com/TryGhost/Ghost",
|
|
"author": "Ghost Foundation",
|
|
"license": "MIT",
|
|
"workspaces": [
|
|
"ghost/*"
|
|
],
|
|
"monorepo": {
|
|
"public": false,
|
|
"internalPackages": true,
|
|
"repo": "https://github.com/TryGhost/Ghost",
|
|
"scope": "@tryghost"
|
|
},
|
|
"eslintIgnore": [
|
|
"**/node_modules/**"
|
|
],
|
|
"scripts": {
|
|
"build": "yarn workspace ghost run build",
|
|
"dev:debug": "DEBUG_COLORS=true DEBUG=@tryghost*,ghost:* yarn dev",
|
|
"dev:admin": "node .github/dev.js --admin",
|
|
"dev:ghost": "node .github/dev.js --ghost",
|
|
"dev": "node .github/dev.js",
|
|
"fix": "yarn cache clean && rm -rf node_modules && yarn",
|
|
"knex-migrator": "yarn workspace ghost run knex-migrator",
|
|
"lint": "yarn workspaces run lint",
|
|
"setup": "yarn && yarn workspace ghost run setup && git submodule update --init",
|
|
"start": "yarn workspace ghost run start",
|
|
"test": "yarn workspaces run test",
|
|
"main": "yarn main:monorepo && yarn main:submodules",
|
|
"main:monorepo": "git checkout main && git pull ${GHOST_UPSTREAM:-origin} main && yarn",
|
|
"main:submodules": "git submodule sync && git submodule update && git submodule foreach \"git checkout main && git pull ${GHOST_UPSTREAM:-origin} main && yarn\"",
|
|
"prepare": "husky install .github/hooks"
|
|
},
|
|
"resolutions": {
|
|
"@tryghost/logging": "2.3.2",
|
|
"moment": "2.24.0",
|
|
"moment-timezone": "0.5.23"
|
|
},
|
|
"renovate": {
|
|
"extends": [
|
|
"@tryghost:quietJS",
|
|
"@tryghost:disableTryGhostAutomerge",
|
|
"@tryghost:groupTestLint",
|
|
"@tryghost:groupCSS",
|
|
"@tryghost:groupBuildTools"
|
|
],
|
|
"ignoreDeps": [
|
|
"got",
|
|
"intl-messageformat",
|
|
"moment",
|
|
"moment-timezone",
|
|
"oembed-parser",
|
|
"simple-dom",
|
|
"ember-drag-drop",
|
|
"normalize.css",
|
|
"validator",
|
|
"codemirror",
|
|
"faker"
|
|
],
|
|
"ignorePaths": [
|
|
"test",
|
|
"ghost/admin/lib/koenig-editor/package.json"
|
|
],
|
|
"packageRules": [
|
|
{
|
|
"packagePatterns": [
|
|
"@tryghost"
|
|
],
|
|
"groupName": "@tryghost"
|
|
},
|
|
{
|
|
"packagePatterns": [
|
|
"metascraper"
|
|
],
|
|
"groupName": "metascraper"
|
|
},
|
|
{
|
|
"groupName": "ember-basic-dropdown addons",
|
|
"packagePatterns": [
|
|
"^ember-basic",
|
|
"^ember-power"
|
|
]
|
|
},
|
|
{
|
|
"groupName": "ember core",
|
|
"packageNames": [
|
|
"ember-source",
|
|
"ember-cli",
|
|
"ember-data"
|
|
]
|
|
},
|
|
{
|
|
"groupName": "disable css",
|
|
"matchFiles": [
|
|
"ghost/admin/package.json"
|
|
],
|
|
"packagePatterns": [
|
|
"^postcss",
|
|
"^css"
|
|
],
|
|
"packageNames": [
|
|
"autoprefixer",
|
|
"ember-cli-postcss"
|
|
],
|
|
"enabled": false
|
|
}
|
|
]
|
|
},
|
|
"lint-staged": {
|
|
"*.js": "eslint"
|
|
},
|
|
"devDependencies": {
|
|
"concurrently": "7.4.0",
|
|
"eslint-plugin-ghost": "2.15.1",
|
|
"husky": "8.0.0",
|
|
"lint-staged": "13.0.3",
|
|
"nodemon": "2.0.20"
|
|
}
|
|
}
|