Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override which extends @graphql-eslint/schema-all throws error #1749

Closed
2 of 4 tasks
jaw187 opened this issue Jul 12, 2023 · 0 comments · Fixed by #1750
Closed
2 of 4 tasks

Override which extends @graphql-eslint/schema-all throws error #1749

jaw187 opened this issue Jul 12, 2023 · 0 comments · Fixed by #1750

Comments

@jaw187
Copy link

jaw187 commented Jul 12, 2023

Issue workflow progress

Progress of the issue based on the
Contributor Workflow

  • 1. The issue provides a reproduction available on GitHub, Stackblitz or CodeSandbox

    For example, you can start off by editng the
    'basic' example on Stackblitz.

    Please make sure the graphql-eslint version under package.json matches yours.

  • 2. A failing test has been provided

  • 3. A local solution has been provided

  • 4. A pull request is pending review


Describe the bug

Updating to v3.20.0 causes this plugin to fail with the following error when using an override which extends schema-all

Oops! Something went wrong! :(ESLint: 8.44.0Error: ESLint configuration in .eslintrc.js#overrides[0] » plugin:@graphql-eslint/schema-all » ./configs/schema-recommended is invalid:
        - Unexpected top-level property "default".Referenced from: /some/project/node_modules/.pnpm/@graphql-eslint+eslint-plugin@3.20.0_@babel+core@7.21.4_@types+node@18.16.3_graphql@16.6.0/node_modules/@graphql-eslint/eslint-plugin/cjs/index.js
    at ConfigValidator.validateConfigSchema (/some/project/node_modules/.pnpm/@eslint+eslintrc@2.1.0/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2168:19)
    at ConfigArrayFactory._normalizeConfigData (/some/project/node_modules/.pnpm/@eslint+eslintrc@2.1.0/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3010:19)
    at ConfigArrayFactory._loadConfigData (/some/project/node_modules/.pnpm/@eslint+eslintrc@2.1.0/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2975:21)
    at ConfigArrayFactory._loadExtendedShareableConfig (/some/project/node_modules/.pnpm/@eslint+eslintrc@2.1.0/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3276:21)
    at ConfigArrayFactory._loadExtends (/some/project/node_modules/.pnpm/@eslint+eslintrc@2.1.0/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3147:25)
    at ConfigArrayFactory._normalizeObjectConfigDataBody (/some/project/node_modules/.pnpm/@eslint+eslintrc@2.1.0/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3086:25)
    at _normalizeObjectConfigDataBody.next (<anonymous>)
    at ConfigArrayFactory._normalizeObjectConfigData (/some/project/node_modules/.pnpm/@eslint+eslintrc@2.1.0/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3031:20)
    at _normalizeObjectConfigData.next (<anonymous>)
    at ConfigArrayFactory._normalizeObjectConfigDataBody (/some/project/node_modules/.pnpm/@eslint+eslintrc@2.1.0/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3086:25)

To Reproduce Steps to reproduce the behavior:

  1. clone https://github.com/jaw187/typescript-eslint-repro
  2. npm i
  3. npx eslint .

Expected behavior

I expect the plugin to successfully lint files and report linting errors

Environment:

  • OS: Mac OS X
  • @graphql-eslint/eslint-plugin: 3.20.0
  • Node.js: 18.15.0

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant