File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33For every release of eslint-plugin-hbs we provide notes as to what to expect.
44
5+ # 1.0.0
6+ * ➖ Remove hard-dependency on ember-template-lint; now requiring downstream projects to include it on their own.
7+
58## 0.1.2
69* ⬆️ Upgrade dependencies: eslint, ember-template-lint
710
Original file line number Diff line number Diff line change 33 * @author Peter Banka
44 */
55'use strict'
6- const TemplateLinter = require ( 'ember-template-lint' )
76const fs = require ( 'fs' )
87
98//------------------------------------------------------------------------------
@@ -47,6 +46,13 @@ module.exports = {
4746 create : function ( context ) {
4847 let config = { }
4948 let linter
49+ let TemplateLinter
50+ try {
51+ TemplateLinter = require ( 'ember-template-lint' )
52+ } catch ( e ) {
53+ console . error ( 'Could not import ember-template-lint. Please make sure that this is a dependency in your project' )
54+ process . exit ( 1 )
55+ }
5056 if ( context . options . length > 1 ) {
5157 const extendedOptions = context . options [ 1 ]
5258 const filename = extendedOptions . ConfigFile
@@ -129,7 +135,7 @@ function unindentAndStripSafeNewlines(template) {
129135 }
130136 }
131137 } while ( testChar )
132-
138+
133139 lines = lines . map ( line => {
134140 return line . substr ( countSame )
135141 } )
You can’t perform that action at this time.
0 commit comments