Skip to content
This repository has been archived by the owner on Jan 20, 2019. It is now read-only.

Plugabble API for linting #15

Conversation

jonathanKingston
Copy link
Member


Expose a test generator API for the linting addon to call:
```
lintTree: function(type, tree) {
Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Member

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

c

Copy link
Member Author

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.

@stefanpenner
Copy link
Contributor

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) {
Copy link
Contributor

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 ?

Copy link
Member Author

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.

@ismay
Copy link

ismay commented Jun 24, 2015

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.

@devinus
Copy link

devinus commented Aug 14, 2015

👍 I'd really like to seamlessly use ESLint so I can begin to use Babel features without jshint ignore everywhere.

@elwayman02
Copy link

👍

@balupton
Copy link

+1, just ran into this today, tired of all the jshint errors.

@voltidev
Copy link

👍

@jfelchner
Copy link

I just installed ember-cli-mocha which requires JSHint but I am using ESLint and having all these errors crop up during builds really sucks.

@jonathansamines
Copy link

👍

@knownasilya
Copy link
Contributor

cc @jaxgeller

@jaxgeller
Copy link

👍

1 similar comment
@MaazAli
Copy link

MaazAli commented Nov 7, 2015

👍

@rwjblue
Copy link
Member

rwjblue commented Feb 26, 2016

Closed by ember-cli/ember-cli#5508

@rwjblue rwjblue closed this Feb 26, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet