Skip to content

Commit

Permalink
Fix linting so it actually works
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanrainer committed Jun 3, 2024
1 parent 313f335 commit 2c5f096
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
15 changes: 9 additions & 6 deletions crates/rover-client/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
import * as graphqlESLint from '@graphql-eslint/eslint-plugin';
// This is brought in to fix an incompatability between ESLint 9 and
// the GraphQL plugin: https://github.com/dimaMachina/graphql-eslint/issues/2311
import {fixupPluginRules} from '@eslint/compat'

export default [
{
files: ["*.graphql"],
files: ["**/*.graphql"],
plugins: {
'@graphql-eslint': graphqlESLint,
'@graphql-eslint':fixupPluginRules(graphqlESLint),
},
languageOptions: {
parser: graphqlESLint,
},
parserOptions: {
schema: "./.schema/schema.graphql",
operations: ["./src/operations/**/*.graphql"]
parserOptions:{
schema: "./.schema/schema.graphql",
operations: ["./src/operations/**/*.graphql"]
}
},
rules: {
"@graphql-eslint/no-duplicate-fields": 2,
Expand Down
10 changes: 10 additions & 0 deletions crates/rover-client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion crates/rover-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"devDependencies": {
"@graphql-eslint/eslint-plugin": "3.20.1",
"eslint": "9.4.0",
"graphql": "16.8.1"
"graphql": "16.8.1",
"@eslint/compat": "^1.0.3"
},
"engines": {
"node": "<21",
Expand Down

0 comments on commit 2c5f096

Please sign in to comment.