|
1 | 1 | {
|
2 | 2 | "name": "relay-compiler-language-typescript",
|
3 | 3 | "version": "1.1.0",
|
4 |
| - "description": "A language plugin for Relay that adds TypeScript support, including emitting type definitions.", |
| 4 | + "description": |
| 5 | + "A language plugin for Relay that adds TypeScript support, including emitting type definitions.", |
5 | 6 | "license": "MIT",
|
6 |
| - "keywords": [ |
7 |
| - "relay", |
8 |
| - "graphql", |
9 |
| - "react", |
10 |
| - "typescript" |
11 |
| - ], |
| 7 | + "keywords": ["relay", "graphql", "react", "typescript"], |
12 | 8 | "contributors": [
|
13 | 9 | {
|
14 | 10 | "name": "Kaare Hoff Skovgaard",
|
|
19 | 15 |
|
20 | 16 | }
|
21 | 17 | ],
|
22 |
| - "homepage": "https://github.com/relay-tools/relay-compiler-language-typescript", |
| 18 | + "homepage": |
| 19 | + "https://github.com/relay-tools/relay-compiler-language-typescript", |
23 | 20 | "repository": {
|
24 | 21 | "type": "git",
|
25 |
| - "url": "https://github.com/relay-tools/relay-compiler-language-typescript.git" |
| 22 | + "url": |
| 23 | + "https://github.com/relay-tools/relay-compiler-language-typescript.git" |
26 | 24 | },
|
27 | 25 | "bugs": {
|
28 |
| - "url": "https://github.com/relay-tools/relay-compiler-language-typescript/issues" |
| 26 | + "url": |
| 27 | + "https://github.com/relay-tools/relay-compiler-language-typescript/issues" |
29 | 28 | },
|
30 | 29 | "main": "lib/index.js",
|
31 |
| - "files": [ |
32 |
| - "lib" |
33 |
| - ], |
| 30 | + "files": ["lib"], |
34 | 31 | "scripts": {
|
35 | 32 | "prepublish": "npm run build",
|
36 | 33 | "build": "rm -rf lib && tsc",
|
37 |
| - "relay": "node bin/relay-compiler.js --schema test/schema.graphql --src test/ --outputDir __generated__", |
| 34 | + "relay": |
| 35 | + "node bin/relay-compiler.js --schema test/schema.graphql --src test/ --outputDir __generated__", |
| 36 | + "lint": "tslint -c tslint.json --project tsconfig.json", |
38 | 37 | "test": "npm run type-check && jest",
|
39 | 38 | "type-check": "tsc --noEmit --pretty",
|
40 | 39 | "prettier": "prettier --write '{src,types}/**/*.ts'",
|
41 |
| - "sync-fixtures": "rsync -avh --delete --stats --progress ../relay/packages/relay-compiler/language/javascript/__tests__/fixtures/flow-generator/*.graphql test/fixtures/type-generator" |
| 40 | + "sync-fixtures": |
| 41 | + "rsync -avh --delete --stats --progress ../relay/packages/relay-compiler/language/javascript/__tests__/fixtures/flow-generator/*.graphql test/fixtures/type-generator", |
| 42 | + "precommit": "lint-staged" |
42 | 43 | },
|
43 | 44 | "dependencies": {
|
44 | 45 | "immutable": "^3.7.6",
|
|
60 | 61 | "@types/node": "8.5.7",
|
61 | 62 | "@types/relay-runtime": "^1.3.1",
|
62 | 63 | "graphql": "^0.13.2",
|
| 64 | + "husky": "^1.1.0", |
63 | 65 | "jest": "^22.1.4",
|
| 66 | + "lint-staged": "^7.3.0", |
64 | 67 | "prettier": "^1.10.2",
|
65 |
| - "relay-compiler": "https://github.com/alloy/relay/releases/download/v1.6.1-plugin.1/relay-compiler-1.6.1-plugin.1.tgz", |
66 |
| - "relay-runtime": "https://github.com/alloy/relay/releases/download/v1.6.1-plugin.1/relay-runtime-1.6.1-plugin.1.tgz", |
67 |
| - "relay-test-utils": "https://github.com/alloy/relay/releases/download/v1.6.1-plugin.1/relay-test-utils-1.6.1-plugin.1.tgz", |
| 68 | + "relay-compiler": |
| 69 | + "https://github.com/alloy/relay/releases/download/v1.6.1-plugin.1/relay-compiler-1.6.1-plugin.1.tgz", |
| 70 | + "relay-runtime": |
| 71 | + "https://github.com/alloy/relay/releases/download/v1.6.1-plugin.1/relay-runtime-1.6.1-plugin.1.tgz", |
| 72 | + "relay-test-utils": |
| 73 | + "https://github.com/alloy/relay/releases/download/v1.6.1-plugin.1/relay-test-utils-1.6.1-plugin.1.tgz", |
68 | 74 | "ts-jest": "^22.0.1",
|
| 75 | + "tslint": "^5.11.0", |
| 76 | + "tslint-config-prettier": "^1.15.0", |
69 | 77 | "typescript": "2.8.1"
|
70 | 78 | },
|
71 | 79 | "resolutions": {
|
72 |
| - "graphql-compiler": "https://github.com/alloy/relay/releases/download/v1.6.1-plugin.1/graphql-compiler-1.6.1-plugin.1.tgz", |
73 |
| - "relay-compiler": "https://github.com/alloy/relay/releases/download/v1.6.1-plugin.1/relay-compiler-1.6.1-plugin.1.tgz", |
74 |
| - "relay-runtime": "https://github.com/alloy/relay/releases/download/v1.6.1-plugin.1/relay-runtime-1.6.1-plugin.1.tgz", |
75 |
| - "relay-test-utils": "https://github.com/alloy/relay/releases/download/v1.6.1-plugin.1/relay-test-utils-1.6.1-plugin.1.tgz" |
| 80 | + "graphql-compiler": |
| 81 | + "https://github.com/alloy/relay/releases/download/v1.6.1-plugin.1/graphql-compiler-1.6.1-plugin.1.tgz", |
| 82 | + "relay-compiler": |
| 83 | + "https://github.com/alloy/relay/releases/download/v1.6.1-plugin.1/relay-compiler-1.6.1-plugin.1.tgz", |
| 84 | + "relay-runtime": |
| 85 | + "https://github.com/alloy/relay/releases/download/v1.6.1-plugin.1/relay-runtime-1.6.1-plugin.1.tgz", |
| 86 | + "relay-test-utils": |
| 87 | + "https://github.com/alloy/relay/releases/download/v1.6.1-plugin.1/relay-test-utils-1.6.1-plugin.1.tgz" |
76 | 88 | },
|
77 | 89 | "jest": {
|
78 | 90 | "transform": {
|
79 | 91 | "^.+\\.tsx?$": "ts-jest"
|
80 | 92 | },
|
81 | 93 | "testRegex": "test/.+?-test\\.tsx?$",
|
82 |
| - "moduleFileExtensions": [ |
83 |
| - "js", |
84 |
| - "ts", |
85 |
| - "tsx" |
| 94 | + "moduleFileExtensions": ["js", "ts", "tsx"] |
| 95 | + }, |
| 96 | + "lint-staged": { |
| 97 | + "**/*.json": ["prettier --write", "git add"], |
| 98 | + "{src,types}/**/*.ts": [ |
| 99 | + "tslint -c tslint.json --fix", |
| 100 | + "prettier --write", |
| 101 | + "git add" |
86 | 102 | ]
|
87 | 103 | }
|
88 | 104 | }
|
0 commit comments