Open elbeezi opened 9 years ago
I'm currently wrapping the imports in another jshint ignore, which is starting to get ugly:
import Ember from 'ember';
/* jshint ignore: start */
import { requiredAttr, optionalAttr } from 'ember-strong-attrs';
import MyModel from '../models/my-model';
/* jshint ignore: end */
const {
Component
} = Ember;
// TODO: make pretty things etc.
/* jshint ignore: start */
@requiredAttr('myString', String)
@optionalAttr('myModelInstance', MyModel)
/* jshint ignore: end */
export default class extends Component.extend({
}) { }
Yeah, that's rough. We really need jshint support for decorators I think.
Since JSHint is adamantly not supporting es7 until it stabilizes, is there any way we could programmatically suppress decorator-related JSHint errors until official support does land? Not too familiar with JSHint myself so I'm not sure what makes sense for now.
I'm sure there's a way, but it would likely involve wrapping jshint and or the broccoli plugin for it, and I'm not sure we want to go there yet.
:/ here's hoping for es7 decorator-land!
This looks like it could be an workaround for now: https://github.com/machty/broccoli-es7-decorator-jshint-guards
e.g.
'requiredAttr' is defined but never used.