#eslint
Good explanation of the differences between a linter and a formatter.
@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/
Also check out my personal extended #StandardJS configuration for @eslint (targeted at #TypesInJS projects): https://github.com/voxpelli/eslint-config
Feel free to use it or to be inspired by it for your own #ESLint configs.
Stepped in these last few days and did some long overdue releases of #StandardJS despite having lots of else on my plate currently.
New releases of:
- https://github.com/standard/standard-engine/releases/tag/v15.1.0 (First in three quarters!)
- https://github.com/standard/eslint-config-standard/releases/tag/v17.1.0 (First in a year!)
- https://github.com/standard/standard/releases/tag/v17.1.0 (First in a year!)
- https://github.com/standard/semistandard/releases/tag/v17.0.0 (First 17.x release, first release in almost 2 years!)
If you like what I do, consider sponsoring me: https://github.com/sponsors/voxpelli
eslint config is ready #ESLint 9 now :)
Got a lot of changes, mainly that configs now come as a configure() function. #Preact and the jsx runtime are now simple boolean options, my opinionated strict rules are now optional (for the most part) and I documented a workaround for __dirname in esm configs in the #TypeScript section of the README
funfact: the moment I switched to the new #ESLint config I published earlier today I found a bug where I had [object Object] in some urls:
Quickly backported my new ts-strict ruleset for @eslint from the 3.0 rewrite:
https://www.npmjs.com/package/eslint-config-foxkit
{
extends: ["eslint:recommended", "foxkit", "foxkit/ts-strict"]
}
New post: ESLint fan? Curious about ESLint? I wrote a post about it with the best of the tool:
ESLint v8.40.0 released
https://eslint.org/blog/2023/05/eslint-v8.40.0-released/
#ES_Next_News #ECMAScript #JavaScript #ESLint
To make #TypeScript ensure you're writing safe code, you need to properly configure it, but proper configuration is really messy, and tools like #ESLint don't even support it. So you are left with the single TSConfig that makes TypeScript lie and deceive you.
This is the state of modern #JavaScript development experience.
Still working on my #reactjs project. Had some problems with #eslint that took a good bit of time, but did find time to finish the 404 page.
You can find the code on #github
https://github.com/mhoumann87/birthday-reminder

Also #react mit #bootstrap und #typescript ist ja schon klasse fürs #Frontend, wenn man es denn mal so hinbekommt, dass es das macht was man will - mit dem #javascript wie ich es kenne, hat das aber überhaupt nichts mehr zu tun:
Allein den Editor #VScodium so zu trimmen, dass #prettier und #eslint mit den Konfigs in #react zusammenarbeiten war echt nervtötend.
Für das Backend mit #python #cgi wird das nicht so nervenaufreibend werden, hoffe ich...
#TIL there is a #eslint cli flag `--report-unused-disable-directives`
https://eslint.org/docs/latest/use/command-line-interface#--report-unused-disable-directives
I've got such a weird problem; it looks like #eslint is running in it's own thread. So when running `yarn lint` it finishes, then 5 seconds later it takes over the console again with the actual output. This is causing havoc!
Any ideas? #JavaScript #JS #Code
My latest (and greatest) book, JavaScript All-in-One For Dummies, is available now!
Every junior developer or aspiring JS developer needs this book, imho.
The book teaches modern #JavaScript, how browsers work, using #VSCode like a pro, #Git, #prettier, #eslint, #vite, #webpack, #react, #vue, #svelte, #http, #jest, #node, #express, #mongodb, #mongoose, and finishes with a chapter on authentication with #jwt.
It took me 6 months to write and is over 800 pages.
Announcing the `eslint-community` GitHub organization
https://eslint.org/blog/2023/03/announcing-eslint-community-org/
#ES_Next_News #ECMAScript #JavaScript #ESLint
Everyone wants to add tools to the dev env, but nobody wants to support their team when they break the precommit hooks. #eslint #typescript #jest #tdd #danger #testCoverage #linting #husky
I'm going to be at 🌴 React Miami 2023 this April, talking about some of my favorite stuff in code - setting up ESLint and TypeScript for React! Hope to see you there! ☺️
✨ www.reactmiami.com ✨
I just finished the final review of my new book (coming in May): JavaScript All-In-One For Dummies. This one has been my dream to write for over a decade, and I've been working on it for 10 months.
When I used to hire junior developers, I'd find myself (and them) overwhelmed with how much they had to know to be to be productive. This book addresses that.
#JavaScript #Git #vscode #React #Vue #Svelte #ESLint #Jest #Node #webapi #express #mongodb #webpack #babel #vite #rest #jwt #micdrop
ESLint v8.35.0 released
https://eslint.org/blog/2023/02/eslint-v8.35.0-released/
#ES_Next_News #ECMAScript #JavaScript #ESLint
#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 😬
Just learned that #ESLint has deprecated all style and formatting rules. Are there any other good code formatters for #JavaScript / #TypeScript? I know #Prettier is quite common, but its way too opinionated for my tastes.
#Coding #Dev #Programming #WebDevelopment #SoftwareDevelopment
Some secrets from the #Vaadin R&D weekly update. Our #designsystem team has been working on really cool stuff lately, including #buildWithLit experiments! Also, do check out eslint-config-vaadin alpha, it's a great #eslint config:
Speeding up the JavaScript ecosystem – ESLint
https://marvinh.dev/blog/speeding-up-javascript-ecosystem-part-3/
#EsNextNews #EcmaScript #JavaScript #ESLint
https://dev.to/knowankit/setup-eslint-and-prettier-in-react-app-357b - setup #ESLint and #Prettier for a #React app. Nice tutorial https://github.com/knowankit.

