feat: add check for copyright years

Fixes #17
This commit is contained in:
Karl-Philipp Wulfert
2019-05-16 11:57:07 +02:00
parent 3a86af72e2
commit 44c82ade69
2 changed files with 90 additions and 4 deletions

View File

@@ -20,6 +20,7 @@ import {
checkCIConfig,
checkConfigurationFilesAreExtended,
checkContributors,
checkCopyrightYears,
checkDependencies,
checkLicenses,
checkNeededFiles,
@@ -86,10 +87,12 @@ suggestOverwrite = suggestOverwrite || checkedNYCConfiguration[1];
packageJsonChanged = packageJsonChanged || checkScripts(rules, packageJson, commander.replace);
checkContributors(packageJson);
checkContributors(path, packageJson);
checkCIConfig(rules, path);
checkCopyrightYears(path, 'src');
if (packageJsonChanged) {
writeFileSync(resolve(path, 'package.json'), JSON.stringify(packageJson, null, 2));
consoleLog(`Changes were written to '${packageJsonPath}'.`);