.eslintrc.js is not loaded when using graphql plugin
See original GitHub issueHey,
I try to make use of the new graphql plugin for eslint. Therefore we are forced to use a eslintrc.js. I also tried to set eslint.validate with different settings for javascript and jsx. But:
On the console it keeps saying:
“Cannot read config file: /Users/blabla/.eslintrc.js Error: Unexpected token …”
My config looks like this:
const schema = require('./src/server/graphql/schema')
const { printSchema } = require('graphql')
const schemaString = printSchema(schema)
module.exports = {
parser: 'babel-eslint',
rules: {
'graphql/template-strings': ['error', {
env: 'apollo',
schemaString
}]
},
plugins: [
'graphql'
]
}
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
eslintrc.js is not loaded when using graphql plugin · Issue #488
I assume that the graphql plugin uses JS syntax that needs a modern JS runtime. We load ESLint into VS Code node runtime...
Read more >ESLint: no error highlighting for GraphQL : WEB-49805
Create a .eslintrc.js configuration file and place it at the root of the project. Configure an override to use an ESLint plugin that...
Read more >@graphql-eslint/eslint-plugin - npm
Integrates with ESLint core (as a ESTree parser) · Works on . · Lints both GraphQL schema and GraphQL operations · Extended type...
Read more >Failed to load plugin 'import' declared in '... » eslint-config ...
js This can happen for a couple of reasons: - The plugin name is spelled incorrectly in an ESLint configuration file (e.g. ....
Read more >eslint/eslint - Gitter
Failed to load plugin 'react' declared in 'project-igi/.eslintrc.js': Cannot find module 'eslint-plugin-react' This can happen for a couple of ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I assume that the graphql plugin uses JS syntax that needs a modern JS runtime. We load ESLint into VS Code node runtime which is still 7.9.0 (given by Electron). Does this reproduce for you if you execute this in a terminal using node 7.9.0?
If not can you provide me with a GitHub repository I can clone that demos this.
P.S.: VS Code is working on moving to Electron 2.0 which will gives us a decent new JS runtime.
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!