Skip to content

Commit

Permalink
BREAKING CHANGE(eslint-config-graphql): Switch to community plugin
Browse files Browse the repository at this point in the history
  * @see: https://the-guild.dev/graphql/eslint/docs/getting-started
  * @see: https://github.com/apollographql/eslint-plugin-graphql
  * the `eslint-plugin-graphql` is no longer maintained and it is
    depracated in favor of community maintained plugin `graphql-eslint`
  • Loading branch information
literat committed Jun 24, 2023
1 parent 0a38272 commit 99ae45c
Show file tree
Hide file tree
Showing 4 changed files with 620 additions and 494 deletions.
2 changes: 1 addition & 1 deletion packages/eslint-config-graphql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ Additionally don’t forget to have `.graphqlconfig` file:

This configuration uses the following plugins:

- [`eslint-plugin-graphql`](https://github.com/apollographql/eslint-plugin-graphql)
- [`@graphql-eslint/eslint-plugin`](https://the-guild.dev/graphql/eslint/docs/getting-started)
25 changes: 17 additions & 8 deletions packages/eslint-config-graphql/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
const globs = require('@lmc-eu/eslint-config-base/globs');

module.exports = {
plugins: ['graphql'],
overrides: [
{
files: [...globs.configs, ...globs, globs.typescripts],
processor: '@graphql-eslint/graphql',
},
{
files: ['*.graphql'],

parser: '@graphql-eslint/eslint-plugin',

plugins: ['@graphql-eslint'],

rules: {
'graphql/template-strings': [
'error',
{
env: 'apollo',
rules: {
'@graphql-eslint/known-type-names': 'error',
},
],
},
},
],
};
4 changes: 3 additions & 1 deletion packages/eslint-config-graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
},
"main": "index.js",
"dependencies": {
"eslint-plugin-graphql": "^4.0.0"
"@graphql-eslint/eslint-plugin": "^3.19.1",
"@lmc-eu/eslint-config-base": "^1.1.6",
"graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"
},
"peerDependencies": {
"eslint": "^8"
Expand Down
Loading

0 comments on commit 99ae45c

Please sign in to comment.