inventaire / inventaire-client

webapp coupled to the inventaire server :books:
https://inventaire.io
49 stars 16 forks source link

Ignore compat #379

Closed jum-s closed 1 year ago

jum-s commented 1 year ago

This is an attempt to not extend compat plugin, introduced by 170620efd, for a quicker linting (ie. in editor).

This is because, when benchmarking eslint (prepend TIMING=1 to the command), the process ends up showing that the compat plugin takes a while, maybe it could be disabled in development?

Example on a quite big file:

$ TIMING=1 eslint app/modules/entities/components/layouts/works_browser.svelte
Rule                                 | Time (ms) | Relative
:------------------------------------|----------:|--------:
svelte/valid-compile                 |   267.794 |    46.8%
compat/compat                        |   196.162 |    34.3%
indent                               |    31.995 |     5.6%
svelte/indent                        |    16.262 |     2.8%
...

Unfortunetely, eslint is complainging that a code comment in viewport.js wants this plugin. I havent found a workaround for it, hence the WIP status of the PR

maxlath commented 1 year ago

The whole eslint-disable-next-line compat/compat comment could be removed, as and_uc 12 is now out of the list of supported browsers