Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
blank_issues_enabled: false
contact_links:
- name: Have a question?
url: https://github.com/dimaMachina/graphql-eslint/discussions/new
url: https://github.com/graphql-hive/graphql-eslint/discussions/new
about:
Not sure about something? need help from the community? have a question to our team? please
ask and answer questions here.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


# GraphQL-ESLint

[![npm version](https://badge.fury.io/js/%40graphql-eslint%2Feslint-plugin.svg)](https://badge.fury.io/js/%40graphql-eslint%2Feslint-plugin)
Expand Down
2 changes: 1 addition & 1 deletion examples/code-file/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@graphql-eslint/example-code-file",
"version": "0.0.0",
"type": "module",
"repository": "https://github.com/dimaMachina/graphql-eslint",
"repository": "https://github.com/graphql-hive/graphql-eslint",
"author": "Dotan Simha <[email protected]>",
"private": true,
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion examples/custom-rules/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@graphql-eslint/example-custom-rules",
"version": "0.0.0",
"type": "module",
"repository": "https://github.com/dimaMachina/graphql-eslint",
"repository": "https://github.com/graphql-hive/graphql-eslint",
"author": "Dimitri POSTOLOV <[email protected]>",
"private": true,
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion examples/graphql-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@graphql-eslint/example-graphql-config",
"version": "0.0.0",
"type": "module",
"repository": "https://github.com/dimaMachina/graphql-eslint",
"repository": "https://github.com/graphql-hive/graphql-eslint",
"author": "Dotan Simha <[email protected]>",
"private": true,
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion examples/prettier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@graphql-eslint/example-prettier",
"version": "0.0.0",
"type": "module",
"repository": "https://github.com/dimaMachina/graphql-eslint",
"repository": "https://github.com/graphql-hive/graphql-eslint",
"author": "JounQin <[email protected]>",
"private": true,
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion examples/programmatic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@graphql-eslint/example-programmatic",
"version": "0.0.0",
"type": "module",
"repository": "https://github.com/dimaMachina/graphql-eslint",
"repository": "https://github.com/graphql-hive/graphql-eslint",
"author": "Dotan Simha <[email protected]>",
"private": true,
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "graphql-eslint-monorepo",
"type": "module",
"repository": "https://github.com/dimaMachina/graphql-eslint",
"repository": "https://github.com/graphql-hive/graphql-eslint",
"author": "Dotan Simha <[email protected]>",
"license": "MIT",
"private": true,
Expand Down Expand Up @@ -69,4 +69,4 @@
"cookie": "0.7.0"
}
}
}
}
266 changes: 133 additions & 133 deletions packages/plugin/CHANGELOG.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "4.4.0",
"type": "module",
"description": "GraphQL plugin for ESLint",
"repository": "https://github.com/dimaMachina/graphql-eslint",
"repository": "https://github.com/graphql-hive/graphql-eslint",
"author": "Dotan Simha <[email protected]>",
"license": "MIT",
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin/src/processor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const processor = {
preprocess(code, filePath) {
if (process.env.ESLINT_USE_FLAT_CONFIG !== 'false' && filePath.endsWith('.vue')) {
throw new Error(
"Processing of `.vue` files is no longer supported, follow the new official vue example for ESLint's flat config https://github.com/dimaMachina/graphql-eslint/tree/master/examples/vue-code-file",
"Processing of `.vue` files is no longer supported, follow the new official vue example for ESLint's flat config https://github.com/graphql-hive/graphql-eslint/tree/master/examples/vue-code-file",
);
}
if (!onDiskConfigLoaded) {
Expand Down
4 changes: 2 additions & 2 deletions scripts/generate-docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ async function generateDocs(): Promise<void> {
);
} else {
blocks.push(
`- [Rule source](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/src/rules/${ruleName}.ts)`,
`- [Test source](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/__tests__/${ruleName}.spec.ts)`,
`- [Rule source](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/rules/${ruleName}/index.ts)`,
`- [Test source](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/rules/${ruleName}/index.test.ts)`,
);
}
return {
Expand Down
10 changes: 7 additions & 3 deletions website/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const RootLayout: FC<{
<Anchor href="https://074c6ee9.graphql-eslint.pages.dev/docs">here</Anchor>.
</Banner>
),
docsRepositoryBase: 'https://github.com/dimaMachina/graphql-eslint/tree/master/website',
docsRepositoryBase: 'https://github.com/graphql-hive/graphql-eslint/tree/master/website',
}}
navbarProps={{
navLinks: [
Expand All @@ -53,9 +53,13 @@ const RootLayout: FC<{
icon: <PaperIcon />,
children: 'Documentation',
},
{ href: 'https://the-guild.dev/graphql/hive/blog', icon: <PencilIcon />, children: 'Blog' },
{
href: 'https://github.com/dimaMachina/graphql-eslint',
href: 'https://the-guild.dev/graphql/hive/blog',
icon: <PencilIcon />,
children: 'Blog',
},
{
href: 'https://github.com/graphql-hive/graphql-eslint',
icon: <GitHubIcon />,
children: 'GitHub',
},
Expand Down
20 changes: 10 additions & 10 deletions website/content/docs/configs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

## Schema Configs

| Name | Description |
| :--------------------------------------------------------------------------------------------------------------------------------------: | --------------------------------------------------------------------------------------------------------- |
| [`flat/schema-recommended`](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/src/configs/schema-recommended.ts) | enables recommended rules for schema development |
| [`flat/schema-all`](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/src/configs/schema-all.ts) | enables all rules for schema development, except for those that require `parserOptions.operations` option |
| [`flat/schema-relay`](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/src/configs/schema-relay.ts) | enables rules from Relay specification for schema development |
| Name | Description |
| :---------------------------------------------------------------------------------------------------------------------------------------: | --------------------------------------------------------------------------------------------------------- |
| [`flat/schema-recommended`](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/configs/schema-recommended.ts) | enables recommended rules for schema development |
| [`flat/schema-all`](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/configs/schema-all.ts) | enables all rules for schema development, except for those that require `parserOptions.operations` option |
| [`flat/schema-relay`](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/configs/schema-relay.ts) | enables rules from Relay specification for schema development |

## Operations Configs

| Name | Description |
| :----------------------------------------------------------------------------------------------------------------------------------------------: | ------------------------------------------------------------------------ |
| [`flat/operations-recommended`](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/src/configs/operations-recommended.ts) | enables recommended rules for consuming GraphQL (operations) development |
| [`flat/operations-all`](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/src/configs/operations-all.ts) | enables all rules for consuming GraphQL (operations) development |
| Name | Description |
| :-----------------------------------------------------------------------------------------------------------------------------------------------: | ------------------------------------------------------------------------ |
| [`flat/operations-recommended`](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/configs/operations-recommended.ts) | enables recommended rules for consuming GraphQL (operations) development |
| [`flat/operations-all`](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/configs/operations-all.ts) | enables all rules for consuming GraphQL (operations) development |

> [!TIP]
>
Expand All @@ -23,7 +23,7 @@
> you'll need `operations` rules.
>
> If you are in a monorepo project, you probably need both sets of rules, see
> [example of configuration](https://github.com/dimaMachina/graphql-eslint/tree/master/examples/monorepo/eslint.config.js).
> [example of configuration](https://github.com/graphql-hive/graphql-eslint/tree/master/examples/monorepo/eslint.config.js).

## Config Usage

Expand Down
2 changes: 1 addition & 1 deletion website/content/docs/custom-rules.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export const rule = {
```

The structure of the return value of `.typeInfo()` is
[defined here](https://github.com/dimaMachina/graphql-eslint/blob/master/packages/plugin/src/estree-converter/converter.ts#L32-L40).
[defined here](https://github.com/graphql-hive/graphql-eslint/blob/master/packages/plugin/src/estree-converter/converter.ts#L32-L40).
So based on the `node` you are using, you'll get a different values on `.typeInfo()` result.

## Testing Your Rules
Expand Down
2 changes: 1 addition & 1 deletion website/content/docs/usage/astro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ icon: AstroIcon
> [!NOTE]
>
> GraphQL-ESLint should work with Astro files as well. Feel free to submit a PR with a
> [new example](https://github.com/dimaMachina/graphql-eslint/tree/master/examples) in the
> [new example](https://github.com/graphql-hive/graphql-eslint/tree/master/examples) in the
> GraphQL-ESLint repository.
4 changes: 2 additions & 2 deletions website/content/rules/alphabetize.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -180,5 +180,5 @@ Additional restrictions:

## Resources

- [Rule source](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/src/rules/alphabetize.ts)
- [Test source](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/__tests__/alphabetize.spec.ts)
- [Rule source](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/rules/alphabetize/index.ts)
- [Test source](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/rules/alphabetize/index.test.ts)
4 changes: 2 additions & 2 deletions website/content/rules/description-style.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,5 @@ Default: `"block"`

## Resources

- [Rule source](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/src/rules/description-style.ts)
- [Test source](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/__tests__/description-style.spec.ts)
- [Rule source](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/rules/description-style/index.ts)
- [Test source](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/rules/description-style/index.test.ts)
4 changes: 2 additions & 2 deletions website/content/rules/input-name.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -83,5 +83,5 @@ Default: `true`

## Resources

- [Rule source](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/src/rules/input-name.ts)
- [Test source](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/__tests__/input-name.spec.ts)
- [Rule source](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/rules/input-name/index.ts)
- [Test source](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/rules/input-name/index.test.ts)
4 changes: 2 additions & 2 deletions website/content/rules/lone-executable-definition.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ Additional restrictions:

## Resources

- [Rule source](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/src/rules/lone-executable-definition.ts)
- [Test source](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/__tests__/lone-executable-definition.spec.ts)
- [Rule source](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/rules/lone-executable-definition/index.ts)
- [Test source](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/rules/lone-executable-definition/index.test.ts)
4 changes: 2 additions & 2 deletions website/content/rules/match-document-filename.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -184,5 +184,5 @@ This element must be one of the following enum values:

## Resources

- [Rule source](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/src/rules/match-document-filename.ts)
- [Test source](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/__tests__/match-document-filename.spec.ts)
- [Rule source](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/rules/match-document-filename/index.ts)
- [Test source](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/rules/match-document-filename/index.test.ts)
4 changes: 2 additions & 2 deletions website/content/rules/naming-convention.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -445,5 +445,5 @@ Option to skip validation of some words, e.g. acronyms

## Resources

- [Rule source](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/src/rules/naming-convention.ts)
- [Test source](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/__tests__/naming-convention.spec.ts)
- [Rule source](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/rules/naming-convention/index.ts)
- [Test source](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/rules/naming-convention/index.test.ts)
4 changes: 2 additions & 2 deletions website/content/rules/no-anonymous-operations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ query user {

## Resources

- [Rule source](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/src/rules/no-anonymous-operations.ts)
- [Test source](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/__tests__/no-anonymous-operations.spec.ts)
- [Rule source](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/rules/no-anonymous-operations/index.ts)
- [Test source](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/rules/no-anonymous-operations/index.test.ts)
4 changes: 2 additions & 2 deletions website/content/rules/no-deprecated.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,5 @@ query user {

## Resources

- [Rule source](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/src/rules/no-deprecated.ts)
- [Test source](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/__tests__/no-deprecated.spec.ts)
- [Rule source](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/rules/no-deprecated/index.ts)
- [Test source](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/rules/no-deprecated/index.test.ts)
4 changes: 2 additions & 2 deletions website/content/rules/no-duplicate-fields.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,5 @@ query (

## Resources

- [Rule source](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/src/rules/no-duplicate-fields.ts)
- [Test source](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/__tests__/no-duplicate-fields.spec.ts)
- [Rule source](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/rules/no-duplicate-fields/index.ts)
- [Test source](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/rules/no-duplicate-fields/index.test.ts)
4 changes: 2 additions & 2 deletions website/content/rules/no-hashtag-description.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ type User {

## Resources

- [Rule source](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/src/rules/no-hashtag-description.ts)
- [Test source](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/__tests__/no-hashtag-description.spec.ts)
- [Rule source](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/rules/no-hashtag-description/index.ts)
- [Test source](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/rules/no-hashtag-description/index.test.ts)
4 changes: 2 additions & 2 deletions website/content/rules/no-one-place-fragments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,5 @@ fragment UserFields on User {

## Resources

- [Rule source](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/src/rules/no-one-place-fragments.ts)
- [Test source](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/__tests__/no-one-place-fragments.spec.ts)
- [Rule source](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/rules/no-one-place-fragments/index.ts)
- [Test source](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/rules/no-one-place-fragments/index.test.ts)
4 changes: 2 additions & 2 deletions website/content/rules/no-root-type.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,5 @@ Additional restrictions:

## Resources

- [Rule source](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/src/rules/no-root-type.ts)
- [Test source](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/__tests__/no-root-type.spec.ts)
- [Rule source](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/rules/no-root-type/index.ts)
- [Test source](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/rules/no-root-type/index.test.ts)
4 changes: 2 additions & 2 deletions website/content/rules/no-scalar-result-type-on-mutation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ type Mutation {

## Resources

- [Rule source](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/src/rules/no-scalar-result-type-on-mutation.ts)
- [Test source](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/__tests__/no-scalar-result-type-on-mutation.spec.ts)
- [Rule source](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/rules/no-scalar-result-type-on-mutation/index.ts)
- [Test source](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/rules/no-scalar-result-type-on-mutation/index.test.ts)
4 changes: 2 additions & 2 deletions website/content/rules/no-typename-prefix.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@ type User {

## Resources

- [Rule source](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/src/rules/no-typename-prefix.ts)
- [Test source](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/__tests__/no-typename-prefix.spec.ts)
- [Rule source](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/rules/no-typename-prefix/index.ts)
- [Test source](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/rules/no-typename-prefix/index.test.ts)
4 changes: 2 additions & 2 deletions website/content/rules/no-unreachable-types.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ type Query {

## Resources

- [Rule source](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/src/rules/no-unreachable-types.ts)
- [Test source](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/__tests__/no-unreachable-types.spec.ts)
- [Rule source](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/rules/no-unreachable-types/index.ts)
- [Test source](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/rules/no-unreachable-types/index.test.ts)
4 changes: 2 additions & 2 deletions website/content/rules/no-unused-fields.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -161,5 +161,5 @@ Additional restrictions:

## Resources

- [Rule source](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/src/rules/no-unused-fields.ts)
- [Test source](https://github.com/dimaMachina/graphql-eslint/tree/master/packages/plugin/__tests__/no-unused-fields.spec.ts)
- [Rule source](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/rules/no-unused-fields/index.ts)
- [Test source](https://github.com/graphql-hive/graphql-eslint/tree/master/packages/plugin/src/rules/no-unused-fields/index.test.ts)
Loading