Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lets talk about code style... #289

Open
TylerLeonhardt opened this issue Aug 11, 2016 · 46 comments
Open

Lets talk about code style... #289

TylerLeonhardt opened this issue Aug 11, 2016 · 46 comments

Comments

@TylerLeonhardt
Copy link
Contributor

TylerLeonhardt commented Aug 11, 2016

So we want to have some sort of standard so that our code moving forward is clean and uses "best practices"

ESLint seems to be the best tool for this job... now it's just a matter of picking a preferred style. So far (based on what we've talked about) here are our options:

There are other options here: http://jscs.info/overview via jscs which has merged with ESLint.

Since ESLint is so flexible, any rules that we don't like we can change or disable.

Discuss!

@piranna
Copy link
Member

piranna commented Aug 11, 2016

I like ESlint recomends as basis and later from there start adapting the
rules to our own style. This is opiniated, but I would use Allman (BSD)
curly style and remove spaces between and inside parenthesis as a starting
point, they make code cleaner and less cumbersome.

El 11/8/2016 6:26, "Tyler James Leonhardt" notifications@github.com
escribió:

So we want to have some sort of standard so that our code moving forward
is clean and uses "best practices"

ESLint seems to be the best tool for this job... now it's just a matter of
picking a preferred style. So far (based on what we've talked about) here
are our options:

Since ESLint is so flexible, any rules that we don't like we can change or
disable.

Discuss!


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#289, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAgfvlOeRbgmFyrm9ulDy3gsIifAYik5ks5qeqRogaJpZM4Jhyb5
.

@TylerLeonhardt
Copy link
Contributor Author

I like ESlint recomends as basis and later from there start adapting the rules to our own style.

I think that's a great plan.

Allman (BSD) curly style

Not the biggest fan :P but I don't contribute anywhere near what you do so I can live with it :)

remove spaces between and inside parenthesis

Love it.

I'm finishing my first week here at Microsoft 😀 so I'm a tad busy ramping up... but I'd love to add this to the npm scripts

@piranna
Copy link
Member

piranna commented Aug 12, 2016

I like ESlint recomends as basis and later from there start adapting the
rules to our own style.

I think that's a great plan.

Ok, let's start this way. If you want add it but don't make checks
mandatory, just informative, and we'll refine the rules step by step.

Allman (BSD) curly style

Not the biggest fan :P but I don't contribute anywhere near what you do
so I can live with it :)

Lol :-P

remove spaces between and inside parenthesis

Love it.

Fine :-)

I'm finishing my first week here at Microsoft 😀 so I'm a tad busy
ramping up... but I'd love to add this to the npm scripts

Interm, or a permanent role? I had an interview for Skype some weeks ago
but didn't received more info. Maybe should ask you for references? ;-)

@TylerLeonhardt
Copy link
Contributor Author

Ok, let's start this way. If you want add it but don't make checks mandatory, just informative, and we'll refine the rules step by step.

I'm pretty sure they can all be set to warnings so that it doesn't interfere with any build processes or whatever.

Interm, or a permanent role? I had an interview for Skype some weeks ago but didn't received more info. Maybe should ask you for references? ;-)

Permanent role! let me see what I can do :) if you wanna email me your recruiter's name, I might be able to message them and see what happened!

@piranna
Copy link
Member

piranna commented Aug 12, 2016

I'm pretty sure they can all be set to warnings so that it doesn't interfere with any build processes or whatever.

I was asking to don't exec them by default, but this is a better option, it can work as a reminder that they should be reviewed :-)

Permanent role! let me see what I can do :) if you wanna email me your recruiter's name, I might be able to message them and see what happened!

Ok! I'll send you an email :-)

@TylerLeonhardt
Copy link
Contributor Author

TylerLeonhardt commented Aug 13, 2016

Hi everyone!

Answer these questions for me:

? Are you using ES6 modules? Yes/No
? What style of indentation do you use? Spaces/Tabs
? What quotes do you use for strings? Single/Double
? What line endings do you use? Unix/Windows
? Do you require semicolons? Yes/No
? What format do you want your config file to be in? Javascript/YAML/JSON

@piranna
Copy link
Member

piranna commented Aug 13, 2016 via email

@TylerLeonhardt
Copy link
Contributor Author

No, we use require(), but need to get used to them

So you think I should say 'yes' so that we can use them in the future?

@piranna
Copy link
Member

piranna commented Aug 13, 2016

I'm not sure... I find require() easier to use, but I know es6 modules are
the future, but I find them too complicated... I would vote require(), but
let other decide.

Does any browser already support es6 imports? I think it would be a good
selector about adopting them or not...

El 13/8/2016 19:04, "Tyler James Leonhardt" notifications@github.com
escribió:

No, we use require(), but need to get used to them

So you think I should say 'yes' so that we can use them in the future?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#289 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAgfvusas-jW36LsLFpKbcNwjDMgamXjks5qffkGgaJpZM4Jhyb5
.

@TylerLeonhardt
Copy link
Contributor Author

Does any browser already support es6 imports? I think it would be a good selector about adopting them or not...

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import

well there's our answer

@piranna
Copy link
Member

piranna commented Aug 13, 2016

Does any browser already support es6 imports? I think it would be a good
selector about adopting them or not...

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import

Note: This feature is not implemented in any browsers natively at this
time. It is implemented in many transpilers, such as the Traceur Compiler
https://github.com/google/traceur-compiler, Babel http://babeljs.io/ or
Rollup https://github.com/rollup/rollup.

Definitely require(), period. Import is only supported on dev builds of
Edge. Let's wait until there's more adoption.

@TylerLeonhardt
Copy link
Contributor Author

Full questions:

? Are you using ECMAScript 6 features? Yes
? Are you using ES6 modules? No
? Where will your code run? Node (just Node, right? Not Node and Browser?)
? Do you use JSX? No
? What style of indentation do you use? Spaces
? What quotes do you use for strings? Single
? What line endings do you use? Unix
? Do you require semicolons? No
? What format do you want your config file to be in? JSON

@piranna
Copy link
Member

piranna commented Aug 13, 2016 via email

@TylerLeonhardt
Copy link
Contributor Author

So I've got the eslintrc.json present and when I open the code up in my favorite text editor, boom. I get a whole bunch of stuff saying "do it this way" "do it that way" it's great!

I imagine I'll have to add this to every repo in NodeOS?

The next big part is figuring out where this goes in the build process, if at all... any thoughts? Of course the plan is to show warnings only for now. It could be just another package.json command that you run separately from any building steps... or it could be integrated into it somehow.

@piranna
Copy link
Member

piranna commented Aug 13, 2016

I imagine I'll have to add this to every repo in NodeOS?

That, or create a module similar to 'standard' (nodeos-standard? That would
be cool :-D ).

The next big part is figuring out where this goes in the build process,
if at all... any thoughts? Of course the plan is to show warnings only for
now. It could be just another package.json command that you run separately
from any building steps... or it could be integrated into it somehow.

Maybe as the last step of the test process?

@TylerLeonhardt
Copy link
Contributor Author

That, or create a module similar to 'standard' (nodeos-standard? That would be cool :-D ).

This is an interesting idea. Off the top of my head I would think that nodeos-standard would have a dependency of ESLint and then, while npm installing, nodeos-standard it would either point ESLint to an .eslintrc.json file that's in nodeos-standard's repo or it would throw an .eslintrc.json into the root of that repo that installed it.

@piranna
Copy link
Member

piranna commented Aug 13, 2016

Easier than that, just fork 'standard' repo and modify it :-D

El 13/8/2016 21:59, "Tyler James Leonhardt" notifications@github.com
escribió:

That, or create a module similar to 'standard' (nodeos-standard? That
would be cool :-D ).

This is an interesting idea. Off the top of my head I would think that
nodeos-standard would have a dependency of ESLint and then, while npm
installing, nodeos-standard it would either point ESLint to an
.eslintrc.json file that's in nodeos-standard's repo or it would throw an
.eslintrc.json into the root of that repo that installed it.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#289 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAgfvhSbgj4itkstL00bqXGU04YCGA0lks5qfiIPgaJpZM4Jhyb5
.

@TylerLeonhardt
Copy link
Contributor Author

I need to fix the readme and tests and whatnot I guess... haha but it's a start:

https://github.com/tylerl0706/nodeos-standard

@piranna
Copy link
Member

piranna commented Aug 13, 2016

Cool! Let's see how we optimize it ;-)

El 14/8/2016 0:10, "Tyler James Leonhardt" notifications@github.com
escribió:

I need to fix the readme and tests and whatnot I guess... haha but it's a
start:

https://github.com/tylerl0706/nodeos-standard


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#289 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAgfvv_pV35zRMFapiC9RvZAER5KBTQXks5qfkDsgaJpZM4Jhyb5
.

@TylerLeonhardt
Copy link
Contributor Author

https://www.npmjs.com/package/nodeos-standard

the npm link!

Next step, setting everything to warnings... lol

@piranna
Copy link
Member

piranna commented Aug 13, 2016 via email

@TylerLeonhardt
Copy link
Contributor Author

Yeah like... If ESLint was going to say error, make it instead say warning
instead. Like a global ESLint option to do that. You mean something like
that?

On Sat, Aug 13, 2016, 3:37 PM Jesús Leganés Combarro <
notifications@github.com> wrote:

Next step, setting everything to warnings... lol

Ideally not... if possible I would left the rules somewhat restrictive and
instead configure eslint to override the rules to be warnings.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#289 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AChaqPWYgVbW8kTjNoXn3Lrk4RQF5fOTks5qfkcSgaJpZM4Jhyb5
.

@piranna
Copy link
Member

piranna commented Aug 13, 2016

Yes :-) Later when we are sure and everything mostly working we can remove
it :-)

El 14/8/2016 0:49, "Tyler James Leonhardt" notifications@github.com
escribió:

Yeah like... If ESLint was going to say error, make it instead say warning
instead. Like a global ESLint option to do that. You mean something like
that?

On Sat, Aug 13, 2016, 3:37 PM Jesús Leganés Combarro <
notifications@github.com> wrote:

Next step, setting everything to warnings... lol

Ideally not... if possible I would left the rules somewhat restrictive
and
instead configure eslint to override the rules to be warnings.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#289 (comment),
or mute
the thread
<https://github.com/notifications/unsubscribe-auth/
AChaqPWYgVbW8kTjNoXn3Lrk4RQF5fOTks5qfkcSgaJpZM4Jhyb5>
.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#289 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAgfvulmAy65OvS6oHvAKZxUmMPpANjgks5qfknmgaJpZM4Jhyb5
.

@TylerLeonhardt
Copy link
Contributor Author

If ESLint was going to say error, make it instead say warning instead.

I haven't found a good solution to this yet...

You can easily ignore files... but besides that, suppressing errors to warnings with a global flag doesn't seem to exist...

Maybe it's best to just ignore files we don't want to fix at the moment?

@TylerLeonhardt
Copy link
Contributor Author

In other news... here are the issues with the main repo if you're curious ;)

