eslint-plugin-ember-template-lint 0.14.0 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -53,14 +53,6 @@ async function _applyFixes(options, results, columnOffset) {
53
53
  fileConfig,
54
54
  });
55
55
 
56
- if (ruleName === 'prettier') {
57
- const getPrettierOptions = rule.getPrettierOptions;
58
- rule.getPrettierOptions = function () {
59
- const options = getPrettierOptions.call(this);
60
- return Object.assign(options, fileConfig.rules[ruleName]?.config || {});
61
- };
62
- }
63
-
64
56
  let visitor = await rule.getVisitor();
65
57
  let { code } = transform(templateInfo.template, () => visitor);
66
58
 
@@ -126,6 +118,16 @@ runAsWorker(async (filename, text, options, columnOffset=0) => {
126
118
  const lint = new Lint.default(options);
127
119
  process.env.emberTemplateLintFileName = filename;
128
120
  process.env.emberTemplateLintFixMode = false;
121
+ await lint.loadConfig();
122
+ let fileConfig = lint._moduleStatusCache.getConfigForFile(options);
123
+ if (fileConfig.loadedRules['prettier']) {
124
+ const rule = fileConfig.loadedRules['prettier'].prototype;
125
+ const getPrettierOptions = rule.getPrettierOptions;
126
+ rule.getPrettierOptions = function () {
127
+ const options = getPrettierOptions.call(this);
128
+ return Object.assign(options, fileConfig.rules.prettier?.config || {});
129
+ };
130
+ }
129
131
 
130
132
  const messages = await lint.verify({
131
133
  source: text,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-plugin-ember-template-lint",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "description": "Provide linting for ember template",
5
5
  "keywords": [
6
6
  "eslint",