Open groovy9 opened 4 years ago
There is no eslint support by this extension.
This is old, but @groovy9 maybe this will help:
I have the following in coc-settings.json:
"eslint.filetypes": ["javascript", "typescript", "svelte"],
"coc.preferences.formatOnSaveFiletypes": [
"javascript",
"typescript",
"typescriptreact",
"json",
"javascriptreact",
"typescript.tsx",
"graphql",
"svelte"
]
Eslint works fine for me in .svelte files.
At the time of writing, I am using the following coc-settings.json
to get ESLint to work:
{
"eslint.probe": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"html",
"vue",
"markdown",
"svelte"
],
"eslint.options": {
"ignorePath": ".gitignore"
},
"eslint.lintTask.options": ["--ignore-path", ".gitignore", "."],
"eslint.validate": ["svelte"]
}
The most important item is eslint.validate
. You probably also want eslint.validate
.
I have coc intellisense working fine in svelte files, and coc eslint working fine in .js files, but no eslint in svelte files. Is this known to work? If so, what configuration is necessary?
I have no coc-specific stuff in my init.vim other than loading the coc plugin and having :CocInstall'd coc-svelte, coc-eslint and coc-tserver. I'm loading evanleck/vim-svelte and setting filetype to svelte. Here's my eslintrc.json:
{ "env": { "browser": true, "es6": true }, "parser": "babel-eslint", "parserOptions": { "ecmaVersion": 2019, "sourceType": "module" }, "plugins": ["svelte3"], "extends": ["eslint:recommended"], "overrides": [ { "files": ["**/*.svelte"], "processor": "svelte3/svelte3" } ], "rules": { "indent": ["error", 2], "semi": ["error", "never"], "quotes": ["error", "single"] } }