Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
"use strict";
const {
showInvisibles,
generateDifferences
} = require("prettier-linter-helpers");
const getLocFromIndex = require("../utils/get-loc-from-index");
const { INSERT, DELETE, REPLACE } = generateDifferences;
let prettier;
const Rule = require("ember-template-lint").Rule;
function isFile(loc) {
return loc.start && loc.start.line === 1 && loc.start.column === 0;
}
module.exports = class Prettier extends Rule {
constructor(options) {
super(options);
this.filePath = options.moduleName + ".hbs";
}
visitor() {
return {
Program: {
exit(node) {
// in hbs AST a Program may be: a Template or a Block