nodeos-standard: Use NodeOS Standard Style (https://github.com/tylerl0706/nodeos-standard/)
nodeos-standard: Run `nodeos-standard --fix` to automatically fix some problems.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/publish:25:3: Expected indentation of 4 space characters but found 2.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/publish:26:5: Expected indentation of 6 space characters but found 4.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/publish:27:5: Expected indentation of 6 space characters but found 4.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/publish:28:5: Expected indentation of 6 space characters but found 4.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/publish:29:5: Expected indentation of 6 space characters but found 4.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/publish:30:3: Expected indentation of 4 space characters but found 2.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:11:52: Extra semicolon.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:21:3: Expected indentation of 0 space characters but found 2.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:22:5: Expected indentation of 2 space characters but found 4.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:30:1: Expected indentation of 2 space characters but found 0.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:31:3: Expected indentation of 4 space characters but found 2.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:32:3: Expected indentation of 4 space characters but found 2.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:33:3: Expected indentation of 4 space characters but found 2.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:34:3: Expected indentation of 4 space characters but found 2.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:35:3: Expected indentation of 4 space characters but found 2.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:36:1: Expected indentation of 2 space characters but found 0.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:41:3: Expected indentation of 0 space characters but found 2.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:42:5: Expected indentation of 2 space characters but found 4.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:43:5: Expected indentation of 2 space characters but found 4.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:46:3: Expected indentation of 0 space characters but found 2.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:47:5: Expected indentation of 2 space characters but found 4.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:48:5: Expected indentation of 2 space characters but found 4.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:51:3: Expected indentation of 0 space characters but found 2.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:52:5: Expected indentation of 2 space characters but found 4.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:53:5: Expected indentation of 6 space characters but found 4.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:54:7: Expected indentation of 8 space characters but found 6.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:55:7: Expected indentation of 8 space characters but found 6.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:56:5: Expected indentation of 6 space characters but found 4.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:58:5: Expected indentation of 2 space characters but found 4.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:60:7: Expected indentation of 4 space characters but found 6.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:61:9: Expected indentation of 6 space characters but found 8.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:62:9: Expected indentation of 6 space characters but found 8.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:65:7: Expected indentation of 4 space characters but found 6.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:66:9: Expected indentation of 6 space characters but found 8.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:67:9: Expected indentation of 6 space characters but found 8.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:70:7: Expected indentation of 4 space characters but found 6.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:71:9: Expected indentation of 6 space characters but found 8.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:74:5: Expected indentation of 2 space characters but found 4.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:75:5: Expected indentation of 2 space characters but found 4.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:76:5: Expected indentation of 2 space characters but found 4.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:77:5: Expected indentation of 2 space characters but found 4.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:80:3: Expected indentation of 0 space characters but found 2.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:81:5: Expected indentation of 2 space characters but found 4.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:87:22: Extra semicolon.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:88:16: Strings must use singlequote.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:88:18: Extra semicolon.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:92:46: Extra semicolon.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:94:11: Extra semicolon.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:100:3: Unexpected console statement.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:100:15: Strings must use singlequote.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:100:87: Extra semicolon.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:101:15: Extra semicolon.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:105:14: Unexpected console statement.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/start:105:42: Extra semicolon.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/test:14:52: Extra semicolon.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/test:23:5: 'cpu' is defined but never used
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/test:31:3: Unexpected console statement.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/test:38:5: 'args' is already defined
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/test:39:1: Expected indentation of 2 space characters but found 0.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/test:41:3: Expected indentation of 4 space characters but found 2.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/test:42:1: Expected indentation of 2 space characters but found 0.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/test:47:3: Expected indentation of 0 space characters but found 2.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/test:48:5: Expected indentation of 2 space characters but found 4.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/test:49:5: Expected indentation of 2 space characters but found 4.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/test:50:5: Expected indentation of 2 space characters but found 4.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/test:56:3: Expected indentation of 0 space characters but found 2.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/test:57:5: Expected indentation of 2 space characters but found 4.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/test:58:5: Expected indentation of 2 space characters but found 4.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/test:59:5: Expected indentation of 2 space characters but found 4.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/test:65:3: Expected indentation of 0 space characters but found 2.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/test:66:5: Expected indentation of 2 space characters but found 4.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/test:67:5: Expected indentation of 6 space characters but found 4.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/test:68:7: Expected indentation of 8 space characters but found 6.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/test:69:7: Expected indentation of 8 space characters but found 6.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/test:70:5: Expected indentation of 6 space characters but found 4.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/test:72:5: Expected indentation of 2 space characters but found 4.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/test:78:3: Expected indentation of 0 space characters but found 2.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/test:79:5: Expected indentation of 2 space characters but found 4.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/test:80:5: Expected indentation of 2 space characters but found 4.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/test:81:5: Expected indentation of 2 space characters but found 4.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/test:82:5: Expected indentation of 2 space characters but found 4.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/test:88:3: Expected indentation of 0 space characters but found 2.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/test:89:5: Expected indentation of 2 space characters but found 4.
  /Users/tylerleonhardt/Desktop/CompSci/Javascript/Node.js/NodeOS/NodeOS/scripts/test:124:7: Unexpected console statement.

@TylerLeonhardt
Copy link
Contributor Author

Those indentations ;)

@piranna
Copy link
Member

piranna commented Aug 18, 2016

If ESLint was going to say error, make it instead say warning instead.

I haven't found a good solution to this yet...

You are right, there's an option to supress warnings but not to convert
errors in warnings... Time to open an issue and implement it, are you into
the challenge? ;-)

You can easily ignore files... but besides that, suppressing errors to
warnings with a global flag doesn't seem to exist...

Maybe it's best to just ignore files we don't want to fix at the moment?

Ignore files is mostly for third party files, ignore your own errors is
never an option.

@piranna
Copy link
Member

piranna commented Aug 18, 2016 via email

@TylerLeonhardt
Copy link
Contributor Author

eslint/eslint#6931

FYI

@piranna
Copy link
Member

piranna commented Aug 18, 2016

eslint/eslint#6931

FYI

I love the name of the flag X-D

@TylerLeonhardt
Copy link
Contributor Author

@piranna: I added allman just for you :P

https://github.com/tylerl0706/nodeos-standard/blob/master/eslintrc.json

Also, I added ; exit 0 to the end of the nodeos-standard call... worked like a charm :D

@piranna
Copy link
Member

piranna commented Aug 18, 2016

@piranna: I added allman just for you :P

https://github.com/tylerl0706/nodeos-standard/blob/master/eslintrc.json