#react / #preact devs: does the #eslint "exhaustive deps" rule make sense for useEffect? It doesn't seem like it does, to me. useEffect says "when these dependencies change, run this callback" and by nature of *any* dependency changing, the callback will be reinitialized, so it's not like if I only want it to run on X changing, but I reference Y, Y would be stale… right? Y in the new callback would still be up-to-date, wouldn't it?
ESLint v8.33.0 released
https://eslint.org/blog/2023/01/eslint-v8.33.0-released/
#EsNextNews #EcmaScript #JavaScript #ESLint
#eslint binary POC created with #Deno.
#javascript
https://github.com/bartlomieju/eslint_binary
ESLint’s 2022 year in review
https://eslint.org/blog/2023/01/eslint-2022-year-review/
#EsNextNews #EcmaScript #JavaScript #ESLint
published a repo with setup instructions and resources for my dev environment: https://github.com/ryanatkn/setup
I do web dev in Ubuntu/Debian (both standalone and with Windows via WSL) and the bash setup script depends on `apt`
includes #NodeJS #svelte #ESLint #prettier #VSCode #postgres #FishShell and my own toolkit #gro
it's like a `dotfiles` repo but with more things and better docs
Is there any #eslint plugin available for checking common performance issues in javascript?, especially when dealing with DOM.
An article I just wrote on the dangers of writing in JavaScript and how to avoid (some of) them:
An article I just wrote on the dangers of writing in JavaScript and how to avoid (some of) them:
Is it just me or is developer tooling in #react superior to #vue? It seems to me that tools like #eslint and #typescript are less likely to work correctly in vue templates or at least require additional configuration that needs to be maintained additionally.
Adding ESLint to an existing project, or modifying your rules, can result in a lot of errors being reported. It isn't always reasonable to fix them all at once, though.
To help with that, I've created an npm package called eslint-ratchet. It tracks the number of ESLint errors being reported in your code and prevents it from going up. When the number of errors goes down, it "ratchets down" and that new lower number is the new limit.
Interesting name for this TypeScript ESLint rule option.

