use of com.intellij.lang.javascript.DialectOptionHolder in project intellij-plugins by JetBrains.
the class TsLintExternalAnnotator method acceptPsiFile.
@Override
protected boolean acceptPsiFile(@NotNull PsiFile file) {
if (!(file instanceof JSFile))
return false;
final TsLintConfiguration configuration = TsLintConfiguration.getInstance(file.getProject());
if (configuration.isAllowJs() && JSUtils.isJavaScriptFile(file))
return true;
final DialectOptionHolder holder = DialectDetector.dialectOfFile(file);
return holder != null && holder.isTypeScript;
}
Aggregations