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:
parent
c1b1f26035
commit
0b6ed5bf4c
139 changed files with 917 additions and 898 deletions
|
@ -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);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue