1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-16 00:14:34 +02:00

Tools: Add prefer-arrow-callbacks to ESlint rules (#7810)

This commit is contained in:
pedr
2023-02-20 12:02:29 -03:00
committed by GitHub
parent ca575162f7
commit f2995dd196
206 changed files with 511 additions and 510 deletions

View File

@ -15,7 +15,7 @@ async function updateCodeProjVersions(filePath: string) {
let newVersionId = 0;
// MARKETING_VERSION = 10.1.0;
newContent = newContent.replace(/(MARKETING_VERSION = )(\d+\.\d+)\.(\d+)(.*)/g, function(_match, prefix, majorMinorVersion, buildNum, suffix) {
newContent = newContent.replace(/(MARKETING_VERSION = )(\d+\.\d+)\.(\d+)(.*)/g, (_match, prefix, majorMinorVersion, buildNum, suffix) => {
const n = Number(buildNum);
if (isNaN(n)) throw new Error(`Invalid version code: ${buildNum}`);
newVersion = `${majorMinorVersion}.${n + 1}`;
@ -23,7 +23,7 @@ async function updateCodeProjVersions(filePath: string) {
});
// CURRENT_PROJECT_VERSION = 58;
newContent = newContent.replace(/(CURRENT_PROJECT_VERSION = )(\d+)(.*)/g, function(_match, prefix, projectVersion, suffix) {
newContent = newContent.replace(/(CURRENT_PROJECT_VERSION = )(\d+)(.*)/g, (_match, prefix, projectVersion, suffix) => {
const n = Number(projectVersion);
if (isNaN(n)) throw new Error(`Invalid version code: ${projectVersion}`);
newVersionId = n + 1;