-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
[email protected] #10
Conversation
eslint-common.json
Outdated
@@ -9,6 +9,7 @@ | |||
"dot-location": ["property"], | |||
"eol-last": ["always"], | |||
"eqeqeq": ["always", {"null": "never"}], | |||
"for-direction": [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just out of curiosity, why disable this rule in common
, and enable it in es3
and es6
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not actually the case:
eslint-%.json: eslint-%-only.json eslint-common.json scripts/eslint-combine
scripts/eslint-combine eslint-common.json '$<' >'$@'
Running make
updates both derived files based on changes to eslint-common.json. The script which combines the common rules and the ES3/ES6 rules sets the level to "error"
in all cases, to save us from having to specify it for every rule. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see. :)
I'm using eslint's built-in extension capability to share rules between configurations in the config I maintain, as opposed to a build process. Any reason to favour the build option?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to favour the build option?
This project predates ESLint's extension mechanism, which was added fairly recently. I'll investigate the possibility of using extends
here. Thanks for the suggestion!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're now using extends
. How do the changes look, Aldwin?
eslint-common.json
Outdated
@@ -63,20 +64,24 @@ | |||
"no-useless-escape": [], | |||
"no-whitespace-before-property": [], | |||
"no-with": [], | |||
"object-curly-newline": [{"consistent": true}], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eslint-common.json
Outdated
"object-curly-spacing": ["never"], | ||
"object-property-newline": [{"allowMultiplePropertiesPerLine": true}], | ||
"operator-assignment": ["always"], | ||
"padded-blocks": ["never"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed this rule when I discovered that it flags this code:
(function(f) {
>>
'use strict';
/* istanbul ignore else */
if (typeof module === 'object' && typeof module.exports === 'object') {
module.exports = f(require('sanctuary-type-classes'));
} else if (typeof define === 'function' && define.amd != null) {
define(['sanctuary-type-classes'], f);
} else {
self.sanctuaryIdentity = f(self.sanctuaryTypeClasses);
}
>>
}(function(Z) {
>>
'use strict';
...
>>
}));
eslint-common.json
Outdated
"quotes": ["single", {"avoidEscape": true}], | ||
"radix": ["always"], | ||
"semi": ["always", {"omitLastInOneLineBlock": false}], | ||
"semi-spacing": [{"before": false, "after": true}], | ||
"semi-style": ["last"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eslint-common.json
Outdated
"space-before-blocks": ["always"], | ||
"space-before-function-paren": [{"anonymous": "never", "named": "never"}], | ||
"space-in-parens": ["never", {"exceptions": []}], | ||
"space-infix-ops": [], | ||
"space-unary-ops": [{"words": true, "nonwords": false, "overrides": {}}], | ||
"spaced-comment": ["always", {"line": {"markers": ["#", "."], "exceptions": ["."]}}], | ||
"strict": ["safe"], | ||
"switch-colon-spacing": [{"before": false, "after": true}], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
050765d
to
8282929
Compare
cca9c1c
to
bc63c5b
Compare
I'll add links to the various new rules to make this pull request easier to review. :)