7.0.0 • Published 9 months ago

@zakodium/eslint-config-graphql v7.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

@zakodium/eslint-config-graphql

Shared ESLint config for frontend and backend projects using GraphQL

Installation

npm i -D @zakodium/eslint-config-graphql eslint

graphql is also a peer dependency and would usually be in the dependencies of your project

npm i graphql

Usage

Create a eslint.config.mjs with the following contents:

import graphql from '@zakodium/eslint-config-graphql';

export default [
  // You will probably extend other configs as well.
  ...graphql,
];

Create a .graphqlrc or .graphqlconfig file with your GraphQL configuration

Or alternatively, specify the options in the ESLint config:

import graphql from '@zakodium/eslint-config-graphql';

export default [
  // You will probably extend other configs as well.
  ...graphql,
  {
    files: ['**/*.{gql,graphql}'],
    languageOptions: {
      parserOptions: {
        graphQLConfig: {
          schema: 'path/to/your/schema/**/*.{gql,graphql}',
          documents: 'path/to/your/operations/**/*.{gql,graphql}',
        },
      },
    },
  },
];

You can then customize the config for your project by changing rules in this file.

7.0.0

9 months ago

6.0.1

11 months ago

6.0.0

11 months ago

5.1.0

2 years ago

5.0.1

2 years ago

5.0.0

2 years ago

4.0.1

3 years ago

4.0.0

3 years ago

4.0.2

3 years ago

3.0.0

4 years ago

2.0.0

4 years ago

1.3.0

4 years ago

1.2.0

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago