mirror of https://github.com/FOME-Tech/wiki.git
Bump Biome
This commit is contained in:
parent
0fcdb25b93
commit
50706bb204
|
@ -20,8 +20,7 @@
|
|||
"noConsoleLog": "off"
|
||||
},
|
||||
"nursery": {
|
||||
"all": true,
|
||||
"useExhaustiveDependencies": "off"
|
||||
"all": true
|
||||
},
|
||||
"complexity": {
|
||||
"all": true,
|
||||
|
@ -33,7 +32,7 @@
|
|||
"enabled": true,
|
||||
"indentStyle": "space",
|
||||
"lineWidth": 100,
|
||||
"indentSize": 2
|
||||
"indentWidth": 2
|
||||
},
|
||||
"javascript": {
|
||||
"formatter": {
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"remark-math": "^3.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "1.2.2",
|
||||
"@biomejs/biome": "1.3.1",
|
||||
"@docusaurus/module-type-aliases": "^2.4.3",
|
||||
"@tsconfig/docusaurus": "^2.0.2",
|
||||
"docusaurus-prince-pdf": "^1.2.1",
|
||||
|
@ -2151,9 +2151,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@biomejs/biome": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-1.2.2.tgz",
|
||||
"integrity": "sha512-fXwXi56ZdaKO/N3rTmhWw41UxstoviODk+wia4WWNSlm23r8xJ/NxjaZ88scV2IsmsFHqc8rmwb2dkrStAdIEw==",
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-1.3.1.tgz",
|
||||
"integrity": "sha512-ufGCBj8ZNbF+vZDZscqvvLIGsh8M4BduQoJ1X3nm8c9Dupp8gzAKibZSWDLLcgnsAVeKEmWwY6r3Wv/JIa0LgA==",
|
||||
"dev": true,
|
||||
"hasInstallScript": true,
|
||||
"bin": {
|
||||
|
@ -2162,19 +2162,23 @@
|
|||
"engines": {
|
||||
"node": ">=14.*"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/biome"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@biomejs/cli-darwin-arm64": "1.2.2",
|
||||
"@biomejs/cli-darwin-x64": "1.2.2",
|
||||
"@biomejs/cli-linux-arm64": "1.2.2",
|
||||
"@biomejs/cli-linux-x64": "1.2.2",
|
||||
"@biomejs/cli-win32-arm64": "1.2.2",
|
||||
"@biomejs/cli-win32-x64": "1.2.2"
|
||||
"@biomejs/cli-darwin-arm64": "1.3.1",
|
||||
"@biomejs/cli-darwin-x64": "1.3.1",
|
||||
"@biomejs/cli-linux-arm64": "1.3.1",
|
||||
"@biomejs/cli-linux-x64": "1.3.1",
|
||||
"@biomejs/cli-win32-arm64": "1.3.1",
|
||||
"@biomejs/cli-win32-x64": "1.3.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@biomejs/cli-darwin-arm64": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-1.2.2.tgz",
|
||||
"integrity": "sha512-Fx1IURKhoqH6wPawtKLT6wcfMSjRRcNK8+VWau0iDOjXvNtjJpSmICbU89B7Vt/gZRwPqkfDMBkFwm6V5vFTSQ==",
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-1.3.1.tgz",
|
||||
"integrity": "sha512-m3cBroQftLFYFh3to6RO4ooLqZsE2K9yf5xOlDjm6D4Vrgq85XFwDOxjjJyGGDjDPQ55xGunm80qmGr8jTjiyA==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
|
@ -2188,9 +2192,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@biomejs/cli-darwin-x64": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-1.2.2.tgz",
|
||||
"integrity": "sha512-JNaAFOI/ZisnmzvcFNd73geJxaFaN2L4YsWM6cgBeKyLY/ycl9C/PBTFfEmeB1c7f5XIIal8P2cj47kLJpN5Ig==",
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-1.3.1.tgz",
|
||||
"integrity": "sha512-i2yDivc/HHBRFJMoRUUPsFs9pKK0NnS/8tQg/uqNsAkLMF9OKZCCxtUJPmpUBHpdQ2f39An1cVpFmCIEv0uYJQ==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
|
@ -2204,9 +2208,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@biomejs/cli-linux-arm64": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-1.2.2.tgz",
|
||||
"integrity": "sha512-JHXRnfhOLx8UO/Fcyn2c5pFRri0XKqRZm2wf5oH5GSfLVpckDw2X15dYGbu3nmfM/3pcAaTV46pUpjrCnaAieg==",
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-1.3.1.tgz",
|
||||
"integrity": "sha512-H56MB7Mf59snzG+nLpfS2j3jXsJ+a6aQOBeRiT0rgn44FZ63yI9jWNIgN1+Xylsa8shmwtquOkoxLS/4KKt0Qg==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
|
@ -2220,9 +2224,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@biomejs/cli-linux-x64": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-1.2.2.tgz",
|
||||
"integrity": "sha512-5Zr+iM7lUKsw81p9PkXRESuH2/AhRZ6RCWkgE+FSLcxMhXy/4RDR+o2YQDsJM6cWKIzOJM05vDHTGrDq7vXE4A==",
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-1.3.1.tgz",
|
||||
"integrity": "sha512-8ENayCpYXXC77a7AxDNjC+pPKMYteLzysxhkCCZ7Gd2sWtrH8iMM45JL8wQJhoHz5NT3+qgsfGafiNuxeVAVlg==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
|
@ -2236,9 +2240,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@biomejs/cli-win32-arm64": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-1.2.2.tgz",
|
||||
"integrity": "sha512-HvUcG2p++RvYP0zfOqh+DgiUUH+JI/uETr0kzWlOJ9F3lsG525pkywg4RSd4OvJd7Wpd3wt3UpN/A4IEJaVmbA==",
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-1.3.1.tgz",
|
||||
"integrity": "sha512-gAx/E949/1/jQDwG9nTspVtjikBI/y7RbbUwwBVABF1bcAUC63VhrHfKJRbM7VTXMlZ7n9YrxkyMww8vf40qcQ==",
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
|
@ -2252,9 +2256,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@biomejs/cli-win32-x64": {
|
||||
"version": "1.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-1.2.2.tgz",
|
||||
"integrity": "sha512-bfaFJwqJ9ApFga2o88OaROSd3pasYRzRGXHJWAE9VUUKdSNSTYxHOqVrNvV54yYPtL6Kt9xkuZa4HNu9it3TaA==",
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-1.3.1.tgz",
|
||||
"integrity": "sha512-+08eKmEdVM7d4UxY/tff2aPXbeUNNp6wwH7v0FbrE+25mH9lhELgylEk4+k6OLXOcDT7KDAduzP2f9CuM/Aj9w==",
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
"remark-math": "^3.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "1.2.2",
|
||||
"@biomejs/biome": "1.3.1",
|
||||
"@docusaurus/module-type-aliases": "^2.4.3",
|
||||
"@tsconfig/docusaurus": "^2.0.2",
|
||||
"docusaurus-prince-pdf": "^1.2.1",
|
||||
|
|
|
@ -16,23 +16,19 @@ const red = (text) => `\x1b[31m${text}\x1b[0m`;
|
|||
const errors = [];
|
||||
const wikiUrl = 'wiki.fome.tech';
|
||||
|
||||
/**
|
||||
* Check whether links are adhering to custom rules
|
||||
* @param {Array<string>} files - List of file names to check
|
||||
*/
|
||||
const validateDocRules = (files) => {
|
||||
/**
|
||||
* Check whether links are adhering to custom rules
|
||||
* @param {Array<string>} files - List of file names to check
|
||||
*/
|
||||
|
||||
let fileMatchIndicator = '';
|
||||
if (files.length === 0) {
|
||||
console.log('UsageError: no files qualify!');
|
||||
process.exit(1);
|
||||
}
|
||||
if (files.length > 1) {
|
||||
fileMatchIndicator = `${files.length} files`;
|
||||
} else {
|
||||
fileMatchIndicator = files[0];
|
||||
}
|
||||
console.log(`Validating rules for URL links in: ${fileMatchIndicator}`);
|
||||
|
||||
const fileMatchIndicator = files.length > 1 ? `${files.length} files` : files[0];
|
||||
|
||||
console.log(`Validating rules for URL links in: ${fileMatchIndicator}`);
|
||||
|
||||
// * Check whether links are not staring with "https://wiki.fome.tech"
|
||||
// Note: dynamic javascript string interpolation is used here (see https://www.crstin.com/js-regex-interpolation/)
|
||||
|
@ -79,7 +75,7 @@ const validateDocRules = (files) => {
|
|||
* Load all md and mdx files from / docs and process them
|
||||
*/
|
||||
const main = () => {
|
||||
// ToDo: add try + catch?
|
||||
// TODO: add try + catch?
|
||||
const args = process.argv.slice(2);
|
||||
const files = glob.sync(args[0]);
|
||||
|
||||
|
@ -88,20 +84,20 @@ const main = () => {
|
|||
|
||||
if (errors.length === 0) {
|
||||
console.log('✅ Ok');
|
||||
} else {
|
||||
console.log('❌ Failed\n');
|
||||
console.log(red(`Number of Errors found: ${errors.length}`));
|
||||
errors.forEach((error) => {
|
||||
console.log(
|
||||
`[${error.fileName}]` +
|
||||
`[Line:${error.lineNo}]` +
|
||||
`[errType:${error.errType}]` +
|
||||
`"${error.lineContent.trim()}"`,
|
||||
);
|
||||
});
|
||||
|
||||
process.exit(2);
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
console.log('❌ Failed\n');
|
||||
console.log(red(`Number of Errors found: ${errors.length}`));
|
||||
errors.forEach((error) => {
|
||||
console.log(
|
||||
`[${error.fileName}][Line:${error.lineNo}][Type:${
|
||||
error.errType
|
||||
}]" ${error.lineContent.trim()}"`,
|
||||
);
|
||||
});
|
||||
|
||||
process.exit(2);
|
||||
};
|
||||
|
||||
// main
|
||||
|
|
Loading…
Reference in New Issue