diff --git a/packages/config/eslint/index.js b/packages/config/eslint/index.js index 908adfe53..da705940c 100644 --- a/packages/config/eslint/index.js +++ b/packages/config/eslint/index.js @@ -61,5 +61,13 @@ module.exports = { ], }, }, + { + files: ["**/*.mjs"], + env: { + es6: true, + node: true, + console: true, + }, + }, ], }; diff --git a/packages/core/scripts/add-feature.mjs b/packages/core/scripts/add-feature.mjs index 597074c8f..6300fb4ef 100644 --- a/packages/core/scripts/add-feature.mjs +++ b/packages/core/scripts/add-feature.mjs @@ -1,14 +1,15 @@ #!/usr/bin/env zx +import "zx/globals"; import { basename } from "node:path"; const features = argv._; if (!features.length) { - await console.error(`Usage: ${basename(__filename)} [ ...]`); + console.error(`Usage: ${basename(__filename)} [ ...]`); process.exit(1); } within(async () => { - cd('src'); + cd("src"); for (const feature of features) { const rootFolderName = `${feature}-feature`; await $`mkdir ${rootFolderName}`; @@ -16,6 +17,6 @@ within(async () => { cd(rootFolderName); await $`mkdir entities data use-cases repository`; await $`touch entities/.gitkeep data/.gitkeep use-cases/.gitkeep repository/.gitkeep`; - }) + }); } -}) +});