Skip to content

Commit

Permalink
fix: add globals module in generated .eslintrc.js (fixes #59)
Browse files Browse the repository at this point in the history
see the discussion: #59 (comment)
  • Loading branch information
aladdin-add committed May 19, 2023
1 parent e6f05d6 commit d00bf9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/init/config-file.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ async function writeYAMLConfigFile(config, filePath) {
async function writeJSConfigFile(config, filePath) {
debug(`Writing JS config file: ${filePath}`);

const stringifiedContent = `module.exports = ${stringify(config, { cmp: sortByKey, space: 4 })}\n`;
const stringifiedContent = `/* globals module */\nmodule.exports = ${stringify(config, { cmp: sortByKey, space: 4 })}\n`;

fs.writeFileSync(filePath, stringifiedContent, "utf8");

Expand Down

0 comments on commit d00bf9d

Please sign in to comment.