chore(scaffolder): fixing linting issues in the repo
This commit is contained in:
@@ -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()'
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user