Skip to content

Commit

Permalink
fix(): fix precommit hook (dont include fixtures)
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Jun 5, 2019
1 parent 51b4463 commit 7d52e9d
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 21 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tests/generated-definitions/*.ts
2 changes: 1 addition & 1 deletion lib/enums/resolvers.enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export enum Resolvers {
QUERY = 'Query',
MUTATION = 'Mutation',
SUBSCRIPTION = 'Subscription',
}
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"scripts": {
"prebuild": "rm -rf dist",
"build": "tsc -p tsconfig.json",
"format": "prettier **/**/*.ts --ignore-path ./.prettierignore --write",
"precommit": "lint-staged",
"prepublish:npm": "npm run build",
"publish:npm": "npm publish --access public",
Expand Down Expand Up @@ -56,7 +57,7 @@
},
"lint-staged": {
"*.ts": [
"prettier --write",
"prettier --ignore-path ./.prettierignore --write",
"git add"
]
}
Expand Down
9 changes: 5 additions & 4 deletions tests/generated-definitions/array-property.fixture.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@

/** ------------------------------------------------------
* THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)
* -------------------------------------------------------
*/

/* tslint:disable */
export interface Foo {
a: string[];
b?: string[];
c: string[];
d?: string[];
a: string[];
b?: string[];
c: string[];
d?: string[];
}
1 change: 1 addition & 0 deletions tests/generated-definitions/custom-scalar.fixture.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

/** ------------------------------------------------------
* THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)
* -------------------------------------------------------
Expand Down
7 changes: 4 additions & 3 deletions tests/generated-definitions/enum.fixture.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@

/** ------------------------------------------------------
* THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)
* -------------------------------------------------------
*/

/* tslint:disable */
export enum Foobar {
Foo = 'Foo',
Bar = 'Bar',
Baz = 'Baz',
Foo = "Foo",
Bar = "Bar",
Baz = "Baz"
}
7 changes: 4 additions & 3 deletions tests/generated-definitions/interface-property.fixture.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@

/** ------------------------------------------------------
* THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)
* -------------------------------------------------------
*/

/* tslint:disable */
export interface Bar {
id: number;
id: number;
}

export interface Foo {
a: Bar;
b?: Bar;
a: Bar;
b?: Bar;
}
5 changes: 3 additions & 2 deletions tests/generated-definitions/mutation.fixture.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@

/** ------------------------------------------------------
* THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)
* -------------------------------------------------------
*/

/* tslint:disable */
export interface Cat {
id: number;
id: number;
}

export interface IMutation {
createCat(name?: string): Cat | Promise<Cat>;
createCat(name?: string): Cat | Promise<Cat>;
}
5 changes: 3 additions & 2 deletions tests/generated-definitions/query.fixture.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@

/** ------------------------------------------------------
* THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)
* -------------------------------------------------------
*/

/* tslint:disable */
export interface Cat {
id: number;
id: number;
}

export interface IQuery {
cat(id: string): Cat | Promise<Cat>;
cat(id: string): Cat | Promise<Cat>;
}
11 changes: 6 additions & 5 deletions tests/generated-definitions/simple-type.fixture.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@

/** ------------------------------------------------------
* THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)
* -------------------------------------------------------
*/

/* tslint:disable */
export interface Cat {
id: number;
name: string;
age?: number;
color?: string;
weight?: number;
id: number;
name: string;
age?: number;
color?: string;
weight?: number;
}

0 comments on commit 7d52e9d

Please sign in to comment.