Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate script #70

Open
wants to merge 3 commits into
base: staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .eslintignore

This file was deleted.

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,5 @@ typings/
.next

__playground__/

prisma/generated
2 changes: 0 additions & 2 deletions .prettierignore

This file was deleted.

5 changes: 2 additions & 3 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ module.exports = {
.map(filename => `"${isWin ? filename : escape([filename])}"`)
.join(' ')
return [
`tsc -p tsconfig.json`,
`prettier --write ${escapedFileNames}`,
`jest --config test/jest.lint.js --passWithNoTests ${filenames
.map(f => `"${f}"`)
.join(' ')}`,
`jest --config test/jest.lint.js --passWithNoTests ${escapedFileNames}`,
`git add ${escapedFileNames}`,
]
},
Expand Down
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@
"==next==": "------------------------------------------------------------------------------------------",
"dev:nodemon": " nodemon --exec \"env-cmd -f ./.config/dev.env node --inspect server.js\" -w ./server.js -w ./next.config.js -w ./.config/dev.env",
"build": "NODE_ENV=production next build",
"heroku-postbuild": "yarn schema && NODE_ENV=production next build",
"start": "NODE_ENV=production node server.js",
"==lint&format==": "-----------------------------------------------------------------------------------",
"lint": "jest --config test/jest.lint.js",
"format": "npm run prettier -- --write",
"prettier": "prettier \"**/*.+(js|jsx|json|yml|yaml|css|less|scss|ts|tsx|md|graphql|mdx)\"",
"validate": "npm run lint && npm run prettier -- --list-different",
"format": "yarn prettier --write",
"check-format": "yarn prettier --list-different --ignore-path .gitignore",
"check-types": "tsc -p tsconfig.json",
"validate": "npm-run-all --parallel check-types check-format lint",
"==docker&prisma==": "---------------------------------------------------------------------------------",
"up": "docker-compose up -d",
"down": "docker-compose down --remove-orphans",
Expand Down Expand Up @@ -44,7 +47,8 @@
"ext": [
".js",
".ts"
]
],
"ignorePath": ".gitignore"
}
},
"dependencies": {
Expand Down Expand Up @@ -91,7 +95,6 @@
"@typescript-eslint/eslint-plugin": "^2.9.0",
"@typescript-eslint/parser": "^2.9.0",
"autoprefixer": "^9.7.1",
"concurrently": "^5.0.0",
"env-cmd": "^10.0.1",
"eslint": "^6.6.0",
"eslint-config-kentcdodds": "^14.6.1",
Expand All @@ -102,6 +105,7 @@
"jest-runner-eslint": "^0.7.5",
"lint-staged": "^9.4.3",
"nodemon": "^1.19.4",
"npm-run-all": "^4.1.5",
"postcss-import": "^12.0.1",
"prettier": "^1.19.1",
"shell-quote": "^1.7.2",
Expand Down
Loading