Skip to content

Commit c66f653

Browse files
author
Michael Großklaus
authored
Updates dependencies (#41)
chore: Updates dependencies
1 parent 9ace1d1 commit c66f653

File tree

10 files changed

+267
-903
lines changed

10 files changed

+267
-903
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.eslintrc.js

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

eslint.config.mjs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import globals from "globals";
2+
import js from "@eslint/js";
3+
import jsdoc from "eslint-plugin-jsdoc";
4+
5+
/** @type {import("eslint").Linter.FlatConfig[]} */
6+
export default [
7+
// Global settings
8+
{
9+
files: ["index.js", "lib/**/*.{js,mjs}"],
10+
plugins: {
11+
jsdoc,
12+
},
13+
rules: {
14+
...js.configs.recommended.rules,
15+
...jsdoc.configs["flat/recommended"].rules,
16+
"jsdoc/require-jsdoc": [
17+
"warn",
18+
{
19+
require: {
20+
MethodDefinition: true,
21+
},
22+
},
23+
],
24+
"jsdoc/require-param-description": "off",
25+
"jsdoc/require-returns-description": "off",
26+
},
27+
languageOptions: {
28+
sourceType: "commonjs",
29+
globals: {
30+
...globals.node,
31+
},
32+
},
33+
},
34+
35+
];

lib/plugin.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
/* eslint-disable import/no-extraneous-dependencies */
2-
/* eslint-disable import/no-dynamic-require */
3-
/* eslint-disable global-require */
4-
51
const twig = require("twig");
62
const { TemplatePath } = require("@11ty/eleventy-utils");
73
const registerShortcodes = require("./shortcodes/shortcodes");
@@ -41,7 +37,7 @@ const registerShortcodes = require("./shortcodes/shortcodes");
4137
* @typedef {object} TWIG_OPTIONS
4238
* @property {SHORTCODE[]} [shortcodes] - array of shortcodes
4339
* @property {boolean} [cache] - you could enable the twig cache for whatever reasons here
44-
* @property {Object<string, string>} [namespaces] - define namespaces to include/extend templates more easily by "@name"
40+
* @property {{[key: string]: string}} [namespaces] - define namespaces to include/extend templates more easily by "@name"
4541
*/
4642

4743
/**
@@ -56,7 +52,6 @@ const registerShortcodes = require("./shortcodes/shortcodes");
5652
/**
5753
* Throws errors if certain required options are not part of the
5854
* userOptions object
59-
*
6055
* @param {USER_OPTIONS} userOptions
6156
*/
6257
const handleErrors = (userOptions) => {
@@ -99,7 +94,6 @@ const handleErrors = (userOptions) => {
9994
/**
10095
* This extends the default eleventyConfig with the
10196
* twig templating engine
102-
*
10397
* @param {import("@11ty/eleventy").UserConfig} eleventyConfig
10498
* @param {USER_OPTIONS} userOptions
10599
*/

lib/shortcodes/assetPath.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/**
22
* Returns a simple string for the base dir of assets inside the build folder
3-
*
43
* @param {import("@11ty/eleventy").UserConfig} eleventyConfig
54
* @param {import("../plugin").USER_OPTIONS} userOptions
65
* @returns {string}

lib/shortcodes/image.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ const path = require("path");
44
/**
55
* Throws errors if certain required options are not part of the
66
* userOptions object or shortcode options
7-
*
87
* @param {object} options
98
* @param {import("../plugin").USER_OPTIONS} options.userOptions
109
* @param {string} options.filename
@@ -60,7 +59,6 @@ const handleErrors = ({ userOptions, filename, alt }) => {
6059

6160
/**
6261
* Generates responsive images
63-
*
6462
* @param {import("@11ty/eleventy").UserConfig} eleventyConfig
6563
* @param {import("../plugin").USER_OPTIONS} userOptions
6664
* @param {string} filename

lib/shortcodes/mix.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ const fs = require("fs");
33
/**
44
* This parses the manifest and returns the related asset path
55
* NOTE: This is a trivial implementation and not complete yet!
6-
*
76
* @param {import("@11ty/eleventy").UserConfig} eleventyConfig
87
* @param {import("../plugin").USER_OPTIONS} userOptions
98
* @param {string} originalAsset

lib/shortcodes/shortcodes.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ const assetPath = require("./assetPath");
55

66
/**
77
* Default shortcodes
8-
*
98
* @type {import("../plugin").TWIG_OPTIONS["shortcodes"]}
109
*/
1110
const defaultShortcodes = [
@@ -26,7 +25,6 @@ const defaultShortcodes = [
2625
/**
2726
* This utilize twigs extendFunction to implement the shortcodes after
2827
* it checks if all options for a given shortcode are defined
29-
*
3028
* @param {import("@11ty/eleventy").UserConfig} eleventyConfig
3129
* @param {import("../plugin").USER_OPTIONS} userOptions
3230
* @param {import("../plugin").SHORTCODE} shortcode
@@ -40,7 +38,6 @@ const extendTwig = (eleventyConfig, userOptions, shortcode) => {
4038
/**
4139
* Iterates over all shortcodes and add symbols with
4240
* their corresponding callbacks for twig
43-
*
4441
* @param {import("@11ty/eleventy").UserConfig} eleventyConfig
4542
* @param {import("../plugin").USER_OPTIONS} userOptions
4643
*/

package.json

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,17 @@
2828
},
2929
"homepage": "https://github.com/factorial-io/eleventy-plugin-twig#readme",
3030
"dependencies": {
31-
"@11ty/eleventy-utils": "^1.0.1"
31+
"@11ty/eleventy-utils": "^1.0.2"
3232
},
3333
"devDependencies": {
34-
"eslint": "^8.35.0",
35-
"eslint-config-airbnb-base": "^15.0.0",
36-
"eslint-config-prettier": "^8.6.0",
37-
"eslint-plugin-import": "^2.27.5",
38-
"eslint-plugin-jsdoc": "^40.0.0",
39-
"eslint-plugin-prettier": "^4.2.1",
40-
"prettier": "^2.8.4"
34+
"@eslint/js": "^9.2.0",
35+
"eslint": "^9.2.0",
36+
"eslint-plugin-jsdoc": "^48.2.5",
37+
"globals": "^15.2.0",
38+
"prettier": "^3.2.5"
4139
},
4240
"peerDependencies": {
43-
"@11ty/eleventy-img": "^3.0.0",
44-
"twig": "^1.15.4"
41+
"@11ty/eleventy-img": "^4.0.2",
42+
"twig": "^1.17.1"
4543
}
4644
}

0 commit comments

Comments
 (0)