0

I'm using coc.nvim for react (typescript) development. I have installed following coc plugins.

  • coc-tslint-plugin
  • coc-tsserver
  • coc-prettier

tslint integration is enabled for prettier in coc-settings.json.

"prettier.eslintIntegration": true,
"prettier.tslintIntegration": true,
"prettier.stylelintIntegration": true,
coc.preferences.formatOnSaveFiletypes": ["typescriptreact"],

When a tsx is saved, it formats the file but it is logging following warning messages.

[coc.nvim] error: Warning: The 'no-array-mutation' rule requires type information.
[coc.nvim] error: Warning: The 'no-object-mutation' rule requires type information.
[coc.nvim] error: Warning: The 'promise-function-async' rule requires type information.
[coc.nvim] error: Warning: The 'await-promise' rule requires type information.
[coc.nvim] error: Warning: The 'no-floating-promises' rule requires type information.
[coc.nvim] error: Warning: The 'no-for-in-array' rule requires type information.
[coc.nvim] error: Warning: The 'no-inferred-empty-object-type' rule requires type information.
[coc.nvim] error: Warning: The 'no-null-undefined-union' rule requires type information.
[coc.nvim] error: Warning: The 'no-restricted-globals' rule requires type information.
[coc.nvim] error: Warning: The 'no-unbound-method' rule requires type information.
[coc.nvim] error: Warning: The 'no-unsafe-any' rule requires type information.
[coc.nvim] error: Warning: The 'no-void-expression' rule requires type information.
[coc.nvim] error: Warning: The 'restrict-plus-operands' rule requires type information.

How do I enable type information for coc.prettier?

0

After a quick google, I found this, which suggests this is not a coc.nvim issue, but a typescript configuration issue.

my understanding is you'd need to provide the typeCheck: true config option to ts-loader, at the cost of tslint running slower

That said, the issue hasn't had much activity in a year.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.