Skip to content

Commit fc526ac

Browse files
authored
Merge branch 'dotansimha:master' into master
2 parents 9d1c8be + 01dd28e commit fc526ac

File tree

1,006 files changed

+105063
-79190
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,006 files changed

+105063
-79190
lines changed

.changeset/config.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,5 @@
66
"access": "restricted",
77
"baseBranch": "master",
88
"updateInternalDependencies": "patch",
9-
"ignore": [
10-
"@graphql-codegen/testing",
11-
"@graphql-codegen/website"
12-
]
13-
}
9+
"ignore": ["@graphql-codegen/testing", "website", "example-*"]
10+
}

.eslintrc.json

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,53 @@
11
{
2+
"root": true,
23
"parser": "@typescript-eslint/parser",
3-
"extends": [
4-
"eslint:recommended",
5-
"standard",
6-
"prettier",
7-
"plugin:@typescript-eslint/recommended",
8-
"prettier/@typescript-eslint"
9-
],
10-
"plugins": ["@typescript-eslint"],
4+
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
5+
"plugins": ["import"],
116
"rules": {
127
"no-empty": "off",
138
"no-console": "error",
149
"no-prototype-builtins": "off",
1510
"no-useless-constructor": "off",
16-
"@typescript-eslint/no-unused-vars": ["warn", {"args": "none"}],
11+
"no-unused-vars": "off",
12+
"object-shorthand": ["error", "always"],
13+
"@typescript-eslint/explicit-module-boundary-types": "off",
14+
"@typescript-eslint/no-unused-vars": "off",
1715
"@typescript-eslint/no-use-before-define": "off",
1816
"@typescript-eslint/no-namespace": "off",
17+
"no-unreachable-loop": "error",
1918
"@typescript-eslint/no-empty-interface": "off",
19+
"prefer-arrow-callback": "error",
2020
"@typescript-eslint/no-empty-function": "off",
2121
"@typescript-eslint/no-var-requires": "off",
2222
"@typescript-eslint/no-explicit-any": "off",
2323
"@typescript-eslint/no-non-null-assertion": "off",
2424
"@typescript-eslint/explicit-function-return-type": "off",
2525
"@typescript-eslint/ban-ts-ignore": "off",
26-
"@typescript-eslint/ban-types": "off"
26+
"@typescript-eslint/ban-types": "off",
27+
"no-lonely-if": "error",
28+
"import/no-extraneous-dependencies": [
29+
"error",
30+
{
31+
"devDependencies": ["**/*.test.ts", "**/*.spec.ts", "**/test/**/*.ts"]
32+
}
33+
]
2734
},
2835
"env": {
2936
"es6": true,
3037
"node": true
3138
},
3239
"overrides": [
3340
{
34-
"files": [
35-
"**/tests/**/*.ts",
36-
"**/graphql-codegen-testing/**/*.ts",
37-
"*.spec.ts"
38-
],
41+
"files": ["**/tests/**/*.ts", "**/graphql-codegen-testing/**/*.ts", "*.spec.ts"],
3942
"env": {
4043
"jest": true
4144
},
4245
"rules": {
43-
"@typescript-eslint/no-unused-vars": "off"
46+
"no-unused-vars": "off",
47+
"@typescript-eslint/no-unused-vars": "off",
48+
"import/no-extraneous-dependencies": "off"
4449
}
4550
}
4651
],
47-
"ignorePatterns": ["dist", "node_modules", "dev-test", "website"]
52+
"ignorePatterns": ["dist", "node_modules", "dev-test", "website", "test-files"]
4853
}

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# This fixture must contain CRLF as line breaks. See https://github.com/dotansimha/graphql-code-generator/issues/7362
2+
packages/presets/gql-tag-operations/tests/fixtures/crlf-operation.ts eol=crlf

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 60 deletions
This file was deleted.
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: '🐛 Bug report'
2+
description: Create a report to help us improve
3+
body:
4+
- type: markdown
5+
attributes:
6+
value: |
7+
Thank you for reporting an issue :pray:.
8+
9+
The issues on this repo are being tracked and monitored according to our [Contributor Workflow](https://github.com/the-guild-org/Stack/blob/master/CONTRIBUTING.md#a-typical-contributor-workflow), Before submitting a new bug/issue, please check the [Contributor Workflow](https://github.com/the-guild-org/Stack/blob/master/CONTRIBUTING.md#a-typical-contributor-workflow)
10+
11+
After reading the [Contributor Workflow](https://github.com/the-guild-org/Stack/blob/master/CONTRIBUTING.md#a-typical-contributor-workflow), Check out and update the current state of this issue:
12+
13+
- [ ] 1. The issue provides a [minimal reproduction](https://stackoverflow.com/help/minimal-reproducible-example) available on [GitHub](https://github.com/dotansimha/graphql-code-generator-issue-sandbox-template), [Stackblitz](https://stackblitz.com/github/dotansimha/graphql-code-generator-issue-sandbox-template) or [CodeSandbox](https://codesandbox.io/s/github/dotansimha/graphql-code-generator-issue-sandbox-template).
14+
- _Make sure to fork this template and run `yarn generate` in the terminal._
15+
- _Please make sure the Codegen and plugins version under `package.json` matches yours._
16+
- [ ] 2. A failing test has been provided
17+
- [ ] 3. A local solution has been provided
18+
- [ ] 4. A pull request is pending review
19+
20+
The more information you fill in, the better the community can help you.
21+
- type: textarea
22+
id: description
23+
attributes:
24+
label: Describe the bug
25+
description: Provide a clear and concise description of the challenge you are running into.
26+
validations:
27+
required: true
28+
- type: input
29+
id: link
30+
attributes:
31+
label: Your Example Website or App
32+
description: |
33+
Which website or app were you using when the bug happened?
34+
Note:
35+
- Your bug will may get fixed much faster if we can run your code and it doesn't have dependencies other than the `@graphql-codegen/*` npm related packages / dependencies.
36+
- To create a shareable code example you can use [GitHub](https://github.com/dotansimha/graphql-code-generator-issue-sandbox-template), [Stackblitz](https://stackblitz.com/github/dotansimha/graphql-code-generator-issue-sandbox-template) or [CodeSandbox](https://codesandbox.io/s/github/dotansimha/graphql-code-generator-issue-sandbox-template). Please no localhost URLs.
37+
- Please read these tips for providing a minimal example: https://stackoverflow.com/help/minimal-reproducible-example.
38+
placeholder: |
39+
e.g. https://codesandbox.io/...... OR Github Repo
40+
validations:
41+
required: true
42+
- type: textarea
43+
id: steps
44+
attributes:
45+
label: Steps to Reproduce the Bug or Issue
46+
description: Describe the steps we have to take to reproduce the behavior.
47+
placeholder: |
48+
1. Go to '...'
49+
2. Click on '....'
50+
3. Scroll down to '....'
51+
4. See error
52+
validations:
53+
required: true
54+
- type: textarea
55+
id: expected
56+
attributes:
57+
label: Expected behavior
58+
description: Provide a clear and concise description of what you expected to happen.
59+
placeholder: |
60+
As a user, I expected ___ behavior but i am seeing ___
61+
validations:
62+
required: true
63+
- type: textarea
64+
id: screenshots_or_videos
65+
attributes:
66+
label: Screenshots or Videos
67+
description: |
68+
If applicable, add screenshots or a video to help explain your problem.
69+
For more information on the supported file image/file types and the file size limits, please refer
70+
to the following link: https://docs.github.com/en/github/writing-on-github/working-with-advanced-formatting/attaching-files
71+
placeholder: |
72+
You can drag your video or image files inside of this editor ↓
73+
- type: textarea
74+
id: platform
75+
attributes:
76+
label: Platform
77+
value: |
78+
- OS: [e.g. macOS, Windows, Linux]
79+
- NodeJS: [e.g. 18.5.0]
80+
- `graphql` version: [e.g. 16.3.0]
81+
- `@graphql-codegen/*` version(s): [e.g. 2.6.2]
82+
validations:
83+
required: true
84+
- type: textarea
85+
id: config
86+
attributes:
87+
label: Codegen Config File
88+
description: Your local Codegen config file (YAML/JSON...)
89+
placeholder: |
90+
schema: schema.graphql
91+
documents: document.graphql
92+
generates:
93+
types.ts:
94+
plugins:
95+
- typescript
96+
- typescript-operations
97+
- type: textarea
98+
id: additional
99+
attributes:
100+
label: Additional context
101+
description: Add any other context about the problem here.
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
---
22
name: Feature Request
33
about: Suggest an idea for the core of this project
4-
54
---
65

76
**Is your feature request related to a problem? Please describe.**
87

98
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
109

1110
**Describe the solution you'd like**
11+
1212
<!-- A clear and concise description of what you want to happen. -->
1313

1414
**Describe alternatives you've considered**
15+
1516
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
1617

1718
**Additional context**
19+
1820
<!-- Add any other context or screenshots about the feature request here. -->

.github/ISSUE_TEMPLATE/new-codegen-template.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ about: Suggest a new idea for a codegen plugin
77
Please make sure to include the background for this request, and explain why it's required by the community.
88
-->
99

10-
<!--
10+
<!--
1111
Please make sure that the request for this plugin does not already exists:
1212
https://github.com/dotansimha/graphql-code-generator/issues?q=is%3Aissue+is%3Aopen+label%3Anew-plugin
1313
-->
14-

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
🚨 **IMPORTANT: Please do not create a Pull Request without creating an issue first.**
2+
3+
_Any change needs to be discussed before proceeding. Failure to do so may result in the rejection of the pull request._
4+
5+
## Description
6+
7+
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
8+
9+
Related # (issue)
10+
11+
<!--
12+
Don't use `Fixes` or `Fixed` to refer issues
13+
-->
14+
15+
## Type of change
16+
17+
Please delete options that are not relevant.
18+
19+
- [ ] Bug fix (non-breaking change which fixes an issue)
20+
- [ ] New feature (non-breaking change which adds functionality)
21+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
22+
- [ ] This change requires a documentation update
23+
24+
## Screenshots/Sandbox (if appropriate/relevant):
25+
26+
Adding links to sandbox or providing screenshots can help us understand more about this PR and take action on it as appropriate
27+
28+
## How Has This Been Tested?
29+
30+
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
31+
32+
- [ ] Test A
33+
- [ ] Test B
34+
35+
**Test Environment**:
36+
37+
- OS:
38+
- `@graphql-codegen/...`:
39+
- NodeJS:
40+
41+
## Checklist:
42+
43+
- [ ] I have followed the [CONTRIBUTING](https://github.com/the-guild-org/Stack/blob/master/CONTRIBUTING.md) doc and the style guidelines of this project
44+
- [ ] I have performed a self-review of my own code
45+
- [ ] I have commented my code, particularly in hard-to-understand areas
46+
- [ ] I have made corresponding changes to the documentation
47+
- [ ] My changes generate no new warnings
48+
- [ ] I have added tests that prove my fix is effective or that my feature works
49+
- [ ] New and existing unit tests pass locally with my changes
50+
- [ ] Any dependent changes have been merged and published in downstream modules
51+
52+
## Further comments
53+
54+
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

.github/dependabot.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

.github/labels.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Please add the repo specific custom labels here
2+
3+
- name: 'core'
4+
color: '0366d6'
5+
description: 'Related to codegen core/cli'
6+
7+
- name: 'dependencies'
8+
color: 'd4c5f9'
9+
10+
- name: 'new-preset'
11+
color: '006b75'
12+
description: 'Suggestion for a new preset'
13+
14+
- name: 'plugins'
15+
color: 'c2e0c6'
16+
17+
- name: 'presets'
18+
color: '0e8a16'
19+
description: 'Related to Codegen presets'

0 commit comments

Comments
 (0)