|
| 1 | +{ |
| 2 | + "name": "product", |
| 3 | + "version": "1.0.0", |
| 4 | + "private": true, |
| 5 | + "repository": "https://github.com/nice-boys/product-boilerplate", |
| 6 | + "author": "Max Stoiber <[email protected]>", |
| 7 | + "workspaces": { |
| 8 | + "packages": [ |
| 9 | + "web" |
| 10 | + ] |
| 11 | + }, |
| 12 | + "scripts": { |
| 13 | + "prettier": "prettier", |
| 14 | + "prettify": "prettier --write", |
| 15 | + "lint": "eslint --ignore-path .gitignore --ext .js,.ts,.tsx web", |
| 16 | + "dev": "concurrently -n web,generate:web,generate:schema,generate:db \"yarn workspace web dev\" \"yarn generate:web --watch\" \"nodemon -w web/graphql -x 'yarn generate:schema'\" \"nodemon -w web/database/datamodel.prisma -x 'yarn run generate:db'\"", |
| 17 | + "web": "yarn workspace web", |
| 18 | + "db": "yarn workspace web run db", |
| 19 | + "db:deploy": "yarn workspace web run db:deploy", |
| 20 | + "generate": "yarn run generate:db && yarn run generate:schema && yarn run generate:web", |
| 21 | + "generate:web": "graphql-codegen --config graphql-codegen.yml", |
| 22 | + "generate:schema": "GENERATE=true ts-node --skip-project web/graphql/schema/index.ts", |
| 23 | + "generate:db": "yarn workspace web generate:db", |
| 24 | + "postinstall": "yarn run generate" |
| 25 | + }, |
| 26 | + "eslintConfig": { |
| 27 | + "parser": "@typescript-eslint/parser", |
| 28 | + "parserOptions": { |
| 29 | + "project": "./web/tsconfig.json" |
| 30 | + }, |
| 31 | + "extends": [ |
| 32 | + "eslint:recommended", |
| 33 | + "plugin:@typescript-eslint/recommended", |
| 34 | + "prettier", |
| 35 | + "prettier/@typescript-eslint", |
| 36 | + "react-app" |
| 37 | + ], |
| 38 | + "plugins": [ |
| 39 | + "react-hooks", |
| 40 | + "clean-styled-components" |
| 41 | + ], |
| 42 | + "rules": { |
| 43 | + "@typescript-eslint/explicit-function-return-type": 0, |
| 44 | + "@typescript-eslint/explicit-member-accessibility": 0, |
| 45 | + "@typescript-eslint/no-empty-interface": 0, |
| 46 | + "@typescript-eslint/no-var-requires": 0, |
| 47 | + "@typescript-eslint/no-explicit-any": 2, |
| 48 | + "react-hooks/rules-of-hooks": "error", |
| 49 | + "react-hooks/exhaustive-deps": "warn", |
| 50 | + "clean-styled-components/single-component-per-file": 2, |
| 51 | + "no-console": [ |
| 52 | + "error", |
| 53 | + { |
| 54 | + "allow": [ |
| 55 | + "warn", |
| 56 | + "error" |
| 57 | + ] |
| 58 | + } |
| 59 | + ] |
| 60 | + } |
| 61 | + }, |
| 62 | + "husky": { |
| 63 | + "hooks": { |
| 64 | + "pre-commit": "lint-staged && yarn run generate:schema && git add web/graphql/schema.generated.graphql", |
| 65 | + "post-checkout": "yarn run generate && yarn run db:deploy" |
| 66 | + } |
| 67 | + }, |
| 68 | + "lint-staged": { |
| 69 | + "*.{js,ts,tsx}": [ |
| 70 | + "eslint --fix", |
| 71 | + "prettier --write", |
| 72 | + "git add" |
| 73 | + ], |
| 74 | + "*.{css,json,md,mdx}": [ |
| 75 | + "yarn run prettify --write", |
| 76 | + "git add" |
| 77 | + ] |
| 78 | + }, |
| 79 | + "devDependencies": { |
| 80 | + "@graphql-codegen/add": "1.2.0", |
| 81 | + "@graphql-codegen/cli": "^1.2.0", |
| 82 | + "@graphql-codegen/core": "1.6.1", |
| 83 | + "@graphql-codegen/fragment-matcher": "1.6.1", |
| 84 | + "@graphql-codegen/introspection": "1.6.1", |
| 85 | + "@graphql-codegen/near-operation-file-preset": "1.2.0", |
| 86 | + "@graphql-codegen/typescript": "1.2.0", |
| 87 | + "@graphql-codegen/typescript-graphql-files-modules": "1.6.1", |
| 88 | + "@graphql-codegen/typescript-operations": "1.2.0", |
| 89 | + "@graphql-codegen/typescript-react-apollo": "1.2.0", |
| 90 | + "@typescript-eslint/eslint-plugin": "^1.6.0", |
| 91 | + "@typescript-eslint/parser": "^1.6.0", |
| 92 | + "babel-eslint": "^10.0.2", |
| 93 | + "concurrently": "^4.1.0", |
| 94 | + "eslint": "^5.16.0", |
| 95 | + "eslint-config-prettier": "^4.1.0", |
| 96 | + "eslint-config-react-app": "^3.0.8", |
| 97 | + "eslint-loader": "2.1.1", |
| 98 | + "eslint-plugin-clean-styled-components": "^0.0.2", |
| 99 | + "eslint-plugin-flowtype": "2.50.3", |
| 100 | + "eslint-plugin-import": "2.18.2", |
| 101 | + "eslint-plugin-jsx-a11y": "6.2.1", |
| 102 | + "eslint-plugin-react": "7.14.3", |
| 103 | + "eslint-plugin-react-hooks": "^1.6.0", |
| 104 | + "husky": ">=1", |
| 105 | + "lint-staged": ">=9", |
| 106 | + "nodemon": "^1.19.1", |
| 107 | + "now": "^15.3.0", |
| 108 | + "prettier": "^1.18.2", |
| 109 | + "react-dev-utils": "^9.0.1", |
| 110 | + "ts-node": "^8.2.0" |
| 111 | + }, |
| 112 | + "resolutions": { |
| 113 | + "styled-jsx": "3.0.0", |
| 114 | + "@types/styled-components": "4.1.8", |
| 115 | + "graphql": "14.3.1" |
| 116 | + }, |
| 117 | + "license": "MIT" |
| 118 | +} |
0 commit comments