eslint-config-canonical
eslint-plugin-unicorn
Our great sponsors
eslint-config-canonical | eslint-plugin-unicorn | |
---|---|---|
7 | 39 | |
570 | 3,854 | |
- | - | |
8.2 | 8.6 | |
3 months ago | 7 days ago | |
JavaScript | JavaScript | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
eslint-config-canonical
-
ESLint-config-canonical: 1k rules ESLint rules
https://github.com/gajus/eslint-config-canonical
I will repost this every couple of years, as it now has been 8 years since I regularly update this config. For most projects, adopting this is going to be as simple as:
{
- Show HN: Canonical – 1k ESLint rules to automate code conventions
-
semver: v1 vs v1000
It's something that keeps coming up in GitHub issues on my various projects... they point at my project version, which could be v7, v28, v33, and then say "This project versioning is bad." or "This project API is unstable.", etc. and then compare them to projects that are v1, as if that somehow proves their point.
-
Why is is prettier used if eslint can format?
For anyone would would like to migrate from Prettier to ESLint, https://github.com/gajus/eslint-config-canonical covers everything that Prettier does and a lot (a lot) more.
-
ESLint plugin for Storybook
Should we add it to https://github.com/gajus/eslint-config-canonical ?
- eslint-config-canonical: 1,000+ rules ESLint rules
eslint-plugin-unicorn
-
Anyone using the data types Map and Set IRL?
I recently scanned out codebase with https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-set-has.md and found many instances of potential "accidentally quadratic" uses of array.includes instead. gas a nice autofix to convert to set. there are some fun and sometimes useful lint rules out there...
-
this has broken my code 3 times
There’s an ESLint rule for that (albeit in a plugin)
-
Array.reduce() feels like a cheat code/superpower if you know how to use it.
Many popular eslint configs have even introduce rules to warn on its usage for these very reasons.
-
Why are functions declared inside a component instead of directly in the file.
eslint-plugin-unicorn
- es-lint rule to force arrow functions as callbacks
- 100+ ESLint rules
-
TIL about the Nullish Coalescing Operator in Javascript (??)
I find eslint-plugin-unicorn package pretty useful for updating old code. With IE11 dead and NodeJS v12 LTS sunsetting soon, it's a brave new world.
- JS Array.foreach vs for-loops, pros and cons, which do you use and why
-
Code Review chronicles: destructuring, linting and one valid reason for Typescript
Default parameters should not be passed to a function through an object literal. The foo = {a: false} parameter works fine if only used with one option. As soon as additional options are added, you risk replacing the whole foo = {a: false, b: true} object when passing only one option: {a: true}. For this reason, object destructuring should be used instead. Linter rule
What are some alternatives?
quick-lint-js - quick-lint-js finds bugs in JavaScript programs
eslint-config-xo - ESLint shareable config for XO
typescript-eslint - :sparkles: Monorepo for all the tooling which enables ESLint to support TypeScript
eslint-plugin-react-hooks-addons - ESLint rule to check unused and potentially unnecessary dependencies in useEffect hook.
eslint-plugin-canonical - ESLint rules for Canonical ruleset.
proposal-numeric-separator - A proposal to add numeric literal separators in JavaScript.
roarr - JSON logger for Node.js and browser.
putout - 🐊 Pluggable and configurable JavaScript Linter, code transformer and formatter with built-in ESLint and Babel support for js, jsx typescript, flow, markdown, yaml and json. Write declarative codemods in a simplest possible way 😏
eslint-plugin-storybook - 🎗Official ESLint plugin for Storybook
eslint-plugin-boundaries - Eslint plugin checking architecture boundaries between elements
eslint-config-prettier - Turns off all rules that are unnecessary or might conflict with Prettier.
eslint-plugin-proper-ternary - ESLint rules to ensure proper usage of ternary/conditional expressions