Skip to content

Releases: graphql-hive/graphql-eslint

December 05, 2024

05 Dec 07:03
4128431
Compare
Choose a tag to compare

@graphql-eslint/[email protected]

Minor Changes

Patch Changes

December 03, 2024

03 Dec 14:16
73a6751
Compare
Choose a tag to compare

@graphql-eslint/[email protected]

Patch Changes

November 29, 2024

29 Nov 16:48
43b6e7a
Compare
Choose a tag to compare

@graphql-eslint/[email protected]

Minor Changes

  • #2790
    438078d
    Thanks @dimaMachina! - feat(require-selections rule):
    introduce new option requireAllFields to require all values of fieldName: string[] option

November 29, 2024

29 Nov 13:16
545a379
Compare
Choose a tag to compare

@graphql-eslint/[email protected]

Patch Changes

November 29, 2024

29 Nov 08:56
045121f
Compare
Choose a tag to compare

@graphql-eslint/[email protected]

Minor Changes

  • #2780
    98e0b56
    Thanks @dimaMachina! - introduce forbiddenPatterns and
    requiredPatterns options for naming-convention rule and deprecate forbiddenPrefixes,
    forbiddenSuffixes and requiredPrefixes and requiredSuffixes

  • #2782
    4c20cdd
    Thanks @dimaMachina! - add new option ignoredSelectors for
    require-description rule, to ignore eslint selectors, e.g. types which ends with Connection or
    Edge

  • #2783
    6e354c9
    Thanks @dimaMachina! - add json-schema-to-ts as optional peer
    dependency

Patch Changes

November 27, 2024

27 Nov 21:05
8007f5a
Compare
Choose a tag to compare

@graphql-eslint/[email protected]

Patch Changes

  • #2775
    84d78b7
    Thanks @dimaMachina! - fix error
    TypeError: Cannot read properties of undefined (reading 'type') in require-description rule

November 26, 2024

26 Nov 13:42
28e6853
Compare
Choose a tag to compare

@graphql-eslint/[email protected]

