eslint-plugin-canonical
eslint-plugin-unicorn
eslint-plugin-canonical | eslint-plugin-unicorn | |
---|---|---|
4 | 41 | |
138 | 4,373 | |
6.5% | 0.8% | |
8.0 | 8.8 | |
about 1 month ago | 7 days ago | |
TypeScript | 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-plugin-canonical
-
is there a utility for auto adding .ts or .tsx extension to imports?
Here is the implementation for others searching for it https://github.com/gajus/eslint-plugin-canonical/blob/main/src/rules/requireExtension.ts Most of the complexity is hidden by eslint-module-utils/resolve, luckily.
-
[AskJS] What ESLint rules do you use to achieve better isolation of components?
You can track progress here https://github.com/gajus/eslint-plugin-canonical/pull/16
- eslint-config-canonical: 1,000+ rules ESLint rules
eslint-plugin-unicorn
-
Just use this Next.js Eslint Configuration
XO. This feels like the Black of Typescript linting. XO has styles for everything and is very opinionated. This can be nice, because it takes a lot of code style decisions off of your plate. But beware it can be cumbersome to implement in the middle of a project because it will require extensive reformatting. In lieu of XO, I found Unicorn opinionated enough and more immediately useful.
-
Incrementally fixing lots of ESlint errors in a clean way with ESlint Nibble
Recently, we chose to add the Unicorn plugin, which contain dozens of ESlint rules. It can feel overwhelming at first because it triggers hundreds of errors. Fortunately, we discovered eslint-nibble: a command line tool that helps adding rules one by one with a graphical interface.
-
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.
What are some alternatives?
eslint-config-canonical - The most comprehensive ES code style guide.
eslint-config-xo - ESLint shareable config for XO
dependency-cruiser - Validate and visualize dependencies. Your rules. JavaScript, TypeScript, CoffeeScript. ES6, CommonJS, AMD.
proposal-observable - Observables for ECMAScript
eslint-config-prettier - Turns off all rules that are unnecessary or might conflict with Prettier.
eslint-plugin-github - An opinionated collection of ESLint rules used by GitHub.
putout - ๐ Pluggable and configurable JavaScript Linter, code transformer and formatter, drop-in ESLint superpower replacement ๐ช with built-in support for js, jsx, typescript, flow, markdown, yaml and json. Write declarative codemods in a simplest possible way ๐
eslint-plugin-react-hooks-addons - ESLint rule to check potentially unintended dependencies in the useEffect hook.
eslint-plugin-boundaries - Eslint plugin checking architecture boundaries between elements
proposal-numeric-separator - A proposal to add numeric literal separators in JavaScript.
picoc - A very small C interpreter
eslint-plugin-proper-ternary - ESLint rules to ensure proper usage of ternary/conditional expressions