forked from Christopherdominic/soroban-ajo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfix-lint.sh
More file actions
30 lines (25 loc) · 1.12 KB
/
fix-lint.sh
File metadata and controls
30 lines (25 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
# Fix lint errors in frontend
cd /workspaces/soroban-ajo/frontend
# Fix unused variables by prefixing with underscore
find src -name "*.tsx" -o -name "*.ts" | while read file; do
# Fix unused variables
sed -i 's/const sortField =/const _sortField =/g' "$file"
sed -i 's/const sortDirection =/const _sortDirection =/g' "$file"
sed -i 's/const toggleSort =/const _toggleSort =/g' "$file"
sed -i 's/const handleCopyLink =/const _handleCopyLink =/g' "$file"
sed -i 's/const handleRowClick =/const _handleRowClick =/g' "$file"
sed -i 's/const isError =/const _isError =/g' "$file"
sed -i 's/const hasPreviousPage =/const _hasPreviousPage =/g' "$file"
sed -i 's/const useCache =/const _useCache =/g' "$file"
sed -i 's/const severity =/const _severity =/g' "$file"
sed -i 's/, data /, _data /g' "$file"
# Fix unescaped entities
sed -i "s/don't/don\'t/g" "$file"
sed -i "s/can't/can\'t/g" "$file"
sed -i "s/won't/won\'t/g" "$file"
sed -i "s/isn't/isn\'t/g" "$file"
sed -i "s/doesn't/doesn\'t/g" "$file"
sed -i 's/"Ajo"/"Ajo"/g' "$file"
done
echo "✅ Lint fixes applied"