r/programming • • Aug 24 '19

A 3mil downloads per month JavaScript library, which is already known for misleading newbies, is now adding paid advertisements to users' terminals

https://github.com/standard/standard/issues/1381
6.7k Upvotes

914 comments sorted by

View all comments

278

u/spaghettiCodeArtisan Aug 24 '19

I don't know what this standardjs thing is, but it's going straight for the blacklist.

0

u/[deleted] Aug 24 '19

[deleted]

9

u/[deleted] Aug 24 '19

Not sure if it can be done if using global repository but a common approach is to host your own repository and only pull them from there. Takes effort to manage but you only have approved packages.

0

u/[deleted] Aug 25 '19

[deleted]

1

u/[deleted] Aug 25 '19

How is maintaining a copy of React different than from any other package?

4

u/ssjskipp Aug 25 '19

The only person to reply to that is the sleezy guy that's pushing this in the first place...

70

u/CaptainTuffnut Aug 24 '19

I just learned it existed, but like you said, blacklisted

-59

u/EpicDaNoob Aug 24 '19

Pretty good JS style library with linter. Except for their horrendous 2 space indent. And now this.

105

u/LetterBoxSnatch Aug 24 '19

You must be joking. It’s an eslint configuration with lots and lots of obfuscation to hide that that is all that it is. Go actually read the code for standard-engine. It is one of the scuzziest libs I’ve ever seen.

12

u/ki85squared Aug 24 '19

Agreed that it's scuzzy, though the use of ESLint isn't really obfuscated. It's mentioned a number of times in the docs.

This looks to be capitalizing on devs who don't know what linting is or how to configure it but do want automatic code style checking.

21

u/ric2b Aug 24 '19

What's obfuscated is that it's only a config file. But you can discover that if you're a sufficiently advanced user.

6

u/HeR9TBmmc8Tx6CFXbaQb Aug 24 '19

Wow, the whole export of that "engine" is a JSON object with the config for ESLint. That's like calling a phone's settings menu an OS. It really is misleading...

7

u/EpicDaNoob Aug 24 '19

It’s an eslint configuration with lots and lots of obfuscation to hide that that is all that it is

Wait, really? As in, deliberate obfuscation, or just a layered approach? Because I knew it was based on ESLint, but if it really adds nothing other than the config file and cruft, then that's absolutely terrible.

25

u/GhostNULL Aug 24 '19

I just took a look at the code and it seems like a very slim wrapper around eslint.

→ More replies (7)

5

u/nakamin Aug 24 '19

yeah its just a super simple CLI tool written in Node that wraps ESLint. I don't think they are even trying to hide it, the repo that was linked by OP is where all the documentation and stuff is, and the cli tool. The actual config lives here https://github.com/standard/eslint-config-standard (I don't know why it was split like that) and it is just 200 lines of json to configure eslint.

2

u/[deleted] Aug 24 '19

It's so the actual config can be updated independently of the cli tool itself. This also allows devs to extend the standard config in their own eslint config without having to install the cli.

8

u/enfrozt Aug 24 '19 edited Aug 24 '19

Don't almost all JS now adays is written in 2 spaces? Like React projects, Vue etc..? It's fairly standard for JS which is a pretty light syntax, but can have a lot of nesting due to promise / callback hell.

8

u/[deleted] Aug 24 '19

but can have a lot of nesting due to promise / callback hell.

don't you guys have async/await?

4

u/argv_minus_one Aug 24 '19

Doesn't mean yours has to be. Tabs or you're doing it wrong.

5

u/the_argus Aug 24 '19

It's disgusting. Use the fucking tab key for what it was meant for so I can actually read 4 space indented code. Heathens all of you

-4

u/argv_minus_one Aug 24 '19

The tab key does whatever your editor is configured for.

→ More replies (12)