TouK / sputnik

Static code review for your Gerrit patchsets. Runs Checkstyle, PMD, FindBugs, Scalastyle, CodeNarc, JSLint for you!
Apache License 2.0
201 stars 117 forks source link

Feature Request - allow linting .ts and .tsx files with ESLint processor #213

Closed Tomtomgo closed 4 years ago

Tomtomgo commented 4 years ago

It seems not possible to lint .ts and .tsx files using ESLintProcessor:

@Override
public FileFilter getReviewFileFilter() {
    return new JavaScriptFilter();
}

As JavaScriptFilter is hard-coded to only include .js files.

I'm considering adding this. An option would be to add eg. GeneralOption.ADDITIONAL_ESLINT_FILE_FILTERS, where we can specify additional extensions. These then can get passed through to new JavaScriptFilter(...).