Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public validate(filePath: string, documentText: string): Diagnostic[] {
return linter
.processStr(documentText, this.config.build())
.messages
.map(e => this.toDiagnostic(e));
}
const Linting: React.SFC = ({ contract }) => {
const report = linter.processStr(contract, configAsJson)
return (
{report.errorCount} Errors {report.warningCount} Warnings
{report.messages.map((curError: any, index: number) => (
<pre style="{{"> {curError.message} on Line {curError.line} Column{' '}
{curError.column}
</pre>
))}