-
Notifications
You must be signed in to change notification settings - Fork 1
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
Eslint rules discussion #7
Comments
I liked the changes you did, I'm using this one https://github.com/feross/eslint-config-standard but things like space-before-function-paren and object-curly-spacing are annoying for me, so 👍 x 💯 |
@acabrera91 I would like to propose use the "standard" plus this rules, something like follows (sorry no comments), the following content is yours plus a couple of thing more, like babel and add the standard rules of javascript {
"parser": "babel-eslint",
"extends": [
"standard"
],
"plugins": [
"babel"
],
"rules": {
"key-spacing": 0,
"max-len": [
2,
120,
2
],
"comma-dangle": [
"error",
"never"
],
"no-use-before-define": [
"error",
{
"functions": false,
"classes": false
}
],
"no-param-reassign": [
"error",
{
"props": false
}
],
"no-unused-expressions": [
"error",
{
"allowTernary": true
}
],
"object-curly-spacing": [
"error",
"never"
],
"space-before-function-paren": [
"error",
"never"
],
"semi": ["error", "always"]
}
} For this one the dependencies will look like ...
"eslint": "^3.15.0",
"eslint-config-standard": "^6.2.1",
"eslint-plugin-babel": "^4.0.1",
"eslint-plugin-promise": "^3.4.2",
"eslint-plugin-standard": "^2.0.1",
... |
Hello @acabrera91 I have doubts about this: // In express, error handlers are a special kind of middlewares with 4 arguments
// In the last error handler is unnecesary to call the last argument (next), but it must appear
"no-unused-vars": [
"error",
{
"args": "none"
}
], imho what you are explaining in the comments is a problem with express, to me this rule make sense and helps to write better code. |
Hey guys, so what about joining what @rkmax improved in his comment and use what @acabrera91 created and start from that? Toni I'm still waiting on the response to the comment above, what do you think? |
Any update on this @acabrera91 @rkmax ? |
I think we're waiting for @acabrera91 answer |
These rules looks good to me, I would like to start using what @rkmax proposed + @acabrera91
About this one maybe for that case it will be good to use inline comments to disable that rule.
|
I Agree with you @evasquez26 because it's special use case and not the regular way |
I would also like to propose a change to the max-len rule:
|
I agree with all of you. BTW, what are your thougts about using plusplus operator? In my project I've desabled this rule, |
@acabrera91 I'm fine with it, I rarely use that or |
I think I need the help of @rkmax He proposed to use the standard instead of airbnb |
Cool! Hey @rkmax can you come up with a final-initial version of the file so we can start using it now? |
By the way I used the package config of @rkmax and this package is missing: |
|
|
Following the rules defined on bixlabs/documentation#7
Following the rules defined on bixlabs/documentation#7
In test directory we should define another
.eslintrc.json
with this ruleSpecially if we are using chai.js, this kind of expect gives an error:
expect(null).to.be.null;
Let discuss about the rules I mentioned above, what do you think?
The text was updated successfully, but these errors were encountered: