Skip to content

Commit 162789b

Browse files
authored
use ember-eslint-plugin (#135)
* use ember-eslint-plugin * update node version
1 parent 1d50037 commit 162789b

File tree

8 files changed

+1301
-1603
lines changed

8 files changed

+1301
-1603
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
matrix:
1919
os: [ ubuntu ]
20-
node-version: [14.x, 16.x, 18.x]
20+
node-version: [18.x, 20.x, 22.x]
2121

2222
steps:
2323
- uses: actions/checkout@v4

README.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,24 @@ require('eslint-plugin-ember-template-lint/lib/ember-teplate-lint/config').regis
5757

5858

5959
module.exports = {
60-
extends: [
61-
'eslint:recommended',
62-
'plugin:@typescript-eslint/base',
63-
'plugin:ember-template-lint/config',
64-
'plugin:ember-template-lint/recommended',
65-
//optional:
66-
'plugin:ember-template-lint/ember-template-lint-plugin-prettier:recommended'
67-
]
60+
overrides: [
61+
{
62+
files: ['**/*.hbs'],
63+
parser: 'ember-template-lint/lib/parser/hbs-parser',
64+
extends: [
65+
'plugin:ember-template-lint/config',
66+
'plugin:ember-template-lint/recommended',
67+
],
68+
},
69+
{
70+
files: ['**/*.gjs'],
71+
parser: 'ember-eslint-parser',
72+
extends: [
73+
'plugin:ember-template-lint/config',
74+
'plugin:ember-template-lint/recommended',
75+
],
76+
},
77+
],
6878
};
6979
```
7080

lib/config/base.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module.exports = {
1313
},
1414
{
1515
files: ['**/*.gts', '**/*.gjs'],
16-
parser: require.resolve('../parser/gts-parser'),
16+
parser: 'ember-eslint-parser',
1717
processor: 'ember-template-lint/noop'
1818
},
1919
],

lib/ember-teplate-lint/info.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ class Rule {
5858
return {
5959
'Program': (node) => node.isHbs && visitor.enter(node),
6060
'Program:exit': (node) => node.isHbs && visitor.exit(node),
61-
'__TEMPLATE__Template': visitor.enter,
62-
'__TEMPLATE__Template:exit': visitor.exit,
61+
'GlimmerTemplate': visitor.enter,
62+
'GlimmerTemplate:exit': visitor.exit,
6363
};
6464
}
6565
}

lib/parser/gts-parser.js

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)