@CodingItWrong #eslint is for logical code errors.
For example reactjs has some warnings, for syntactically correct code but logical errors, eslint has special rules for this.
#prettier simply formats code
@CodingItWrong Some pointers that helped me:
- Formatting and linting are two distinct operations with two distinct goals.
- #Prettier is firstly a set of well-regarded code-format opinions that happens to come with a formatting tool.
- #ESLint is a general purpose code linter that can also do formatting.
To do both, you can either run it as two separate CLI commands, or just run the one eslint command configured with the prettier ruleset. The outcome should be the same.
I like this feature request in eslint-plugin-expect-type from @rauschma - would love to see folks chime in on the exact semantics!
#eslint #typescript #typescript-eslint
https://github.com/JoshuaKGoldberg/eslint-plugin-expect-type/issues/65
ESLint v8.29.0 released
https://eslint.org/blog/2022/12/eslint-v8.29.0-released/
#EsNextNews #EcmaScript #JavaScript #ESLint
Reading the #eslint complete rewrite discussion on GitHub and there are just reams upon reams of Typescript users moaning about how complicated Typescript makes everything.
Just page after page after page of "Typescript is so fucking complicated to use; my life is basically consumed by Typescript." and then they punctuate it with "and you need to make it easier for me by making your thing Typescript, too."
The call is coming from inside the house, fellas (it's always fellas).
Has anyone else been getting frequent #memoryleak #errors with the #webpack #cli recently? I’m on version 4.10.0 of the CLI and 5.21.2 of webpack. I get them about three times a day at work when I’m making changes and using #HotReloading. I’m not sure what’s causing the leak (webpack, the CLI, or maybe #eslint?) but it’s really #annoying
Published my first #npm #ESLint package. I’ve contributed to ESLint before, but never actually published my own package.
It was not bad at all. It took about 2 hours.
The rule is really simple and not useful to most people, but it was a nice way to ensure that we don’t forget to add #a11y #axe #jest tests to our test files and I can imagine it being useful for other similar code-hygiene patterns some day: https://github.com/katerberg/eslint-plugin-file-contains
There should be versions of `eslint-disable`, `stylelint-disable` (-line etc) that would instead of removing the errors & warnings, reduce the severity: removing the warnings, and making errors into warnings.
This way it would be possible to mark something be safe to pass the CI, but keep the visible warning.
Otherwise, we basically need to make a separate rule that targets the disabling comment for a specific rule and gives a warning for it, which is a bit meta.
@randName I saw recently that #ESLint is considering using #JSDoc to generate types. https://github.com/eslint/eslint/discussions/16557
I'm curious, what has your experience been like using that approach? It sounds like you've been forced to fall back to writing actual type definitions. Are you in a monorepo setup, which is why you mention them being installed in node_modules?
@elijahmanor I’m in the market for this as well. At work, our code bases each have their own configuration, some of which have questionable rules enabled (ie: non-indented switch statements). I’ve taken the task to standardize our #javascript styling rules and create a standard configuration. With this, I’ll need to fix all the errors that #ESLint will complain about.
@rust_discussions "In the follow up discussion we can learn more about the idea for the new linter[...] by using abstract syntax tree (AST) to understand the code structure and organize it nicely."
How else would someone lint code if not with an #AST? What algorithm/data structure does #ESLint use currently?
Interesting. #ESLint is considering a full rewrite, maybe with parts of it in #RustLang, and likely not using #TypeScript, but rather JS + JSDoc. There's also a proposal here to expand from single-file linting to exposing a global "session" context to parsers and rules.
Definitely some good discussion going on here, and I'm excited to see what comes of it.
Complete rewrite of ESLint
https://github.com/eslint/eslint/discussions/16557
#EsNextNews #EcmaScript #JavaScript #ESLint
@nzakas +1 for using jsdoc types. this would be an excellent example to the community of the pattern!
#typescript #eslint
ESLint v8.28.0 released
https://eslint.org/blog/2022/11/eslint-v8.28.0-released/
#EsNextNews #EcmaScript #JavaScript #EsLint
Looking forward to hanging with Josh Goldberg again on the my Twitch stream next week! We’ll be discussing ASTs, ESLint, and TypeScript ESLint and hopefully get a bit of live coding in as well.
Come hang with us Wednesday, November 23rd at 4:30 pm UTC! (Not the usual 5 pm UTC)
https://iamdeveloper.live/schedule?segmentID=9fe8e9bc-9cfe-4264-8b6b-088a3c95b355 #typescript #eslint
Finally got around to update my #ESLint config with some nice bits I picked up in the last 12 months:
* Tabs for indentation
* Trailing commas
* Consistent array new lines
* Import sorting
https://github.com/pangolinjs/eslint-config/releases/tag/v7.0.0
@mrmaverick That's great. Open source is an excellent way to level up and learn from really smart people. That's how I got my start in software development when @nzakas gave me an opportunity to help out with #eslint way back in the day. Not only did I learn about the #javascript AST and best-practices, but also how to work in a team on a software project. It was invaluable. Best of luck on your journey, and have fun!