@bhupesh123/lint-error
v1.0.0
Published
Lint error detection microservice for GitHub repositories
Downloads
12
Maintainers
Readme
@github-analyzer/lint-error
Lint error detection microservice for GitHub repositories.
Installation
npm install -g @github-analyzer/lint-errorUsage
CLI
# Analyze a repository
lint-error analyze --owner facebook --repo react --branch main --token YOUR_GITHUB_TOKEN
# Or use environment variable
export GITHUB_TOKEN=your_token_here
lint-error analyze --owner facebook --repo reactProgrammatic API
import { LintErrorAnalyzer } from '@github-analyzer/lint-error';
const analyzer = new LintErrorAnalyzer('YOUR_GITHUB_TOKEN');
const result = await analyzer.analyzeRepository('facebook', 'react', 'main');
console.log(`Total Errors: ${result.totalErrors}`);
console.log(`Total Warnings: ${result.totalWarnings}`);
console.log(result.errors);Features
- Detects common lint issues across multiple languages
- Analyzes entire repositories recursively
- Provides detailed error reports with file, line, and column information
- Summarizes issues by file and rule
- Supports JavaScript, TypeScript, Python, Java, Go, and more
API
LintErrorAnalyzer
Constructor
new LintErrorAnalyzer(githubToken: string)Methods
analyzeRepository(owner, repo, branch?)
Analyzes a GitHub repository for lint errors.
Parameters:
owner(string): Repository ownerrepo(string): Repository namebranch(string, optional): Branch name (default: 'main')
Returns: Promise<LintAnalysisResult>
License
MIT
