OpenIDConnect icon indicating copy to clipboard operation
OpenIDConnect copied to clipboard

Linted code

Open ariutta opened this issue 10 years ago • 5 comments

Hello,

This pull request should only change the linting. I added .jshintrc and .jscsrc files for the existing code and then updated index.js to pass the linters.

-AR

ariutta avatar Mar 22 '15 05:03 ariutta

Line 1070 of index.js is the only line that doesn't pass the linter now. What is this line doing?

ariutta avatar Mar 22 '15 19:03 ariutta

I tried to make the .jscsrc file reflect the existing code as much as possible, because I assumed that's your code style preference. If it's not, do you prefer one of the presets, like Google, jQuery, Crockford, MDCS, etc.?

ariutta avatar Mar 22 '15 19:03 ariutta

linter does not like if the line is just an expression. This line is a logical expression, and for "and" operator, the second operand is only evaluated when first operand is truthy. Therefore, this line is just an if sentence for the errors.push.

Markko

On Sun, Mar 22, 2015 at 8:27 PM, Anders Riutta [email protected] wrote:

Line 1070 https://github.com/ariutta/OpenIDConnect/blob/91aace26ab0b2eac24b14bd668a2d866a431251d/index.js#L1070 of index.js is the only line that doesn't pass the linter now. What is this line doing?

— Reply to this email directly or view it on GitHub https://github.com/agmoyano/OpenIDConnect/pull/17#issuecomment-84682906.

markkopaas avatar Mar 22 '15 22:03 markkopaas

Thanks. I changed it to use an if to make the linter happy.

ariutta avatar Mar 22 '15 23:03 ariutta

Added a README for the example. Should the redirect URI be http://localhost:3001/test?

ariutta avatar Mar 23 '15 04:03 ariutta