Use ES Lint, Jest, Prettier configs with deno
I'm using some published ES Lint, Prettier, Jest configs for Salesforce LWCs provided by Salesforce. Is there a way to leverage these configs with deno lint, deno format, deno test commands? I don't see config options for this in the documentation.
7 Replies
You might be able to use some of the options from
prettier
but for other too I don't think there's a way to do itIs there a way to extend for a framework? I saw there were some unstable support for Vue and Svelte
Could you please elaborate what do you mean?
When working with Vue or Svelte you might have to use
--unstable-sloppy-imports
featureThanks for the responses and guidance.
I had noticed the
deno fmt --unstable-component
flag and thought it could be extended. But, after reviewing the demo fmt
code, I see it's simply looking at the file extensions for those frameworks and calling format_html
since those frameworks name their HTML templates with custom extensions. LWC doesn't do this; it only has .html and js/ts files. So, the formatter should work for LWC.
However, for linting, LWC has many ES Lint rules for various functionalities that the framework provides. Is there currently a way to add your own rules to deno lint
? If not, are there any plans for this in the future?It's currently not possible but it's on the roadmap to provide a plugin system
Awesome. Deno looks great. You guys have done a phenomenal job. I’m looking forward to the extensibility. Thanks for the help and information.
Thank you so much :deno_thankyou: