1
0
Fork 0
mirror of https://github.com/anyproto/anytype-ts.git synced 2025-06-08 05:57:02 +09:00

linter fixes

This commit is contained in:
Andrew Simachev 2023-08-10 11:12:43 +02:00
parent c1b1f26035
commit 0b6ed5bf4c
No known key found for this signature in database
GPG key ID: 49A163D0D14E6FD8
139 changed files with 917 additions and 898 deletions

View file

@ -4,23 +4,23 @@ const remoteConfigUrl = 'https://raw.githubusercontent.com/anyproto/open/main/co
function processLicenses(licenses, allowedLicenses) {
const disallowedPackages = Object.keys(licenses).filter(pkg => {
var pkgLicenses = licenses[pkg].licenses.replace(/[()*]/g, '')
var pkgLicenses = licenses[pkg].licenses.replace(/[()*]/g, '');
// The hyphenation language patterns are licensed under the LGPL (unless otherwise noted) and copyrighted to their respective creators and maintainers.
// https://github.com/bramstein/hyphenation-patterns
if (pkg.startsWith("hyphenation.")) {
pkgLicenses = "LGPL"
}
pkgLicenses = "LGPL";
};
// Solutions developed by Anytype or Any Association are allowed
if (licenses[pkg].publisher == "Anytype" || licenses[pkg].publisher == "Any" || licenses[pkg].publisher == "Any Association") {
return false;
}
};
if (pkgLicenses.includes(' AND ')) {
const licenseNames = pkgLicenses.split(' AND ')
const licenseNames = pkgLicenses.split(' AND ');
return !licenseNames.every(name => allowedLicenses.includes(name));
}
};
const licenseNames = pkgLicenses.split(' OR ');
return !licenseNames.some(name => allowedLicenses.includes(name));
@ -32,9 +32,9 @@ function processLicenses(licenses, allowedLicenses) {
});
process.exit(1);
} else {
console.info('All packages have allowed licenses.')
}
}
console.info('All packages have allowed licenses.');
};
};
https.get(remoteConfigUrl, (res) => {
let data = '';
@ -53,4 +53,4 @@ https.get(remoteConfigUrl, (res) => {
}).on('error', (err) => {
console.error(`Error retrieving remote configuration: ${err}`);
process.exit(1);
});
});