Skip to content

Commit bfefad4

Browse files
authored
new docs (#2500)
* add new docs * more * more * add * more * more * more * more * more * fix generate docs prettier, incorrectly formatted _meta.ts * add baseUrl * update eslint patch * fix snapshots * fix lint
1 parent 34b722a commit bfefad4

File tree

35 files changed

+1486
-354
lines changed

35 files changed

+1486
-354
lines changed

examples/code-file/eslint.config.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import js from '@eslint/js';
2-
import * as graphql from '@graphql-eslint/eslint-plugin';
2+
import graphqlPlugin from '@graphql-eslint/eslint-plugin';
33

44
export default [
55
{
66
files: ['**/*.js'],
7-
processor: graphql.processors.graphql,
7+
processor: graphqlPlugin.processor,
88
rules: {
99
...js.configs.recommended.rules,
1010
'no-console': 'error',
@@ -13,10 +13,12 @@ export default [
1313
{
1414
files: ['**/*.graphql'],
1515
languageOptions: {
16-
parser: graphql.parser,
16+
parser: graphqlPlugin.parser,
1717
},
1818
plugins: {
19-
'@graphql-eslint': { rules: graphql.rules },
19+
'@graphql-eslint': {
20+
rules: graphqlPlugin.rules,
21+
},
2022
},
2123
rules: {
2224
'@graphql-eslint/no-anonymous-operations': 'error',

examples/graphql-config/eslint.config.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import js from '@eslint/js';
2-
import * as graphql from '@graphql-eslint/eslint-plugin';
2+
import graphqlPlugin from '@graphql-eslint/eslint-plugin';
33

44
export default [
55
{
@@ -9,10 +9,12 @@ export default [
99
{
1010
files: ['**/*.graphql'],
1111
languageOptions: {
12-
parser: graphql.parser,
12+
parser: graphqlPlugin.parser,
1313
},
1414
plugins: {
15-
'@graphql-eslint': { rules: graphql.rules },
15+
'@graphql-eslint': {
16+
rules: graphqlPlugin.rules,
17+
},
1618
},
1719
rules: {
1820
'@graphql-eslint/no-anonymous-operations': 'error',

examples/monorepo/eslint.config.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import js from '@eslint/js';
2-
import * as graphql from '@graphql-eslint/eslint-plugin';
2+
import graphqlPlugin from '@graphql-eslint/eslint-plugin';
33

44
const SCHEMA_PATH = 'server/**/*.gql';
55

@@ -11,7 +11,7 @@ export default [
1111
{
1212
files: ['client/**/*.tsx'],
1313
// Setup processor for operations/fragments definitions on code-files
14-
processor: graphql.processors.graphql,
14+
processor: graphqlPlugin.processor,
1515
languageOptions: {
1616
parserOptions: {
1717
ecmaFeatures: {
@@ -24,20 +24,22 @@ export default [
2424
// Setup GraphQL Parser
2525
files: ['**/*.{graphql,gql}'],
2626
languageOptions: {
27-
parser: graphql.parser,
27+
parser: graphqlPlugin.parser,
2828
},
2929
plugins: {
30-
'@graphql-eslint': { rules: graphql.rules },
30+
'@graphql-eslint': {
31+
rules: graphqlPlugin.rules,
32+
},
3133
},
3234
},
3335
{
3436
// Setup recommended config for schema files
3537
files: [SCHEMA_PATH],
36-
rules: graphql.configs['flat/schema-recommended'],
38+
rules: graphqlPlugin.configs['flat/schema-recommended'].rules,
3739
},
3840
{
3941
// Setup recommended config for operations files
4042
files: ['client/**/*.{graphql,gql}'],
41-
rules: graphql.configs['flat/operations-recommended'],
43+
rules: graphqlPlugin.configs['flat/operations-recommended'].rules,
4244
},
4345
];
Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,33 @@
11
import js from '@eslint/js';
2-
import * as graphql from '@graphql-eslint/eslint-plugin';
2+
import graphqlPlugin from '@graphql-eslint/eslint-plugin';
33

44
export default [
55
{
66
files: ['**/*.js'],
7-
processor: graphql.processors.graphql,
7+
processor: graphqlPlugin.processor,
88
rules: js.configs.recommended.rules,
99
},
1010
{
1111
// Setup GraphQL Parser
1212
files: ['**/*.graphql'],
1313
languageOptions: {
14-
parser: graphql.parser,
14+
parser: graphqlPlugin.parser,
1515
},
1616
plugins: {
17-
'@graphql-eslint': { rules: graphql.rules },
17+
'@graphql-eslint': {
18+
rules: graphqlPlugin.rules,
19+
},
1820
},
1921
},
2022
{
2123
files: ['schema.*.graphql'],
2224
rules: {
23-
...graphql.configs['flat/schema-recommended'],
25+
...graphqlPlugin.configs['flat/schema-recommended'].rules,
2426
'@graphql-eslint/require-description': 'off',
2527
},
2628
},
2729
{
2830
files: ['**/*.js/*.graphql'],
29-
rules: graphql.configs['flat/operations-recommended'],
31+
rules: graphqlPlugin.configs['flat/operations-recommended'].rules,
3032
},
3133
];

examples/prettier/eslint.config.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import prettierConfig from 'eslint-config-prettier';
22
import prettierPlugin from 'eslint-plugin-prettier';
33
import js from '@eslint/js';
4-
import * as graphql from '@graphql-eslint/eslint-plugin';
4+
import graphqlPlugin from '@graphql-eslint/eslint-plugin';
55

66
export default [
77
{
@@ -11,7 +11,7 @@ export default [
1111
},
1212
{
1313
files: ['**/*.js'],
14-
processor: graphql.processors.graphql,
14+
processor: graphqlPlugin.processor,
1515
rules: {
1616
...js.configs.recommended.rules,
1717
...prettierConfig.rules,
@@ -21,10 +21,12 @@ export default [
2121
{
2222
files: ['**/*.graphql'],
2323
languageOptions: {
24-
parser: graphql.parser,
24+
parser: graphqlPlugin.parser,
2525
},
2626
plugins: {
27-
'@graphql-eslint': { rules: graphql.rules },
27+
'@graphql-eslint': {
28+
rules: graphqlPlugin.rules,
29+
},
2830
},
2931
rules: {
3032
'prettier/prettier': 'error',

examples/programmatic/eslint.config.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import js from '@eslint/js';
2-
import * as graphql from '@graphql-eslint/eslint-plugin';
2+
import graphqlPlugin from '@graphql-eslint/eslint-plugin';
33

44
export default [
55
{
@@ -9,7 +9,7 @@ export default [
99
{
1010
files: ['**/*.graphql'],
1111
languageOptions: {
12-
parser: graphql.parser,
12+
parser: graphqlPlugin.parser,
1313
parserOptions: {
1414
graphQLConfig: {
1515
schema: 'schema.graphql',
@@ -18,7 +18,9 @@ export default [
1818
},
1919
},
2020
plugins: {
21-
'@graphql-eslint': { rules: graphql.rules },
21+
'@graphql-eslint': {
22+
rules: graphqlPlugin.rules,
23+
},
2224
},
2325
rules: {
2426
'@graphql-eslint/require-selections': ['error', { fieldName: '_id' }],

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import svelteParser from 'svelte-eslint-parser';
22
import js from '@eslint/js';
3-
import * as graphql from '@graphql-eslint/eslint-plugin';
3+
import graphqlPlugin from '@graphql-eslint/eslint-plugin';
44

55
export default [
66
{
77
files: ['**/*.js', '**/*.svelte'],
8-
processor: graphql.processors.graphql,
8+
processor: graphqlPlugin.processor,
99
rules: js.configs.recommended.rules,
1010
},
1111
{
@@ -17,10 +17,12 @@ export default [
1717
{
1818
files: ['**/*.graphql'],
1919
languageOptions: {
20-
parser: graphql.parser,
20+
parser: graphqlPlugin.parser,
2121
},
2222
plugins: {
23-
'@graphql-eslint': { rules: graphql.rules },
23+
'@graphql-eslint': {
24+
rules: graphqlPlugin.rules,
25+
},
2426
},
2527
rules: {
2628
'@graphql-eslint/no-anonymous-operations': 'error',

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

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import vueParser from 'vue-eslint-parser';
22
import js from '@eslint/js';
3-
import * as graphql from '@graphql-eslint/eslint-plugin';
3+
import graphqlPlugin from '@graphql-eslint/eslint-plugin';
44

55
export default [
66
{
77
files: ['**/*.js', '**/*.vue'],
8-
processor: graphql.processors.graphql,
8+
processor: graphqlPlugin.processor,
99
rules: js.configs.recommended.rules,
1010
},
1111
{
@@ -17,10 +17,12 @@ export default [
1717
{
1818
files: ['**/*.graphql'],
1919
languageOptions: {
20-
parser: graphql.parser,
20+
parser: graphqlPlugin.parser,
2121
},
2222
plugins: {
23-
'@graphql-eslint': { rules: graphql.rules },
23+
'@graphql-eslint': {
24+
rules: graphqlPlugin.rules,
25+
},
2426
},
2527
rules: {
2628
'@graphql-eslint/no-anonymous-operations': 'error',

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
},
5454
"pnpm": {
5555
"patchedDependencies": {
56-
"eslint@9.9.0": "patches/eslint@8.46.0.patch",
56+
"eslint": "patches/eslint.patch",
5757
5858
}
5959
}

packages/plugin/__tests__/__snapshots__/input-name.spec.md

Lines changed: 12 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ exports[`input-name > invalid > Invalid #1 1`] = `
88
#### ⚙️ Options
99

1010
{
11-
"checkInputType": true,
12-
"caseSensitiveInputType": true,
13-
"checkQueries": false,
14-
"checkMutations": true
11+
"checkInputType": true
1512
}
1613

1714
#### ❌ Error 1/2
@@ -41,10 +38,7 @@ exports[`input-name > invalid > Invalid #2 1`] = `
4138
#### ⚙️ Options
4239

4340
{
44-
"checkInputType": true,
45-
"caseSensitiveInputType": true,
46-
"checkQueries": false,
47-
"checkMutations": true
41+
"checkInputType": true
4842
}
4943

5044
#### ❌ Error
@@ -65,10 +59,7 @@ exports[`input-name > invalid > Invalid #3 1`] = `
6559
#### ⚙️ Options
6660

6761
{
68-
"checkInputType": true,
69-
"caseSensitiveInputType": true,
70-
"checkQueries": false,
71-
"checkMutations": true
62+
"checkInputType": true
7263
}
7364

7465
#### ❌ Error
@@ -89,10 +80,7 @@ exports[`input-name > invalid > Invalid #4 1`] = `
8980
#### ⚙️ Options
9081

9182
{
92-
"checkInputType": true,
93-
"caseSensitiveInputType": true,
94-
"checkQueries": false,
95-
"checkMutations": true
83+
"checkInputType": true
9684
}
9785

9886
#### ❌ Error 1/2
@@ -122,10 +110,7 @@ exports[`input-name > invalid > Invalid #5 1`] = `
122110
#### ⚙️ Options
123111

124112
{
125-
"checkInputType": true,
126-
"caseSensitiveInputType": true,
127-
"checkQueries": false,
128-
"checkMutations": true
113+
"checkInputType": true
129114
}
130115

131116
#### ❌ Error 1/2
@@ -155,10 +140,7 @@ exports[`input-name > invalid > Invalid #6 1`] = `
155140
#### ⚙️ Options
156141

157142
{
158-
"checkInputType": true,
159-
"caseSensitiveInputType": true,
160-
"checkQueries": false,
161-
"checkMutations": true
143+
"checkInputType": true
162144
}
163145

164146
#### ❌ Error 1/2
@@ -188,10 +170,7 @@ exports[`input-name > invalid > Invalid #7 1`] = `
188170
#### ⚙️ Options
189171

190172
{
191-
"checkInputType": true,
192-
"caseSensitiveInputType": true,
193-
"checkQueries": false,
194-
"checkMutations": true
173+
"checkInputType": true
195174
}
196175

197176
#### ❌ Error 1/2
@@ -221,10 +200,7 @@ exports[`input-name > invalid > Invalid #8 1`] = `
221200
#### ⚙️ Options
222201

223202
{
224-
"checkInputType": true,
225-
"caseSensitiveInputType": true,
226-
"checkQueries": false,
227-
"checkMutations": true
203+
"checkInputType": true
228204
}
229205

230206
#### ❌ Error 1/4
@@ -272,10 +248,7 @@ exports[`input-name > invalid > Invalid #9 1`] = `
272248
#### ⚙️ Options
273249

274250
{
275-
"checkInputType": false,
276-
"caseSensitiveInputType": true,
277-
"checkQueries": false,
278-
"checkMutations": true
251+
"checkInputType": false
279252
}
280253

281254
#### ❌ Error 1/2
@@ -306,9 +279,7 @@ exports[`input-name > invalid > Invalid #10 1`] = `
306279

307280
{
308281
"checkInputType": true,
309-
"caseSensitiveInputType": false,
310-
"checkQueries": false,
311-
"checkMutations": true
282+
"caseSensitiveInputType": false
312283
}
313284

314285
#### ❌ Error
@@ -330,9 +301,7 @@ exports[`input-name > invalid > Invalid #11 1`] = `
330301

331302
{
332303
"checkInputType": true,
333-
"caseSensitiveInputType": true,
334-
"checkQueries": false,
335-
"checkMutations": true
304+
"caseSensitiveInputType": true
336305
}
337306

338307
#### ❌ Error
@@ -355,8 +324,7 @@ exports[`input-name > invalid > Invalid #12 1`] = `
355324
{
356325
"checkQueries": true,
357326
"checkInputType": true,
358-
"caseSensitiveInputType": true,
359-
"checkMutations": true
327+
"caseSensitiveInputType": true
360328
}
361329

362330
#### ❌ Error

0 commit comments

Comments
 (0)