Flet / eslint-to-esformatter

ISC License
30 stars 3 forks source link

v1.0.0-alpha.2 - Features #5

Open Nate-Wilkins opened 9 years ago

Nate-Wilkins commented 9 years ago

v1.0.0-alpha.2

Working off of eslint 0.19.0

Framework

Nate-Wilkins commented 9 years ago

I have code for the rules listed (block-scoped-var, brace-style, indent, coma-spacing, eol-last, newline-after-var)

@Flet Add anything you want here!

Flet commented 9 years ago

key-spacing and indent are done and tested... added key-spacing to the list.

Nate-Wilkins commented 9 years ago

Pushed up indentSwitchCase and a few other things with comments in commits.

Flet commented 9 years ago

You have been busy! :+1:

Nate-Wilkins commented 9 years ago

Yup :+1: as a side note I can't get faucet to work... I'm using windows 8 which looks to be the culprit or my node version I'll open an issue on faucet's repo if I'm still having issues

Adding the debug module now along with the rest of the rules I have.

Flet commented 9 years ago

Ah, faucet will only execute tests that are at the root of the test directory. I just rearranged things in this commit https://github.com/Flet/eslint-to-esformatter/commit/abea90a9e05dbdcffe12233148aad9fcb05d1bef to make it work.

Also I just added a little skip option to get around blocked-scope-var having no tests.

So now running faucet does this for me:

⨯ brace-style
  not ok 3 format using: rule on, stroustrup
    ---
      operator: equal
      expected:
        'function foo() {\n  return true;\n}\n\nif (foo) {\n  bar();\n}\n\ntry {\n  somethingRisky();\n}\ncatch (e) {\n  handleError();\n}\n\nif (foo) {\n  bar();\n}\nelse {\n  baz();\n}'
      actual:
        'function foo() {\n  return true;\n}\n\nif (foo) {\n  bar();\n}\n\ntry {\n  somethingRisky();\n} catch (e) {\n  handleError();\n}\n\nif (foo) {\n  bar();\n} else {\n  baz();\n}'
      at: Test.<anonymous> (/home/icmpdev/code/eslint-to-esformatter/test/lib/test-rule.js:11:16)
    ...
✓ indent
✓ key-spacing
# tests 14
# pass  13
⨯ fail  1

Is it working for you with these updates?

Nate-Wilkins commented 9 years ago

That's expected behavior atm https://github.com/Flet/eslint-to-esformatter/commit/9fa6f7c46de2b1c3d03f952d4c077e93cea00679 where the CatchKeyword doesn't get the correct line break

Flet commented 9 years ago

Cool, does fauct work on windows for you?

Nate-Wilkins commented 9 years ago

No same thing unfortunately. capture

Nate-Wilkins commented 9 years ago

Added leasot to parse out TODO comments. Currently not in 'gulp test' or if we want it at all. Just need a way to keep track of the things I can't fix atm.

Flet commented 9 years ago

Will this work? https://github.com/Flet/eslint-to-esformatter/commit/addbd71bd004b76b5163dda01a58474aa6177f65

basically just run npm run todo and it will scan the whole codebase and write TODO.md at root.

Flet commented 9 years ago

RE: faucet, dumping it for now.

Instead just running plain tape and piping to tap-difflet which will highlight diffs in output. Tested and working on Windows :+1: https://github.com/Flet/eslint-to-esformatter/commit/761259d7f6714099f97f28e60b57bd87116809df

Nate-Wilkins commented 9 years ago

:+1:

Nate-Wilkins commented 9 years ago

Updated again. Adding all the informative, deprecated, and unsupported rules now.

Flet commented 9 years ago

Heh, leasot kinda goes overboard with the TODO headings in its output!