feat: Lint curriculum, including test yaml

This commit is contained in:
Oliver Eyton-Williams
2019-04-12 16:44:14 +02:00
committed by mrugesh
parent 7d4dc382b4
commit 538e0bbee3
9 changed files with 491 additions and 97 deletions

View File

@ -1,3 +1,6 @@
const path = require('path');
require('dotenv').config({ path: path.resolve(__dirname, '../.env') });
exports.dasherize = function dasherize(name) {
return ('' + name)
.toLowerCase()
@ -15,4 +18,15 @@ const supportedLangs = [
'spanish'
];
exports.testedLangs = function testedLangs() {
if (process.env.TEST_CHALLENGES_FOR_LANGS) {
const filterLangs = process.env.TEST_CHALLENGES_FOR_LANGS.split(',').map(
lang => lang.trim().toLowerCase()
);
return supportedLangs.filter(lang => filterLangs.includes(lang));
} else {
return [...supportedLangs];
}
};
exports.supportedLangs = supportedLangs;