Skip to content

Commit 2f46a71

Browse files
authored
[v4] remove parserOptions.schema/operations, add parserOptions.graphQLConfig for programmatic usage (#1795)
1 parent 4079167 commit 2f46a71

File tree

116 files changed

+1280
-1570
lines changed

Some content is hidden

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

116 files changed

+1280
-1570
lines changed

.changeset/itchy-ads-compete.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
'@graphql-eslint/eslint-plugin': major
3+
---
4+
5+
- remove `parserOptions.schema`
6+
- remove `parserOptions.documents`
7+
- remove `parserOptions.extensions`
8+
- remove `parserOptions.include`
9+
- remove `parserOptions.exclude`
10+
- remove `parserOptions.projects`
11+
- remove `parserOptions.schemaOptions`
12+
- remove `parserOptions.graphQLParserOptions`
13+
- remove `parserOptions.skipGraphQLConfig`
14+
- remove `parserOptions.operations`
15+
16+
- add `parserOptions.graphQLConfig?: IGraphQLConfig` for programmatic usage

.github/workflows/tests.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,9 @@ jobs:
6262

6363
- name: Test
6464
run: pnpm test
65-
env:
66-
CI: true
67-
# - name: Lint ESLint
68-
# run: pnpm lint
65+
66+
- name: Type Check
67+
run: pnpm typecheck
6968
#
7069
# - name: Lint Prettier
7170
# run: pnpm lint:prettier

.gitignore

Lines changed: 3 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,111 +1,22 @@
1-
# Logs
2-
logs
31
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
lerna-debug.log*
8-
9-
# Diagnostic reports (https://nodejs.org/api/report.html)
10-
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
11-
12-
# Runtime data
13-
pids
14-
*.pid
15-
*.seed
16-
*.pid.lock
17-
18-
# Directory for instrumented libs generated by jscoverage/JSCover
19-
lib-cov
20-
21-
# Coverage directory used by tools like istanbul
22-
coverage
23-
*.lcov
24-
25-
# nyc test coverage
26-
.nyc_output
27-
28-
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
29-
.grunt
30-
31-
# Bower dependency directory (https://bower.io/)
32-
bower_components
33-
34-
# node-waf configuration
35-
.lock-wscript
36-
37-
# Compiled binary addons (https://nodejs.org/api/addons.html)
38-
build/Release
392

403
# Dependency directories
414
node_modules/
42-
jspm_packages/
43-
44-
# TypeScript v1 declaration files
45-
typings/
465

476
# TypeScript cache
487
*.tsbuildinfo
498

50-
# Optional npm cache directory
51-
.npm
52-
539
# Optional eslint cache
5410
.eslintcache
5511

56-
# Microbundle cache
57-
.rpt2_cache/
58-
.rts2_cache_cjs/
59-
.rts2_cache_es/
60-
.rts2_cache_umd/
61-
62-
# Optional REPL history
63-
.node_repl_history
64-
65-
# Output of 'npm pack'
66-
*.tgz
67-
68-
# Yarn Integrity file
69-
.yarn-integrity
70-
7112
# dotenv environment variables file
7213
.env
73-
.env.test
74-
75-
# parcel-bundler cache (https://parceljs.org/)
76-
.cache
77-
78-
# Next.js build output
79-
.next
80-
81-
# Nuxt.js build / generate output
82-
.nuxt
83-
dist
84-
85-
# Gatsby files
86-
.cache/
87-
# Comment in the public line in if your project uses Gatsby and *not* Next.js
88-
# https://nextjs.org/blog/next-9-1#public-directory-support
89-
# public
90-
91-
# vuepress build output
92-
.vuepress/dist
93-
94-
# Serverless directories
95-
.serverless/
96-
97-
# FuseBox cache
98-
.fusebox/
99-
100-
# DynamoDB Local files
101-
.dynamodb/
102-
103-
# TernJS port file
104-
.tern-port
105-
14+
.next/
15+
dist/
10616
.bob/
10717
.idea/
10818
out/
10919
website/public/_redirects
11020
website/public/sitemap.xml
11121
website/public/robots.txt
22+
.turbo/

examples/code-file/eslint.config.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ export default [
1717
},
1818
languageOptions: {
1919
parser: graphqlESLint,
20-
parserOptions: {
21-
schema: 'schema.graphql',
22-
},
2320
},
2421
rules: {
2522
'@graphql-eslint/no-anonymous-operations': 'error',
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export default {
2+
schema: 'schema.graphql',
3+
};

examples/graphql-config-code-file/.graphqlrc.yml

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

examples/graphql-config-code-file/eslint.config.js

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

examples/graphql-config-code-file/package.json

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

examples/graphql-config-code-file/query.js

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

examples/graphql-config-code-file/schema.graphql

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

0 commit comments

Comments
 (0)