Skip to content

Commit

Permalink
Eslint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Feb 12, 2024
1 parent ee44866 commit 0dcdc9f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 1 addition & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
module.exports = {
env: {
es6: true,
es2020: true,
node: true
},
extends: "eslint:recommended",
parserOptions: {
sourceType: "module",
ecmaVersion: 2017
},
rules: {
indent: ["error", 2],
"linebreak-style": ["error", "unix"],
Expand Down
6 changes: 3 additions & 3 deletions src/image-attrs-to-posthtml-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async function imageAttributesToPosthtmlNode(attributes, instanceOptions, global
}

if(!globalPluginOptions) {
throw new Error("Missing global defaults for `@11ty/eleventy-img`: did you call addPlugin?")
throw new Error("Missing global defaults for `@11ty/eleventy-img`: did you call addPlugin?");
}

if(!instanceOptions) {
Expand Down Expand Up @@ -64,7 +64,7 @@ async function imageAttributesToPosthtmlNode(attributes, instanceOptions, global
// You bet we throw an error on missing alt in `imageAttributes` (alt="" works okay)
let obj = await eleventyImage.generateObject(metadata, imageAttributes);
return convertToPosthtmlNode(obj);
};
}

function cleanTag(node) {
// Delete all prefixed attributes
Expand All @@ -88,4 +88,4 @@ module.exports = {
cleanTag,
isIgnored,
getOutputDirectory,
}
};

0 comments on commit 0dcdc9f

Please sign in to comment.