Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const docs = await Promise.all(
results.map(async ({ uri }) => sourcegraph.workspace.openTextDocument(new URL(uri)))
)
const tseslintConfig: TSESLint.ParserOptions = {
ecmaVersion: 2018,
range: true,
sourceType: 'module',
filePath: 'foo.tsx',
useJSXTextNode: true,
ecmaFeatures: { jsx: true },
}
const linter = new Linter()
linter.defineParser('@typescript-eslint/parser', tseslintParser)
const stdRules = _eslintConfigStandard.rules
for (const ruleId of Object.keys(stdRules)) {
if (!linter.getRules().has(ruleId)) {
delete stdRules[ruleId]
}
}
// delete stdRules.indent
// delete stdRules['space-before-function-paren']
// delete stdRules['no-undef']
// delete stdRules['comma-dangle']
// delete stdRules['no-unused-vars']
const config: Linter.Config = {
parser: '@typescript-eslint/parser',
parserOptions: tseslintConfig,
rules: {
...stdRules,