Skip to content

Commit 0707231

Browse files
authored
Fixes for graphql-config and processor (#192)
1 parent 915a72c commit 0707231

27 files changed

+318
-50
lines changed

.changeset/config.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,9 @@
66
"access": "restricted",
77
"baseBranch": "master",
88
"updateInternalDependencies": "patch",
9-
"ignore": ["@graphql-eslint/example"]
9+
"ignore": [
10+
"@graphql-eslint/example-code-file",
11+
"@graphql-eslint/example-basic",
12+
"@graphql-eslint/example-graphql-config"
13+
]
1014
}

.changeset/two-readers-exercise.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(parser): better support for graphql-config intergration and project detection

.changeset/weak-worms-collect.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': minor
3+
---
4+
5+
feature(processor): apply processor automatically on code files

example/query.js

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

example/.eslintrc.json renamed to examples/basic/.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
2-
"processor": "@graphql-eslint/graphql",
32
"overrides": [
43
{
54
"files": ["*.graphql"],
65
"parser": "@graphql-eslint/eslint-plugin",
76
"parserOptions": {
7+
"operations": ["query.graphql"],
88
"schema": "./**/schema.graphql"
99
},
1010
"plugins": ["@graphql-eslint"],

example/package.json renamed to examples/basic/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@graphql-eslint/example",
2+
"name": "@graphql-eslint/example-basic",
33
"private": true,
44
"version": "0.0.1",
55
"repository": "https://github.com/dotansimha/graphql-eslint",
File renamed without changes.
File renamed without changes.

examples/code-file/.eslintrc.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"processor": "@graphql-eslint/graphql",
3+
"overrides": [
4+
{
5+
"files": ["*.graphql"],
6+
"parser": "@graphql-eslint/eslint-plugin",
7+
"parserOptions": {
8+
"schema": "./**/schema.graphql"
9+
},
10+
"plugins": ["@graphql-eslint"],
11+
"rules": {
12+
"@graphql-eslint/no-anonymous-operations": "warn",
13+
"@graphql-eslint/no-operation-name-suffix": "error"
14+
}
15+
}
16+
]
17+
}

examples/code-file/package.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "@graphql-eslint/example-code-file",
3+
"private": true,
4+
"version": "0.0.1",
5+
"repository": "https://github.com/dotansimha/graphql-eslint",
6+
"author": "Dotan Simha <[email protected]>",
7+
"license": "MIT",
8+
"scripts": {
9+
"lint": "eslint --ext graphql,js ."
10+
},
11+
"dependencies": {
12+
"eslint": "7.14.0",
13+
"@graphql-eslint/eslint-plugin": "0.4.4",
14+
"graphql": "15.4.0",
15+
"typescript": "4.1.2"
16+
}
17+
}

0 commit comments

Comments
 (0)