eslint-plugin-big-number-rules
eslint-plugin-simple-import-sort
Our great sponsors
eslint-plugin-big-number-rules | eslint-plugin-simple-import-sort | |
---|---|---|
4 | 7 | |
12 | 1,896 | |
- | - | |
3.0 | 6.7 | |
5 days ago | 16 days ago | |
JavaScript | JavaScript | |
MIT License | 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-big-number-rules
-
eslint-plugin-big-number-rules: Enforce finance-safe calculations (helps 0.1 + 0.2 really equal 0.3)
And they did bite me, so I wrote this eslint plugin to help out a FinTech app that was experiencing a number of such bugs.
-
Speeding up the JavaScript ecosystem - one library at a time
Either avoid floating-point, perhaps using BigInt, or use a library like BigNumber.js. (Incidentally, I wrote an eslint plugin to enforce its use.)
-
[AskJS] How do you deal with floats in production apps?
I wrote an eslint plugin for it.
-
Become the master of your eslint with no-restricted-syntax
For example, say you want to avoid using native arithmetic in your finance calculations to avoid the infamous binary-floating-point problems. There's no way to get standard.js to warn you about that. But (warning: self promotion) an eslint plugin can be written to do that for you. :)
eslint-plugin-simple-import-sort
-
PURISTA - Thanks to amazing open-source software
eslint-plugin-simple-import-sort by Simon Lydell @SimonLydell
-
eslint-plugin-simple-import-sort VS eslint-plugin-perfectionist - a user suggested alternative
2 projects | 22 Jun 2023
-
Group & sort imports with EsLint
There's also this if you want more control: https://github.com/lydell/eslint-plugin-simple-import-sort
-
How I found a bug in 2000 files
I was adding a new eslint plugin that will sort imports in js/ts files. After adding eslint-plugin-simple-import-sort, I run eslint --fix and found about 2000 files changed. As there was only reorder of imports I thought that there should not be any issues.
-
Sorting your imports with ESLint
For this article, we will be using eslint-plugin-simple-import-sort. This is an ESLint plugin that enables not only sorting with some nice defaults but also grouping based on defined patterns.
-
Sorting imports on save in React projects with ESLint.
TLDR eslint-plugin-simple-import-sort
-
Become the master of your eslint with no-restricted-syntax
See the docs on custom grouping for details.
What are some alternatives?
bignumber.js - A JavaScript library for arbitrary-precision decimal and non-decimal arithmetic
eslint-plugin-vue - Official ESLint plugin for Vue.js
elephize - Typescript to PHP translation tool
XO - ❤️ JavaScript/TypeScript linter (ESLint wrapper) with great defaults
proposal-decimal - Built-in decimal datatype in JavaScript
ESLint - Find and fix problems in your JavaScript code.
kphp - KPHP — a PHP compiler
eslint-plugin-perfectionist - 🦄 ESLint plugin for sorting various data such as objects, imports, types, enums, JSX props, etc.
break_eternity.js - A Javascript numerical library to represent numbers as large as 10^^1e308 and as small as 10^-10^^1e308. Sequel to break_infinity.js, designed for incremental games.
eslint-plugin-import - ESLint plugin with rules that help validate proper imports.
decimal.js - An arbitrary-precision Decimal type for JavaScript
eslint-plugin-node - Additional ESLint's rules for Node.js