Skip to content

Commit

Permalink
chore: fix linting, and include js, cjs, and mjs files
Browse files Browse the repository at this point in the history
  • Loading branch information
GeekyEggo committed Oct 16, 2024
1 parent aa637ac commit 1a1c936
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
18 changes: 17 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ import tsEslint from "typescript-eslint";

export default [
{
ignores: [".github/", "dist/", "node_modules/", "types/", "*.mjs"],
ignores: [
".github/",
"dist/",
"node_modules/",
"types/",
],
},

/**
Expand Down Expand Up @@ -121,6 +126,17 @@ export default [
},
},

/**
* JavaScript.
*/
{
files: ["**/*.{js,cjs,mjs}"],
rules: {
"@typescript-eslint/explicit-function-return-type": "off",
"jsdoc/no-types": "off",
},
},

/**
* Tests and mocks.
*/
Expand Down
9 changes: 3 additions & 6 deletions tests/__setup__/empty-transform.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,10 @@
*/
module.exports = {
/**
* Processes the file, transforming it to a readable state.
* @param {string} sourceText Text of the file to transform.
* @param {string} sourcePath Path to the file being transformed.
* @param {object} options Jest options, and context, of the current transformation.
* @returns The code, and optional map, of the transformed file.
* Processes the file, transforming it to a readable state... of no code.
* @returns An empty set of code, without a map, that mimics a transformed file.
*/
process: (sourceText, sourcePath, options) => {
process: () => {
return { code: "" };
},
};

0 comments on commit 1a1c936

Please sign in to comment.