Skip to content

Commit

Permalink
Fixed lint
Browse files Browse the repository at this point in the history
  • Loading branch information
adithyanotfound committed Jan 14, 2025
1 parent 287a983 commit d765c0a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ jobs:
- name: Filter TypeScript files
id: filter-files
run: |
echo "::set-output name=ts_files::$(echo '${{ steps.changed-files.outputs.all_changed_files }}' | tr ',' '\n' | grep -E '\.(ts|tsx)$' | tr '\n' ' ')"
echo "ts_files=$(echo '${{ steps.changed-files.outputs.all_changed_files }}' | tr ',' '\n' | grep -E '\.(ts|tsx)$' | tr '\n' ' ')" >> $GITHUB_OUTPUT
shell: bash

- name: Run Python script
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/scripts/eslint_disable_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ def check_eslint(files_or_directories):
if os.path.isfile(item):
# Check a single file
if item.endswith((".ts", ".tsx")) and has_eslint_disable(item):
print(f"Error: File {item} contains eslint-disable statements.")
print(
f"Error: File {item} contains eslint-disable statements."
)
eslint_found = True
elif os.path.isdir(item):
# Recursively check files in a directory
Expand All @@ -81,7 +83,9 @@ def check_eslint(files_or_directories):
if file_name.endswith((".ts", ".tsx")):
file_path = os.path.join(root, file_name)
if has_eslint_disable(file_path):
print(f"Error: File {file_path} contains eslint-disable statements.")
print(
f"Error: File {file_path} contains eslint-disable statements."
)
eslint_found = True
return eslint_found

Expand Down

0 comments on commit d765c0a

Please sign in to comment.