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

Feature Request: eslint and editorconfig #73

Open
cookiengineer opened this issue Apr 17, 2017 · 4 comments
Open

Feature Request: eslint and editorconfig #73

cookiengineer opened this issue Apr 17, 2017 · 4 comments
Assignees

Comments

@cookiengineer
Copy link
Contributor

It's hard to write code for the JS specific files in the tests/ folder or the C++ files in the src/ folder.

I've been using .editorconfig for a while now and it solves most of the quirks that editors and IDEs have on other systems.

When it comes to JS, I think that eslint is great because it allows using eslint --fix /path/to/file.js and automatically fixes whitespace issues, tabbing and all auto-fixable quirks.

What do you think about editorconfig and an eslintrc? If this gets a go, I would love to create and pull-request it.

@verpeteren verpeteren self-assigned this Apr 17, 2017
@greduan
Copy link

greduan commented Apr 18, 2017

👍 on editorconfig. On eslint I think it's good, but maybe something like Prettier would be more beneficial.

@paraboul paraboul assigned paraboul and unassigned verpeteren Apr 18, 2017
@paraboul
Copy link
Member

paraboul commented Apr 18, 2017

Add .editorconfig 5497256

@cookiengineer
Copy link
Contributor Author

cookiengineer commented Apr 28, 2017

@greduan I'm in for using prettier. I personally just use eslint because I mostly disagree with the "standard" style that always leads to untraceable errors with expressions. A quick check looks like prettier is actually quite sane in the things they allow/enforce.

Personally, I'm using a style similar to this eslintrc which results in files looking like this and I prefer positive-branches with sane whitespace lines in between etc. Old assembly habits die hard :P

Does anybody know whether prettier also supports something like a simple .prettierrc or so? I couldn't find anything about it in their wiki or github repo. They seem to offer only a nodejs API that can be used as a hook for a package.json.

They also offer a CLI settings-per-flags API, but I guess that will end up being as unmaintainable as the typescript linting flags.

@greduan
Copy link

greduan commented Jun 13, 2017

I'm not aware of such a config file. I think the point is to just use it and completely stop worrying about code styles. Like with gofmt for example.

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

No branches or pull requests

4 participants