nodejs.org icon indicating copy to clipboard operation
nodejs.org copied to clipboard

Use the same JS linting as the node repo

Open XhmikosR opened this issue 6 years ago • 4 comments

Adapted for the frontend JS files since ES5 is used there.

XhmikosR avatar Sep 07 '19 06:09 XhmikosR

I'd like to take a stab at it, but I'm not sure where to start. Also, this change will probably be a big one, from a quick look. But at least this way we'll be consistent. And then we can look into #2524, which IMO is super important.

XhmikosR avatar Sep 23 '19 09:09 XhmikosR

I'm interested in giving this a shot as well, even if it's just a piece of the overarching issue but first I'd like to clarify what I'm getting myself into. Since I'm so new to the node repos can anyone help me suss out what specifically needs to be done.

My most basic question is, does all the linting from the node repo need to be front end adapted and implemented over here? It seems like there are a lot of custom rules (https://github.com/nodejs/node/tree/master/tools/eslint-rules) in addition to what's defined in .eslintrc.js.

Maybe a good start would be to implement what's in https://github.com/nodejs/node/blob/master/.eslintrc.js minus the custom rules?

Thanks for bearing with all my ignorance!

carterbancroft avatar Jan 16 '20 00:01 carterbancroft

My 2 cents would be to see if you can create a repo like https://github.com/nodejs/remark-preset-lint-node based on the config. Then that config could be used by Node-core plus other repos

nschonni avatar Jan 16 '20 00:01 nschonni

Thanks, I appreciate the 2 cents. I wondered if a new shared repo would be appropriate here. Lemme see what I can figure out.

carterbancroft avatar Jan 16 '20 00:01 carterbancroft

Closing as all PRs got merged already and this is probably not relevant anymore. Feel free to reopen if needed.

ovflowd avatar Mar 12 '23 13:03 ovflowd