Major Changes

  • #2598
    e771499
    Thanks @bmulholland! - 1. graphql plugin can now we be specified
    as

    plugins: {
    -  '@graphql-eslint': {
    -    graphqlPlugin.rules
    -  }
    +  '@graphql-eslint': graphqlPlugin
    }
    1. Config rules should now be accessed through the rules property

        rules: {
      -   ...graphqlESLint.configs['flat/operations-recommended']
      +   ...graphqlESLint.configs['flat/operations-recommended'].rules
    2. processor can now be specified with accessing processor property

      - processor: graphql.processors.graphql
      + processor: graphqlPlugin.processor
    3. The plugin can now be imported using a default import

      - import * as graphql from '@graphql-eslint/eslint-plugin'
      + import graphqlPlugin from '@graphql-eslint/eslint-plugin'
  • #1813
    1c2d220
    Thanks @dimaMachina! - - bring back possible-type-extension
    rule to schema-recommended config

    • add unique-operation-name and unique-fragment-name rules to operations-recommended config

    The concept of sibling operations provided by graphql-config's documents fields is based on
    uniquely named operations and fragments, for omitting false-positive/negative cases when
    operations and fragments are located in separate files. For this reason, these rules must be
    included in the recommended config

    • rename relay config to schema-relay

    To avoid confusing when users extend this config for executable definitions (operations and
    fragments)

  • #1813
    1c2d220
    Thanks @dimaMachina! - - alphabetize rule changes

    • add definitions: true option for schema-all/operations-all configs

    • rename values: ['EnumTypeDefinition'] to values: true

    • rename variables: ['OperationDefinition'] to variables: true

    • add groups: ['id', '*', 'createdAt', 'updatedAt'] for schema-all/operations-all configs

    • require-id-when-available rule changes

      • rename rule to require-selections
    • update schema-all/operations-all configs

    • require-description rule changes

      • add rootField: true option for schema-recommended config
    • require eslint at least >=8.44.0 as peerDependency

    • naming-convention

      • add new options for schema-recommended config
      {
        'EnumTypeDefinition,EnumTypeExtension': {
          forbiddenPrefixes: ['Enum'],
          forbiddenSuffixes: ['Enum']
        },
        'InterfaceTypeDefinition,InterfaceTypeExtension': {
          forbiddenPrefixes: ['Interface'],
          forbiddenSuffixes: ['Interface']
        },
        'UnionTypeDefinition,UnionTypeExtension': {
          forbiddenPrefixes: ['Union'],
          forbiddenSuffixes: ['Union']
        },
        'ObjectTypeDefinition,ObjectTypeExtension': {
          forbiddenPrefixes: ['Type'],
          forbiddenSuffixes: ['Type']
        }
      }
    • remove graphql-js' unique-enum-value-names rule

    • rename no-case-insensitive-enum-values-duplicates to unique-enum-value-names

      Since this rule reports case-insensitive enum values duplicates too

    • require-nullable-result-in-root rule changes

      Do not check subscriptions

  • #1813
    1c2d220
    Thanks @dimaMachina! - - remove parserOptions.schema

    • remove parserOptions.documents
    • remove parserOptions.extensions
    • remove parserOptions.include
    • remove parserOptions.exclude
    • remove parserOptions.projects
    • remove parserOptions.schemaOptions
    • remove parserOptions.graphQLParserOptions
    • remove parserOptions.skipGraphQLConfig
    • remove parserOptions.operations
    • add parserOptions.graphQLConfig?: IGraphQLConfig for programmatic usage
  • #2281
    c53cb4e
    Thanks @maciesielka! - Add new config option
    ignoredFieldSelectors to no-unused-fields rule to ignore all the relay pagination fields for
    every connection exposed in schema for example

  • #1813
    1c2d220
    Thanks @dimaMachina! - drop support of Node.js 12/14/16, GraphQL
    14/15

  • #2418
    c2d5386
    Thanks @comatory! - exposing GraphQLESTreeNode type

  • #2768
    241936a
    Thanks @dimaMachina! - - rename requireSiblingsOperations to
    requireGraphQLOperations

    • rename requireGraphQLSchemaFromContext to requireGraphQLSchema
  • #1813
    1c2d220
    Thanks @dimaMachina! - Remove GraphQLRuleTester from bundle,
    to test your rules use regular RuleTester from eslint

    Note: with this change unnecessary dependency @babel/code-frame was removed too

    import { RuleTester } from 'eslint'
    
    const ruleTester = new RuleTester({
      parser: require.resolve('@graphql-eslint/eslint-plugin')
    })
  • #2319
    b3c73dc
    Thanks @maciesielka! - Enforce require-selections on
    FragmentSpreads within GraphQLUnionTypes

Minor Changes

  • #2385
    afa8b8a
    Thanks @deathemperor! - feat: add a new option { for
    alphabetize rule to sort fields selection set

  • #2293
    01f7087
    Thanks @yoavsion! - Support the fragment spread group when defining
    alphabetize rule's groups with new option ...

  • #2719
    57d6edf
    Thanks @dimaMachina! - check for deprecated arguments and object
    field nodes in graphql operations in no-deprecated rule

Patch Changes

Read more

November 23, 2024

23 Nov 18:35
83fda06
Compare
Choose a tag to compare
November 23, 2024 Pre-release
Pre-release

@graphql-eslint/[email protected]

Patch Changes

November 21, 2024

21 Nov 20:40
7ed84b3
Compare
Choose a tag to compare
November 21, 2024 Pre-release
Pre-release

@graphql-eslint/[email protected]

Patch Changes

November 19, 2024

19 Nov 16:39
bd27a98
Compare
Choose a tag to compare
November 19, 2024 Pre-release
Pre-release

@graphql-eslint/[email protected]

Patch Changes