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

[question] prettier eslint integration #85

Closed
alex-popov-tech opened this issue Aug 14, 2020 · 4 comments
Closed

[question] prettier eslint integration #85

alex-popov-tech opened this issue Aug 14, 2020 · 4 comments

Comments

@alex-popov-tech
Copy link

coc-settings.json:

  "eslint.filetypes": [
    "typescript",
    "javascript"
  ],
  "eslint.run": "onSave",
  "eslint.autoFixOnSave": true,
  "eslint.options": {
    "configFile": "/Users/alexanderpopov/.eslintrc.json"
  },
  "prettier.eslintIntegration": true,
  "coc.preferences.formatOnSaveFiletypes": [
    "javascript",
    "typescript"
  ],
  "typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,
  "javascript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,

vimrc:

let g:coc_global_extensions = [
            \ 'coc-actions',
            \ 'coc-tsserver',
            \ 'coc-vimlsp',
            \ 'coc-sql',
            \ 'coc-tabnine',
            \ 'coc-spell-checker',
            \ 'coc-cspell-dicts',
            \ 'coc-snippets',
            \ 'coc-json',
            \ 'coc-yaml',
            \ 'coc-eslint',
            \ 'coc-prettier',
            \ 'coc-yank',
            \ 'coc-tslint',
            \ 'coc-explorer',
            \ 'coc-git',
            \ 'coc-java',
            \ 'coc-post',
            \ 'coc-db',
            \ 'coc-marketplace'
            \]

Expected behavior: on javascript file save it should apply prettier and then eslint
Actual behavior: it applies one format at a time, so for some issues i need to save file/ call formatting twice
Video: https://share.getcloudapp.com/OAuqqdXZ

question: is there an possibility to use both formattings in sequence automatically?

@chemzqm
Copy link
Member

chemzqm commented Aug 16, 2020

It should work, could be bug

@alex-popov-tech
Copy link
Author

@chemzqm bug in this plugin, or in coc-nvim core?

@chemzqm
Copy link
Member

chemzqm commented Aug 20, 2020

coc.nvim's bug.

@alex-popov-tech
Copy link
Author

closing this due to neoclide/coc.nvim#2269

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

No branches or pull requests

2 participants