From 1980e8732d3d011760d31b3a189f06f9189e6e74 Mon Sep 17 00:00:00 2001 From: Arnav Surve Date: Wed, 4 Mar 2026 12:27:24 -0800 Subject: [PATCH] support .js and .ts file extensions in CLI check --- src/cli/check.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cli/check.ts b/src/cli/check.ts index 49924e4..b5fe3aa 100644 --- a/src/cli/check.ts +++ b/src/cli/check.ts @@ -3,7 +3,7 @@ import * as path from 'node:path'; import { lintJsxCode } from '../index'; import type { LintConfig, LintResult } from '../types'; -const JSX_EXTENSIONS = new Set(['.jsx', '.tsx']); +const LINT_EXTENSIONS = new Set(['.js', '.jsx', '.ts', '.tsx']); function loadConfig(): LintConfig { const configPath = path.resolve('laint.config.json'); @@ -55,7 +55,7 @@ async function runHookMode(): Promise { } const ext = path.extname(filePath).toLowerCase(); - if (!JSX_EXTENSIONS.has(ext)) { + if (!LINT_EXTENSIONS.has(ext)) { process.exit(0); }