MikeMcl / bignumber.js

A JavaScript library for arbitrary-precision decimal and non-decimal arithmetic
http://mikemcl.github.io/bignumber.js
MIT License
6.64k stars 741 forks source link

In react project, report a compile error #287

Closed 0xhiroooo closed 2 years ago

0xhiroooo commented 3 years ago

./node_modules/bignumber.js/bignumber.js Line 2008:17: Expected an assignment or function call and instead saw an expression no-unused-expressions

if (xLTy) t = xc, xc = yc, yc = t, y.s = -y.s;

hot to fix it?

shuckster commented 3 years ago

Looks like you have an eslint rule that's looking at your node_modules folder.

Make an .eslintignore file and put node_modules in it.

MikeMcl commented 3 years ago

Yes, this code is a bit unconventional. and was just to save vertical space. I may amend this at the next release.