ecmascript_news, to javascript
@ecmascript_news@mastodon.online avatar

ESLint compatibility utilities let you use older plugins with ESLint v9
@nzakas @eslint
https://eslint.org/blog/2024/05/eslint-compatibility-utilities/

ecmascript_news, to javascript
@ecmascript_news@mastodon.online avatar
ecmascript_news, to javascript
@ecmascript_news@mastodon.online avatar
ecmascript_news, to javascript
@ecmascript_news@mastodon.online avatar
ecmascript_news, to javascript
@ecmascript_news@mastodon.online avatar
coderbyheart, to typescript
@coderbyheart@chaos.social avatar

Migrated to typescript-eslint which now has support for the new FlatConfig: https://eslint.org/docs/latest/use/configure/configuration-files-new

The immediate benefit here is now that all plugins used in a shared config are actually imported modules, so any host package that depends on the shared config, automatically has the right plugins. No more "multiple versions of an eslint plugin installed" problems.

#eslint #typescript

voxpelli, to svelte
@voxpelli@mastodon.social avatar

Got reason to look into svelte-check, the tool for projects, and I must say – their approach is intriguing.

It’s essentially invoking Language Service () diagnostics for all the files and using the diagnostics output from the TypeScript, HTML and CSS language services to determine if there's an error or not.

In other words: Mimicking how eg. VSCode does to report errors and warnings in its UI.

This is a very interesting approach compared to eg. @eslint parsers

voxpelli,
@voxpelli@mastodon.social avatar

It becomes even more interesting when one consider that eg. the #TypeScript Language Service is extensible through plugins, and one should eg. be able to hook #eslint into it: https://github.com/Quramy/typescript-eslint-language-service

Combine that with @tseslint and you'll have but typescript in your typescript so you can typescript

twipped, to random
@twipped@twipped.social avatar

I’m sorry… what?! Is shopify one jigantic monolith? #ESLint is far from performant (there’s a fantastic article about why that is), but even on million line codebases I’ve never seen it cross five minutes.

ryguw, to rust
ecmascript_news, to javascript
@ecmascript_news@mastodon.online avatar
alexleduc, to javascript
@alexleduc@mstdn.ca avatar

I had to get this off my chest: Opinionated code formatters suck #javascript #prettier #biome #eslint https://dev.to/alexleduc76/opinionated-code-formatters-suck-3b1

ecmascript_news, to javascript
@ecmascript_news@mastodon.online avatar
ecmascript_news, to javascript
@ecmascript_news@mastodon.online avatar
brawaru, (edited ) to javascript
@brawaru@mstdn.social avatar

developers, do you think should be a part of the build process?

I've seen quite a few projects use and plugins to run ESLint during their build process. This both shows a huge error overlay when there are linting errors, and halts the build when building for production.

However, I never understood that, as linting does not really ensure validity of the code, but rather that it aligns to some stylistic rules.

What do y'all think about this?

brawaru,
@brawaru@mstdn.social avatar

To expand on the above, while #ESLint may prevent some errors (e.g. missed React dependency or such), it usually doesn't ensure that your code is valid and ready to run. Therefore, I think ESLint, just like #Prettier, should be only present as a plugin in your IDE and separate script in a package.

I would even go as far as to say that ESLint during the build is harmful and slows you down, as it can error for silly things like spaces, that do not affect the result of your code whatsoever.

ecmascript_news, to javascript
@ecmascript_news@mastodon.online avatar
voxpelli, to programming
@voxpelli@mastodon.social avatar

FYI – I’m available for / / conference talks / shorter gigs (1-2 days at a time)

I’m right now primarily focusing on my own projects but happy to share my experience with others + never wrong to refill the wallet a bit.

Topics I’m extra thrilled about:

janriemer, (edited ) to javascript

This is mad 🤯

oxc - The Oxidation #Compiler is creating a suite of high-#performance tools for the #JavaScript / #TypeScript language re-written in #Rust - by Boshen:

https://github.com/web-infra-dev/oxc

Its linter is 50 - 100 times faster than #ESLint...

https://github.com/Boshen/bench-javascript-linter

...and its parser is even 2x faster than #swc

https://github.com/Boshen/bench-javascript-parser-written-in-rust

#JS tooling goes brrrrrrrrrrr! 🚀

#RustLang #WebDev #WebDevelopment

felixthehat, to javascript

does anyone know how to prevent my attributes from formatting into a single line when saving my vue components?

I long ago lost the battle against prettier/eslint/vscode and just tend to leave it to it but I find this particularly irritating

#vue #nuxt #vscode #prettier #eslint #webdev

a screen recording showing my nicely formatted vue component with attributes on single lines, turned into a long, single line on save :(

ecmascript_news, to javascript
@ecmascript_news@mastodon.online avatar

ESLint configuration migration guide (from eslintrc to flat format)
@eslint
https://eslint.org/docs/latest/use/configure/migration-guide
#ECMAScript #JavaScript #ESLint

SenseException, to random German
@SenseException@phpc.social avatar

Well, that's a way to name a coding style rule that prevents == in favor of === instead: "eqeqeq"
#eslint

coderbyheart, to javascript
@coderbyheart@chaos.social avatar

Oh hell, there is new work on the horizon. TypeScript #ESLint v6 just came out (https://typescript-eslint.io/blog/announcing-typescript-eslint-v6/), but ESLint 9 not yet, which adds a new config format (https://eslint.org/docs/latest/use/configure/configuration-files-new), and everything is going to be broken when it comes to code style tooling for the next 12 months, I fear.
#JavaScript

ecmascript_news, to javascript
@ecmascript_news@mastodon.online avatar
schizanon, to webdev
@schizanon@mas.to avatar

Today's my first day trying .

Not sure how I feel about the built in and formatter yet; me and are besties, and I have gotten used to

Still gonna give it a try.

mvsde, to random
@mvsde@mastodon.social avatar

#Stylelint deprecated all stylistic rules and #ESLint is also kinda moving in that direction.

Maybe it’s finally time to take a look at #Prettier? 🤔

But I definitely have to configure it so code stays readable and doesn’t become this mess of seemingly random line breaks.

Ever looked at what Prettier does to JS template literals? It’s certainly something 😬

https://stylelint.io/migration-guide/to-15

voxpelli,
@voxpelli@mastodon.social avatar

@mvsde I’ll probably go with #dprint instead of #prettier if I go beyond what #eslint still supports stylistically.

dprint feels as un-opinionated and configurable as ESLint whereas Prettier is quite opinionated.

Looked at it? https://dprint.dev/

  • All
  • Subscribed
  • Moderated
  • Favorites
  • megavids
  • cubers
  • magazineikmin
  • GTA5RPClips
  • khanakhh
  • InstantRegret
  • Youngstown
  • mdbf
  • slotface
  • thenastyranch
  • everett
  • osvaldo12
  • kavyap
  • rosin
  • anitta
  • DreamBathrooms
  • Durango
  • modclub
  • ngwrru68w68
  • vwfavf
  • ethstaker
  • tester
  • cisconetworking
  • tacticalgear
  • Leos
  • provamag3
  • normalnudes
  • JUstTest
  • All magazines