smartprocure/directory-metagen

View on GitHub

Showing 4 of 4 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

metagen.formats.AMDCommonJS = files => `define(function(require) {
return {
${files.map(noExt).map(file => `'${file}': require('./${file}')`).join(',\n')}
};
});`
Severity: Major
Found in index.js and 1 other location - About 1 hr to fix
index.js on lines 37..39

Similar blocks of code found in 2 locations. Consider refactoring.
Open

metagen.formats.commonJS = files => `module.exports = {
${files.map(noExt).map(file => `'${file}': require('./${file}')`).join(',\n')}
};`
Severity: Major
Found in index.js and 1 other location - About 1 hr to fix
index.js on lines 40..44

Similar blocks of code found in 2 locations. Consider refactoring.
Open

metagen.formats.deepCommonJS = files => `module.exports = ${deepify(deepKeys(files), files.map(file => `require('./${noExt(file)}')`))};`
Severity: Major
Found in index.js and 1 other location - About 1 hr to fix
index.js on lines 67..69

Similar blocks of code found in 2 locations. Consider refactoring.
Open

metagen.formats.deepAMDCommonJS = files => `define(function(require) {
return ${deepify(deepKeys(files), files.map(file => `require('./${noExt(file)}')`))};
});`
Severity: Major
Found in index.js and 1 other location - About 1 hr to fix
index.js on lines 66..66
Severity
Category
Status
Source
Language