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

eslint tooling changes lead to obtuse errors #3311

Closed
acao opened this issue Jul 1, 2023 · 2 comments · Fixed by #3315
Closed

eslint tooling changes lead to obtuse errors #3311

acao opened this issue Jul 1, 2023 · 2 comments · Fixed by #3315

Comments

@acao
Copy link
Member

acao commented Jul 1, 2023

After the eslint tooling changes, I'm seeing some obscure errors that don't even indicate what file is the problem
image

following docs and similar bugs reported, this seems to indicate that our eslint config and prettier config are out of sync/clashing. prettier --write should fix this issue but does not. it is likely caused by a file that eslint is checking but is ignored by prettier

@acao
Copy link
Member Author

acao commented Jul 1, 2023

I have seen this a few times, I will come back with a case to re-create it.

offhand, I think that for example pushing an import in a file with double quotes that is ignored by prettier will reproduce this issue

@dimaMachina
Copy link
Collaborator

I made setup ESLint rule quotes to avoid unnecessary backticks #3196
this rule matches Prettier, but also replaces backticks with single quotes

to remove console warning we should remove this script

"lint-check": "eslint-config-prettier .eslintrc.js",
because we already use eslint-config-prettier as last item in extends to disable all style rules except quotes

graphiql/.eslintrc.js

Lines 42 to 51 in ab387ab

extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:react/jsx-runtime',
'prettier',
],

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

Successfully merging a pull request may close this issue.

2 participants