Skip to content

Commit 12f802c

Browse files
authored
fix require-id-when-available check unions as well (#1467)
* fix `require-id-when-available` check unions as well * fixes * fixes
1 parent 458c448 commit 12f802c

File tree

61 files changed

+498
-243
lines changed

Some content is hidden

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

61 files changed

+498
-243
lines changed

.changeset/afraid-pugs-fail.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@graphql-eslint/eslint-plugin': patch
3+
---
4+
5+
fix `require-id-when-available` check unions as well

examples/basic/eslint.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import * as graphqlESLint from '@graphql-eslint/eslint-plugin';
2+
import js from '@eslint/js';
23

34
export default [
4-
'eslint:recommended',
5+
{
6+
files: ['**/*.js'],
7+
rules: js.configs.recommended.rules,
8+
},
59
{
610
files: ['**/*.graphql'],
711
plugins: {

examples/basic/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"graphql": "16.6.0"
1313
},
1414
"devDependencies": {
15+
"@eslint/js": "8.35.0",
1516
"@graphql-eslint/eslint-plugin": "workspace:*",
1617
"eslint": "8.33.0"
1718
}

examples/code-file/eslint.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import * as graphqlESLint from '@graphql-eslint/eslint-plugin';
2+
import js from '@eslint/js';
23

34
export default [
4-
'eslint:recommended',
55
{
66
files: ['**/*.js'],
77
processor: graphqlESLint.processors.graphql,
88
rules: {
9+
...js.configs.recommended.rules,
910
'no-console': 'error',
1011
},
1112
},

examples/code-file/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"graphql": "16.6.0"
1313
},
1414
"devDependencies": {
15+
"@eslint/js": "8.35.0",
1516
"@graphql-eslint/eslint-plugin": "workspace:*",
1617
"eslint": "8.33.0"
1718
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import * as graphqlESLint from '@graphql-eslint/eslint-plugin';
2+
import js from '@eslint/js';
23

34
export default [
4-
'eslint:recommended',
55
{
66
files: ['**/*.js'],
77
processor: graphqlESLint.processors.graphql,
8+
rules: js.configs.recommended.rules,
89
},
910
{
1011
files: ['**/*.graphql'],

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"graphql-tag": "2.12.6"
1414
},
1515
"devDependencies": {
16+
"@eslint/js": "8.35.0",
1617
"@graphql-eslint/eslint-plugin": "workspace:*",
1718
"eslint": "8.33.0"
1819
}

examples/graphql-config/eslint.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import * as graphqlESLint from '@graphql-eslint/eslint-plugin';
2+
import js from '@eslint/js';
23

34
export default [
4-
'eslint:recommended',
5+
{
6+
files: ['**/*.js'],
7+
rules: js.configs.recommended.rules,
8+
},
59
{
610
files: ['**/*.graphql'],
711
plugins: {

examples/graphql-config/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"graphql": "16.6.0"
1313
},
1414
"devDependencies": {
15+
"@eslint/js": "8.35.0",
1516
"@graphql-eslint/eslint-plugin": "workspace:*",
1617
"eslint": "8.33.0"
1718
}

examples/monorepo/eslint.config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
import * as graphqlESLint from '@graphql-eslint/eslint-plugin';
2+
import js from '@eslint/js';
23

34
const SCHEMA_PATH = 'server/**/*.gql';
45
const OPERATIONS_PATH = 'client/**/*.{tsx,gql}';
56

67
export default [
7-
'eslint:recommended',
8+
{
9+
files: ['**/*.{js,tsx}'],
10+
rules: js.configs.recommended.rules,
11+
},
812
{
913
files: ['client/**/*.tsx'],
1014
// Setup processor for operations/fragments definitions on code-files

0 commit comments

Comments
 (0)