Comments (8)
How about an option ignoreProjectsWithoutEslintConfig
/disableProjectsWithoutEslintConfig
? :)
from coc-eslint.
eslint doesn't provide an API for resolve configuration file, so you have to use "eslint.enable": false
in your .vim/coc-settings.json
inside project folder.
Maybe someone can help to implement such functionality.
from coc-eslint.
I ran into the same problem. +1 on adding an option to ignore projects without an ESLint configuration file. A global default ESLint configuration really just won't work; like @andys8 said, you need different configurations for TypeScript vs JavaScript and node projects vs browser projects.
from coc-eslint.
Checkout https://github.com/neoclide/coc.nvim/wiki/Using-the-configuration-file or create eslint config file in your $HOME
from coc-eslint.
Thanks for the reply.
Thought about those solutions:
- global eslint won't work, because projects are far too different (node/js/ts/frameworks).
- disabling in project would work, but depends on modifying a project even if it's not owned
from coc-eslint.
No, global eslint config file could work as default configuration file.
from coc-eslint.
Yeah, I understand. I think it won't work for my case. E.g. it's a minimal eslint config file. Then opening a typescript based project without eslint file will fail, because its content can't be parsed. This eslint would basically have to match any project (ts, js, browser, node, react, vue).
from coc-eslint.
maybe something like
autocmd BufNewFile,BufReadPre,BufEnter
\ */myproject/*.{js,jsx,ts,tsx}
\ call coc#config('eslint.enable', v:false)
autocmd BufLeave
\ */myproject/*.{js,jsx,ts,tsx}
\ call coc#config('eslint.enable', v:true)
from coc-eslint.
Related Issues (20)
- Eslint 8 support HOT 1
- Coc-eslint doesn't work with eslint@8 HOT 10
- undeprecate `eslint.enable`
- coc-eslint does not detect eslintrc unless it is placed in the root folder HOT 4
- Connection to server got closed. Server will not be restarted. HOT 1
- Usage with XO
- Is there any configuration for easily opening a recommendation link? HOT 1
- The "initializing eslint" notification never disappears HOT 2
- [bug] Diagnostic level hard-coded to Unnecessary/Warning/1 for no-unused-vars rule HOT 3
- UnhandledRejection opening markdown files HOT 22
- Stuck as "Initializing eslint" popup
- ESLint 8 flat config support HOT 3
- Parsing error: ESLint was configured to run on .... However that TSConfig does not include this file HOT 1
- how does eslint work
- shoudFix parameter was false HOT 4
- Need some clarification
- Coc-eslint not working with yarn Plug'n'Play HOT 2
- Setting `useFlatConfig` to true breaks ESLint integration for projects that use the older config style HOT 1
- when autoFixOnSave fails, the file can't be saved HOT 2
- is coc-eslint still maintained? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coc-eslint.