chore(scaffolder): fixing linting issues in the repo

This commit is contained in:
blam
2020-04-28 22:53:59 +02:00
parent 9635983e5a
commit 62b917f41b
2 changed files with 11 additions and 0 deletions
+1
View File
@@ -1,5 +1,6 @@
module.exports = {
extends: [require.resolve('@backstage/cli/config/eslint')],
ignorePatterns: ['sample-templates/'],
rules: {
'no-console': 0, // Permitted in console programs
'new-cap': ['error', { capIsNew: false }], // Because Express constructs things e.g. like 'const r = express.Router()'
+10
View File
@@ -30,5 +30,15 @@ export const createScaffolder = (config?: TemplaterConfig & StorageConfig) => {
res.status(200).json(templates);
});
router.post('/v1/job/create', async (_, res) => {
// TODO(blam): Actually make this function work'
const mock = 'templateid';
res.status(201).json({ accepted: true });
const path = await store.prepare(mock);
await templater.run({ directory: path, values: { componentId: 'test' } });
});
return router;
};