Skip to content

Commit 7245a44

Browse files
committed
lint(typescript): Add .ts and .tsx files to lint engine
1 parent 6401cbc commit 7245a44

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/sentry/lint/engine.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ def get_files_for_list(file_list):
7070

7171
def get_js_files(file_list=None, snapshots=False):
7272
if snapshots:
73-
extensions = ('.js', '.jsx', '.jsx.snap', '.js.snap')
73+
extensions = ('.js', '.jsx', '.ts', '.tsx', '.jsx.snap', '.js.snap')
7474
else:
75-
extensions = ('.js', '.jsx')
75+
extensions = ('.js', '.jsx', '.ts', '.tsx')
7676

7777
if file_list is None:
7878
file_list = ['tests/js', 'src/sentry/static/sentry/app']
@@ -112,9 +112,9 @@ def js_lint(file_list=None, parseable=False, format=False):
112112
has_errors = False
113113
if js_file_list:
114114
if os.environ.get('CI'):
115-
cmd = [eslint_wrapper_path, '--ext', '.js,.jsx']
115+
cmd = [eslint_wrapper_path, '--ext', '.js,.jsx,.ts,.tsx']
116116
else:
117-
cmd = [eslint_path, '--ext', '.js,.jsx']
117+
cmd = [eslint_path, '--ext', '.js,.jsx,.ts,.tsx']
118118

119119
if format:
120120
cmd.append('--fix')

0 commit comments

Comments
 (0)