;-)

Also, I added ; exit 0 to the end of the nodeos-standard call... worked
like a charm :D

What do you mean? Are you talking about the errors vs. warnings thing?

Unrelated: how we can make Atom to detect the nodeos-standard module and
use it to show linting errors on the editor? I know it can be able to do it
with the .eslint files...

@Coretool
Copy link
Member

Just configure Atom's linter to use our .eslint ?!

@piranna
Copy link
Member

piranna commented Aug 18, 2016

Don't know, maybe...

El 18/8/2016 23:07, "John Green" notifications@github.com escribió:

Just configure Atom's linter to use our .eslint ?!


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#289 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAgfvkQk3JN77YwSs8csalZgYEWx0fqbks5qhMmigaJpZM4Jhyb5
.

@TylerLeonhardt
Copy link
Contributor Author

What do you mean? Are you talking about the errors vs. warnings thing?

Yeah so now, ESLint will still throw errors and warnings... but it wont crash. So we can still see our ugly code style, but the project will still run.

That's what the ; exit 0 fixed

@TylerLeonhardt
Copy link
Contributor Author

#294 PR up :)

@TylerLeonhardt
Copy link
Contributor Author

Just configure Atom's linter to use our .eslint ?!

This is totally doable. The path is:

node_modules/nodeos-standard/.eslintrc.json

In your favorite text editor, you should be able to configure this. I'm looking into forking this for a little bit better of an experience than manual configuration:

https://atom.io/packages/linter-js-standard

@piranna
Copy link
Member

piranna commented Aug 22, 2016

Would it be better to have a style checker command, a eslint file on all the projects, or using both at the same time?

@TylerLeonhardt
Copy link
Contributor Author

Well... Nodeos-standard is basically just an eslintrc file that you install with a command rather than copy and pasting.

And with ESLint, if you run "eslint file.js" it will lint that file based on the eslintrc file that's in your current directory.

If we just stored the ESLintrc in the root, we would automatically get text editor plugins because ESLint is so widely used.

If we go the "standard way" and have a nodeos-standard package we have to make all the text editor plugins... Which is basically just a fork of standard plugins...

Usually people use both text editor plugins and commands because the text editor plugins will be preventative and the commands will be kind of a preventative measure for people who don't use the plugins.

Lol that was a lot... It's a weird thing to explain

@piranna
Copy link
Member

piranna commented Aug 22, 2016

Or... we can add a install script on the nodeos-standard module that creates a symlink to the .eslint file on the root folder of the project so text editors can find it automatically :-D

@TylerLeonhardt
Copy link
Contributor Author

@piranna love that idea... how can I run a script when it installs?

@piranna
Copy link
Member

piranna commented Aug 23, 2016

Just add an "install" entry on the "scripts" field of package.json file
with the shell command to be executed.

El 23/8/2016 7:39, "Tyler James Leonhardt" notifications@github.com
escribió:

@piranna https://github.com/piranna love that idea... how can I run a
script when it installs?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#289 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAgfvqE3ABm2CUk0uRYstI8DP8ykPw39ks5qioeGgaJpZM4Jhyb5
.

@TylerLeonhardt
Copy link
Contributor Author

I know NodeOS is only working on Linux at the moment... But will this plan
work for all platforms?

On Mon, Aug 22, 2016, 11:19 PM Jesús Leganés Combarro <
notifications@github.com> wrote:

Just add an "install" entry on the "scripts" field of package.json file
with the shell command to be executed.

El 23/8/2016 7:39, "Tyler James Leonhardt" notifications@github.com
escribió:

@piranna https://github.com/piranna love that idea... how can I run a
script when it installs?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#289 (comment),
or mute
the thread
<
https://github.com/notifications/unsubscribe-auth/AAgfvqE3ABm2CUk0uRYstI8DP8ykPw39ks5qioeGgaJpZM4Jhyb5

.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#289 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AChaqEIylQfO0lVUV5eNQqZo5XTpazuJks5qipD8gaJpZM4Jhyb5
.

@piranna
Copy link
Member

piranna commented Aug 23, 2016 via email

@TylerLeonhardt
Copy link
Contributor Author

@piranna See nodeos-standard's latest push :D (TylerLeonhardt/nodeos-standard@a3baf0a)

It will now create a symlink on install. The image says Alias... near bottom right under where it says "eslintrc.json" :)

@piranna
Copy link
Member

piranna commented Aug 23, 2016

Yay! It works! :-D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants