Skip to content

Commit b2c97d6

Browse files
authored
update docs (#2754)
* upd * upd * upd * upd * upd * upd * upd * upd * upd * upd * upd * upd * upd * upd * upd
1 parent 83fda06 commit b2c97d6

File tree

15 files changed

+182
-167
lines changed

15 files changed

+182
-167
lines changed

examples/multiple-projects-graphql-config/graphql.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { IGraphQLConfig, GraphQLTagPluckOptions } from '@graphql-eslint/eslint-plugin';
1+
import type { GraphQLTagPluckOptions, IGraphQLConfig } from '@graphql-eslint/eslint-plugin';
22

33
const config: IGraphQLConfig = {
44
projects: {

packages/plugin/src/configs/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Linter } from 'eslint';
1+
import { Linter } from 'eslint';
22
import { ConfigName } from '../types.js';
33
import operationsAllConfig from './operations-all.js';
44
import operationsRecommendedConfig from './operations-recommended.js';

packages/plugin/src/configs/operations-all.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* 🚨 IMPORTANT! Do not manually modify this file. Run: `pnpm generate:configs`
33
*/
44

5-
import type { Linter } from 'eslint';
5+
import { Linter } from 'eslint';
66

77
export default {
88
extends: './configs/operations-recommended',

packages/plugin/src/configs/operations-recommended.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* 🚨 IMPORTANT! Do not manually modify this file. Run: `pnpm generate:configs`
33
*/
44

5-
import type { Linter } from 'eslint';
5+
import { Linter } from 'eslint';
66

77
export default {
88
parser: '@graphql-eslint/eslint-plugin',

packages/plugin/src/configs/schema-all.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* 🚨 IMPORTANT! Do not manually modify this file. Run: `pnpm generate:configs`
33
*/
44

5-
import type { Linter } from 'eslint';
5+
import { Linter } from 'eslint';
66

77
export default {
88
extends: './configs/schema-recommended',

packages/plugin/src/configs/schema-recommended.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* 🚨 IMPORTANT! Do not manually modify this file. Run: `pnpm generate:configs`
33
*/
44

5-
import type { Linter } from 'eslint';
5+
import { Linter } from 'eslint';
66

77
export default {
88
parser: '@graphql-eslint/eslint-plugin',

packages/plugin/src/configs/schema-relay.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Linter } from 'eslint';
1+
import { Linter } from 'eslint';
22

33
export default {
44
parser: '@graphql-eslint/eslint-plugin',

packages/plugin/src/rules/require-selections/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ export const rule: GraphQLESLintRule<RuleOptions, true> = {
103103
},
104104
],
105105
recommended: true,
106+
whenNotToUseIt:
107+
"Relay Compiler automatically adds an `id` field to any type that has an `id` field, even if it hasn't been explicitly requested. Requesting a field that is not used directly in the code can conflict with another Relay rule: `relay/unused-fields`.",
106108
},
107109
messages: {
108110
[RULE_ID]:

packages/plugin/src/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export type RuleDocsInfo<T> = Omit<RuleMetaDataDocs, 'category' | 'suggestion'>
5656
configOptions?: T | { schema?: T; operations?: T };
5757
graphQLJSRuleName?: string;
5858
isDisabledForAllConfig?: true;
59+
whenNotToUseIt?: string;
5960
};
6061

6162
export type GraphQLESLintRuleListener<WithTypeInfo extends boolean = false> = Record<

scripts/generate-configs.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type WriteFile = {
2323
const writeFormattedFile: WriteFile = async (filePath, code) => {
2424
if (filePath.startsWith('configs')) {
2525
code = `
26-
import type { Linter } from 'eslint';
26+
import { Linter } from 'eslint';
2727
2828
export default ${JSON.stringify(code)} satisfies Linter.LegacyConfig`;
2929
}

0 commit comments

Comments
 (0)