mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-22 00:13:45 -05:00
lint: move last remaining native eslint rules to oxlint (create new alternatives) (#6468)
* lint: clean up unnecessary config and disables * fix: update package import path in browser preload script * lint: create custom ESLint rules for rules not in oxlint - Add object-shorthand-properties rule (replaces object-shorthand) - Add prefer-const rule (replaces prefer-const) - Add no-anchor-tag rule (replaces no-restricted-syntax for <a> tags) - Add no-react-default-import rule (replaces no-restricted-syntax for React.*) These custom rules are needed because oxlint doesn't support these rules yet. All rules are properly tested and integrated into the ESLint config. * refactor: enhance prefer-const rule to track variable reassignments by scope - Introduced a mapping of scopes to reassigned variable names, improving the accuracy of the prefer-const rule. - Added helper functions to determine variable scopes and reassignment status. - Updated logic to check variable reassignments during declaration analysis. - Adjusted test cases to reflect changes in variable handling.
This commit is contained in:
committed by
GitHub
parent
88fbfe7078
commit
f1faf45659
@@ -71,7 +71,7 @@ try {
|
||||
console.log('Generated summary:', summary);
|
||||
|
||||
const result = {
|
||||
summary: summary,
|
||||
summary,
|
||||
prNumber: prDetails.number,
|
||||
author: prDetails.author,
|
||||
};
|
||||
|
||||
11
.github/actions/check-migrations.js
vendored
11
.github/actions/check-migrations.js
vendored
@@ -35,14 +35,15 @@ function readMigrations(ref) {
|
||||
}
|
||||
|
||||
spawnSync('git', ['fetch', 'origin', 'master']);
|
||||
let masterMigrations = readMigrations('origin/master');
|
||||
let headMigrations = readMigrations('HEAD');
|
||||
const masterMigrations = readMigrations('origin/master');
|
||||
const headMigrations = readMigrations('HEAD');
|
||||
|
||||
let latestMasterMigration = masterMigrations[masterMigrations.length - 1].date;
|
||||
let newMigrations = headMigrations.filter(
|
||||
const latestMasterMigration =
|
||||
masterMigrations[masterMigrations.length - 1].date;
|
||||
const newMigrations = headMigrations.filter(
|
||||
migration => !masterMigrations.find(m => m.name === migration.name),
|
||||
);
|
||||
let badMigrations = newMigrations.filter(
|
||||
const badMigrations = newMigrations.filter(
|
||||
migration => migration.date <= latestMasterMigration,
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user