eslint-plugin-ember-template-lint 0.13.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.
- package/lib/rules/hbs-worker.js +10 -0
- package/package.json +1 -1
package/lib/rules/hbs-worker.js
CHANGED
@@ -118,6 +118,16 @@ runAsWorker(async (filename, text, options, columnOffset=0) => {
|
|
118
118
|
const lint = new Lint.default(options);
|
119
119
|
process.env.emberTemplateLintFileName = filename;
|
120
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
|
+
}
|
121
131
|
|
122
132
|
const messages = await lint.verify({
|
123
133
|
source: text,
|