Skip to content

Commit d3b9896

Browse files
authored
Merge pull request #4 from psbanka/cleanup
A couple small changes for official publishing
2 parents fca9d45 + 1b5e17a commit d3b9896

4 files changed

Lines changed: 35 additions & 6 deletions

File tree

LICENSE.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
ISC License (ISC)
2+
3+
Copyright 2017, Peter Banka
4+
5+
Permission to use, copy, modify, and/or distribute this software for any
6+
purpose with or without fee is hereby granted, provided that the above
7+
copyright notice and this permission notice appear in all copies.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
10+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
11+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
12+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
14+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15+
PERFORMANCE OF THIS SOFTWARE.

docs/rules/check-hbs-template-literals.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,26 @@ Examples of **correct** code for this rule:
3737

3838
### Options
3939

40-
None
40+
This project uses configuration files for
41+
[ember-template-lint](https://github.com/rwjblue/ember-template-lint), which
42+
uses a `.template-lintrc.js` configuration file at the base of your project.
43+
For example:
44+
45+
```javascript
46+
module.exports = {
47+
extends: 'recommended',
48+
49+
rules: {
50+
'bare-strings': true
51+
}
52+
}
53+
```
4154

4255
## When Not To Use It
4356

44-
If you're not using inline templates
57+
If you're not using inline handlebars templates
4558

4659
## Further Reading
4760

48-
If there are other links that describe the issue this rule addresses, please include them here in a bulleted list.
61+
- [ember-inline-component](https://github.com/knownasilya/ember-inline-component/blob/master/README.md)
62+
- [ember-template-lint](https://github.com/rwjblue/ember-template-lint/blob/master/README.md)

lib/rules/check-hbs-template-literals.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ module.exports = {
3434
if (node.tag.name === 'hbs') {
3535
if (node.quasi.type === 'TemplateLiteral') {
3636
const hbs = node.quasi.quasis[0].value.cooked
37-
const results = linter.verify({source: hbs.toString(), moduleId: 'foo'})
37+
const results = linter.verify({source: hbs.toString(), moduleId: context.id})
3838
if (results.length !== 0) {
3939
const firstLine = results[0].message.split('\n')[0]
4040
const msg = `${results.length} error(s): ${firstLine}`

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-plugin-hbs",
3-
"version": "0.0.3",
3+
"version": "0.0.4",
44
"description": "Provide linting for hbs template literals inside of JavaScript",
55
"keywords": [
66
"eslint",
@@ -21,7 +21,7 @@
2121
"mocha": "^3.1.2"
2222
},
2323
"engines": {
24-
"node": ">=0.10.0"
24+
"node": ">=6.10.0"
2525
},
2626
"license": "ISC"
2727
}

0 commit comments

Comments
 (0)