-
Notifications
You must be signed in to change notification settings - Fork 52
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
also add a coding style standard? #43
Comments
That's the file we use and it's good. Yeah. It's better to put it in this repo. If possible send me a PR and add a section on the spec too. |
Instead of opt-in for each rule one by one, I would rather base the linter configuration on some popular configuration like https://github.com/airbnb/javascript and then tweak it a bit if that’s needed. |
+1 for a style guide. Alternatives to Airbnb's guide would be the JavaScript Standard Style and idiomatic.js |
Yeah. We can go with Airbnb style guide with some minor changes. I'll add what we can add and remove. Then we can discuss here properly. |
It appears there is an copied from: http://guide.meteor.com/v1.3/code-style.html#eslint install: npm install --save-dev eslint eslint-plugin-react eslint-plugin-meteor eslint-config-airbnb .eslintrc {
"plugins": [
"meteor"
],
"extends": [
"airbnb/base",
"plugin:meteor/guide"
],
"rules": {}
} note:
|
It's unclear we need meteor plugin since it has a lot of blaze stuff and simply we don't need them. (But I get it for the server side, we need some of them) We were started to use this: {
"extends": "airbnb",
"rules": {
"react/jsx-no-bind": 0,
"react/jsx-uses-react": 1,
"arrow-body-style": 0,
"prefer-arrow-callback": 0,
"func-names": 0
},
"parserOptions": {
"ecmaVersion": 6,
"ecmaFeatures": {
"experimentalObjectRestSpread": true
}
}
} This works pretty well for us. I'm starting to move this in. |
Besides a directory layout and such things, I think it's also pretty convinient to have some linter configurations inside this repo?
Something like a
.jscsrc
,.jshintrc
,.eslintrc
? I think we can use the file in thesample-blog-app
to get started:https://github.com/mantrajs/mantra-sample-blog-app/blob/master/.eslintrc
The text was updated successfully, but these errors were encountered: