gtanner / qrcode-terminal

QRCodes in your terminal, cause thats hot.
Apache License 2.0
1.28k stars 100 forks source link

use hex escapes instead of octal to satisfy overzealous linters #29

Open stevvvn opened 6 years ago

stevvvn commented 6 years ago

I ran into this issue trying to bundle an app with nexe:

Acorn error: Octal literal in strict mode (3:13)
File: /home/git/hub-service-node/node_modules/qrcode-terminal/lib/main.js

1 var QRCode = require('./../vendor/QRCode'),
2 QRErrorCorrectLevel = require('./../vendor/QRCode/QRErrorCorrectLevel'),
3 black = "\033[40m \033[0m",

I think the diagnostic is wrong as this code shouldn't be evaluated by strict standards, but oct->hex seems like an easy enough compromise to convince it to include the file in the bundle.

stevvvn commented 6 years ago

CI failure seems out of my control

ramphy commented 1 year ago

This is a necessary update! Thank you!

AlexV525 commented 11 months ago

@gtanner Can we get this resolved?

chybisov commented 9 months ago

@mwbrooks @gtanner please merge and release this fix. We have issues using qrcode-terminal with Next.js 14 because of this. 🙏