feat: separate prettier from eslint

This commit is contained in:
Rainer Killinger
2023-01-11 13:25:18 +01:00
committed by Thea Schöbl
parent 939fb6ef0f
commit a88d000ccd
381 changed files with 17952 additions and 38411 deletions

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2022 StApps
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <https://www.gnu.org/licenses/>.
*/
import fs from 'fs';
import {omit} from '../src/app/_helpers/collections/omit';
@@ -30,22 +30,15 @@ function accumulateFile(path: string, additionalLicensesPath: string) {
JSON.stringify(
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Object.entries<any>({
...pickBy(
JSON.parse(fs.readFileSync(path).toString()),
(_, key: string) => {
const parts = key.split('@');
...pickBy(JSON.parse(fs.readFileSync(path).toString()), (_, key: string) => {
const parts = key.split('@');
return (
dependencies[parts.slice(0, -1).join('@')] ===
parts[parts.length - 1]
);
},
),
return dependencies[parts.slice(0, -1).join('@')] === parts[parts.length - 1];
}),
...JSON.parse(fs.readFileSync(additionalLicensesPath).toString()),
})
.map(([key, value]) => ({
licenseText:
value.licenseFile && fs.readFileSync(value.licenseFile, 'utf8'),
licenseText: value.licenseFile && fs.readFileSync(value.licenseFile, 'utf8'),
name: key,
...omit(value, 'licenseFile', 'path'),
}))
@@ -54,7 +47,4 @@ function accumulateFile(path: string, additionalLicensesPath: string) {
);
}
accumulateFile(
'./src/assets/about/licenses.json',
'./additional-licenses.json',
);
accumulateFile('./src/assets/about/licenses.json', './additional-licenses.json');