Skip to content

Commit 11da75e

Browse files
dpwanjalaclaude
andcommitted
fix: resolve CI lint and clippy failures
- Fix clippy print_literal warning in projects.rs - Fix dead_code warning for Registry::find_by_name - Fix ESLint no-unused-vars for underscore-prefixed params - Fix react-hooks/set-state-in-effect in App.tsx - Fix remaining 'work' -> 'cmt' CLI reference in projects.rs Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent df87b13 commit 11da75e

4 files changed

Lines changed: 9 additions & 3 deletions

File tree

src/commands/projects.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,15 @@ fn list_projects(current_work_dir: Option<&Path>, json: bool) -> Result<()> {
5252
}
5353

5454
if registry.projects.is_empty() {
55-
eprintln!("No projects registered. Use 'work projects add <path>' or 'work init' to register.");
55+
eprintln!("No projects registered. Use 'cmt projects add <path>' or 'cmt init' to register.");
5656
return Ok(());
5757
}
5858

5959
// Table header
60+
let headers = ["", "NAME", "PREFIX", "ITEMS", "PATH"];
6061
println!(
6162
"{:<2} {:<20} {:<8} {:<6} {}",
62-
"", "NAME", "PREFIX", "ITEMS", "PATH"
63+
headers[0], headers[1], headers[2], headers[3], headers[4]
6364
);
6465
println!("{}", "-".repeat(72));
6566

src/registry.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ impl Registry {
8484
}
8585

8686
/// Find a project by name.
87+
#[allow(dead_code)]
8788
pub fn find_by_name(&self, name: &str) -> Option<&ProjectEntry> {
8889
self.projects.iter().find(|p| p.name == name)
8990
}

web/eslint.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,8 @@ export default defineConfig([
1919
ecmaVersion: 2020,
2020
globals: globals.browser,
2121
},
22+
rules: {
23+
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
24+
},
2225
},
2326
])

web/src/pages/App.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ export function AppPage() {
2828
if (mode === 'local') {
2929
hasConfig().then((exists) => setShowOnboarding(!exists))
3030
} else {
31-
setShowOnboarding(false)
31+
// Remote mode never shows onboarding
32+
Promise.resolve().then(() => setShowOnboarding(false))
3233
}
3334
}, [mode])
3435

0 commit comments

Comments
 (0)