Skip to content

Commit 77abdfa

Browse files
committed
example fixes
1 parent d46608e commit 77abdfa

File tree

2 files changed

+26
-4
lines changed

2 files changed

+26
-4
lines changed

example/.eslintrc.json

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,28 @@
99
},
1010
"plugins": ["@graphql-eslint"],
1111
"rules": {
12-
"@graphql-eslint/description-style": ["error", { "style": "block" }]
13-
}
12+
"@graphql-eslint/require-id-when-available": [
13+
"error",
14+
{
15+
"fieldName": "_id"
16+
}
17+
],
18+
"@graphql-eslint/validate-against-schema": "error",
19+
"@graphql-eslint/no-anonymous-operations": "warn",
20+
"@graphql-eslint/no-operation-name-suffix": "error",
21+
"@graphql-eslint/avoid-operation-name-prefix": [
22+
"error",
23+
{
24+
"keywords": ["get"]
25+
}
26+
],
27+
"@graphql-eslint/no-case-insensitive-enum-values-duplicates": ["error"],
28+
"@graphql-eslint/require-description": [
29+
"warn",
30+
{
31+
"on": ["SchemaDefinition", "FieldDefinition"]
32+
}
33+
] }
1434
}
1535
]
1636
}

packages/plugin/src/processors/code-files.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { extname } from 'path';
22
import { parseCode } from '@graphql-tools/graphql-tag-pluck';
3+
import {} from 'eslint';
34

45
const EXTRACTABLE_FILES_EXTENSIONS = ['.js', '.jsx', '.ts', '.tsx'];
56
const RELEVANT_KEYWORDS = ['gql', 'graphql', '/* GraphQL */'];
@@ -10,7 +11,8 @@ type Block = {
1011
lineOffset?: number;
1112
};
1213

13-
export const createGraphqlProcessor = () => {
14+
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
15+
export function createGraphqlProcessor() {
1416
const blocksMap = new Map<string, Block[]>();
1517

1618
return {
@@ -71,4 +73,4 @@ export const createGraphqlProcessor = () => {
7173
return [].concat(...messageLists);
7274
},
7375
};
74-
};
76+
}

0 commit comments

Comments
 (0)