standard / standard-www

:point_up_2: Website for JavaScript Standard Style (@standard)
https://standardjs.com
ISC License
31 stars 14 forks source link

"Paste your code" online linter #3

Closed feross closed 9 years ago

feross commented 9 years ago

As @maxogden said:

I think the site should have a 'paste your code here to check it with standard' thing

Haven't tested it, but standard probably works out-of-the-box in the browser. Doing something like what babel has would be cool.

Flet commented 9 years ago

Heh, I tinkered on this idea a couple days ago after reading his comment.

I remembered http://eslint.org/demo/ and thought it would not be difficult to re-use what they have... but its a little funky...

This demo page has a custom built eslint.js that is generated from their Makefile. I think cloning/installing eslint and running npm run browserify is the only way to get this eslint.js file currently.

Also, plugins do not work in the browser, so the standard custom rules may be another challenge. This may require a custom build script with a custom load-rules.js (which eslint rewrites when building for the browser)

Reference: https://github.com/eslint/eslint/issues/2585

Flet commented 9 years ago

Had some fun today :)

http://flet.github.io/standard-demo/

Needs some polishing up, but it works!

zeke commented 9 years ago

Nice work, @Flet!

Flet commented 9 years ago

Thanks @zeke :)

I did some more work on this today. Now it has the plugin rules working and also has a format button :tada:

I also mocked it up a bit to make it fit in standardjs.com just to see what it would look like: http://flet.github.io/standard-demo/ image

feross commented 9 years ago

@Flet This is AMAZING! It runs quite fast!

This makes me wonder if there's anything we can do to speed up the CLI? I guess all the sync file reads that require does are making it run slowly...

xjamundx commented 9 years ago

Yeah this is sweet

dcousens commented 9 years ago

@Flet this is awesome. Would be great to see this being used for bug reports too.

feross commented 9 years ago

@flet are all the needed PRs merged so you can deploy this to standardjs.com?

Flet commented 9 years ago

Yeah I will button it up tonight and deploy  it :) Any preference on URL or link title On Aug 27, 2015 6:44 PM, Feross Aboukhadijeh notifications@github.com wrote:@flet are all the needed PRs merged so you can deploy this to standardjs.com?

—Reply to this email directly or view it on GitHub.

feross commented 9 years ago

https://babeljs.io/ uses "Try it out". That works for me, but I don't have a strong opinion.

Flet commented 9 years ago

OK, its live! :) http://standardjs.com/demo.html

zeke commented 9 years ago

:clap:

feross commented 9 years ago

Great work!