-
-
Notifications
You must be signed in to change notification settings - Fork 54
Plugabble API for linting #15
Plugabble API for linting #15
Conversation
|
||
Expose a test generator API for the linting addon to call: | ||
``` | ||
lintTree: function(type, tree) { |
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.
can we make it linkTrees ? I would prefer to not have to lock us into a mergeTree
only for linting.
Alliteratively, we could just call linkTree
multiple times if we get an array of trees.
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 is no reason why this.testGenerator
can't be called more than once; that was how I was expecting the blocking aspect to be resolved.
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.
@stefanpenner - We already have a lintTree
hook, that is not part of the proposal. The proposal as I understand it, is more about passing the testGenerator
through.
@jonathanKingston - c/d?
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.
c
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.
Yup, the change was around the usage of the this.testGenerator
API which other addons would define.
i am +1 on this. Let me noodle on it more though |
|
||
Expose a new test Generator hook that would return the lint errors transformed to the test language (This will likely be in the testing framework addon): | ||
``` | ||
testGenerator: function (relativePath, errors) { |
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.
is this errors
or more like message / failureMessage / assertionMessage ?
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 was thinking the nicest would be defining an object shape for these which both JSHint and ESLint seem to do anyway.
Essentially:
[
{
line: 12,
column: 30,
ruleId: 1,
message: 'error name'
}
]
I was thinking it would be nice if the objects extended from new Error
but I'm not really fussy so long as we have a defined API.
It would be awesome if ember were more agnostic to linting methods. I've been trying to switch to ember-cli-eslint, but it's proving to be pretty difficult because of the tight integration with jshint. I'm looking forward to being able to use eslint, since I much prefer it over the jscs/jshint combination I'm running now. |
👍 I'd really like to seamlessly use ESLint so I can begin to use Babel features without |
👍 |
+1, just ran into this today, tired of all the jshint errors. |
👍 |
I just installed |
👍 |
cc @jaxgeller |
👍 |
1 similar comment
👍 |
Closed by ember-cli/ember-cli#5508 |
Rendered
Relates to:
ember-cli/ember-cli#3094
ember-cli/ember-cli-eslint#7