diff --git a/.eslintrc.json b/.eslintrc.json index ae597be9..30ea2db8 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -5,14 +5,40 @@ "ecmaVersion": 6, "sourceType": "module" }, - "plugins": ["@typescript-eslint", "import"], + "env": { "node": true, "es6": true }, + "plugins": ["@typescript-eslint", "import", "jest"], + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "plugin:import/recommended", + "plugin:import/typescript", + "plugin:jest/recommended" + ], "rules": { - "@typescript-eslint/class-name-casing": "warn", - "@typescript-eslint/semi": "warn", - "curly": "warn", - "eqeqeq": "warn", - "no-throw-literal": "warn", - "semi": "off", - "require-await": "warn" - } + "no-use-before-define": "off", + "@typescript-eslint/no-use-before-define": "off", + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/interface-name-prefix": "off", + "import/no-extraneous-dependencies": [ + "error", + { + "devDependencies": ["**/src/test/**", "**/src/**/*{test,spec}.ts"] + } + ] + }, + "settings": { + "import/core-modules": ["vscode"], + "import/parsers": { + "@typescript-eslint/parser": [".ts", ".tsx"] + }, + "import/resolver": { + "typescript": { + "alwaysTryTypes": true + } + } + }, + "ignorePatterns": ["**/core/common/**", "*.js"], + "reportUnusedDisableDirectives": true } diff --git a/.vscode/settings.json b/.vscode/settings.json index 640e233e..b73089f3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -20,10 +20,10 @@ "**/node_modules/**/*", "packages/**/*" ], - "editor.defaultFormatter": "esbenp.prettier-vscode", - "prettier.requireConfig": true, - "editor.formatOnSave": true, "editor.tabSize": 2, + "editor.formatOnSave": true, + "editor.formatOnSaveMode": "file", + "editor.defaultFormatter": "esbenp.prettier-vscode", "jest.autoRun": "off", "jest.rootPath": "packages/foam-vscode", "jest.jestCommandLine": "yarn jest", diff --git a/packages/foam-vscode/package.json b/packages/foam-vscode/package.json index 205197d6..2da7abec 100644 --- a/packages/foam-vscode/package.json +++ b/packages/foam-vscode/package.json @@ -394,10 +394,6 @@ "publish-extension": "yarn publish-extension-vscode && yarn publish-extension-openvsx && yarn npm-cleanup" }, "devDependencies": { - "@babel/core": "^7.11.0", - "@babel/plugin-transform-runtime": "^7.10.4", - "@babel/preset-env": "^7.11.0", - "@babel/preset-typescript": "^7.10.4", "@types/dateformat": "^3.0.1", "@types/glob": "^7.1.1", "@types/lodash": "^4.14.157", @@ -410,7 +406,9 @@ "@typescript-eslint/eslint-plugin": "^2.30.0", "@typescript-eslint/parser": "^2.30.0", "eslint": "^6.8.0", + "eslint-import-resolver-typescript": "^2.5.0", "eslint-plugin-import": "^2.24.2", + "eslint-plugin-jest": "^25.3.0", "husky": "^4.2.5", "jest": "^26.2.2", "jest-extended": "^0.11.5", diff --git a/packages/foam-vscode/src/core/janitor/apply-text-edit.ts b/packages/foam-vscode/src/core/janitor/apply-text-edit.ts index 454bee5b..a7d9e974 100644 --- a/packages/foam-vscode/src/core/janitor/apply-text-edit.ts +++ b/packages/foam-vscode/src/core/janitor/apply-text-edit.ts @@ -13,8 +13,8 @@ export const applyTextEdit = (text: string, textEdit: TextEdit): string => { const eol = detectNewline(text) || os.EOL; const lines = text.split(eol); const characters = text.split(''); - let startOffset = getOffset(lines, textEdit.range.start, eol); - let endOffset = getOffset(lines, textEdit.range.end, eol); + const startOffset = getOffset(lines, textEdit.range.start, eol); + const endOffset = getOffset(lines, textEdit.range.end, eol); const deleteCount = endOffset - startOffset; const textToAppend = `${textEdit.newText}`; diff --git a/packages/foam-vscode/src/core/janitor/index.ts b/packages/foam-vscode/src/core/janitor/index.ts index bf9b4856..c466a650 100644 --- a/packages/foam-vscode/src/core/janitor/index.ts +++ b/packages/foam-vscode/src/core/janitor/index.ts @@ -56,7 +56,7 @@ export const generateLinkReferences = ( const first = note.definitions[0]; const last = note.definitions[note.definitions.length - 1]; - var nonGeneratedReferenceDefinitions = note.definitions; + let nonGeneratedReferenceDefinitions = note.definitions; // if we have more definitions then referenced pages AND the page refers to a page // we expect non-generated link definitions to be present @@ -115,7 +115,7 @@ export const generateLinkReferences = ( return null; } - var fullReferences = `${newReferences}`; + let fullReferences = `${newReferences}`; // If there are any non-generated definitions, add those to the output as well if ( nonGeneratedReferenceDefinitions.length > 0 && diff --git a/packages/foam-vscode/src/core/markdown-provider.ts b/packages/foam-vscode/src/core/markdown-provider.ts index 53b523cb..baabd269 100644 --- a/packages/foam-vscode/src/core/markdown-provider.ts +++ b/packages/foam-vscode/src/core/markdown-provider.ts @@ -1,11 +1,11 @@ -import { Node, Position as AstPosition } from 'unist'; +// eslint-disable-next-line import/no-extraneous-dependencies +import { Point, Node, Position as AstPosition } from 'unist'; import unified from 'unified'; import markdownParse from 'remark-parse'; import wikiLinkPlugin from 'remark-wiki-link'; import frontmatterPlugin from 'remark-frontmatter'; import { parse as parseYAML } from 'yaml'; import visit from 'unist-util-visit'; -import { Parent, Point } from 'unist'; import detectNewline from 'detect-newline'; import os from 'os'; import { @@ -128,7 +128,7 @@ export class MarkdownResourceProvider implements ResourceProvider { ) { let targetUri: URI | undefined; switch (link.type) { - case 'wikilink': + case 'wikilink': { const definitionUri = resource.definitions.find( def => def.label === link.target )?.url; @@ -150,8 +150,8 @@ export class MarkdownResourceProvider implements ResourceProvider { } } break; - - case 'link': + } + case 'link': { const [target, section] = link.target.split('#'); targetUri = workspace.find(target, resource.uri)?.uri ?? @@ -160,6 +160,7 @@ export class MarkdownResourceProvider implements ResourceProvider { targetUri = targetUri.withFragment(section); } break; + } } return targetUri; } @@ -202,7 +203,7 @@ const tagsPlugin: ParserPlugin = { if (node.type === 'text') { const tags = extractHashtags((node as any).value); tags.forEach(tag => { - let start = astPointToFoamPosition(node.position!.start); + const start = astPointToFoamPosition(node.position!.start); start.character = start.character + tag.offset; const end: Position = { line: start.line, @@ -403,7 +404,7 @@ export function createMarkdownParser( const tree = parser.parse(markdown); const eol = detectNewline(markdown) || os.EOL; - var note: Resource = { + const note: Resource = { uri: uri, type: 'note', properties: {}, @@ -480,7 +481,7 @@ function getFoamDefinitions( fileEndPoint: Position ): NoteLinkDefinition[] { let previousLine = fileEndPoint.line; - let foamDefinitions = []; + const foamDefinitions = []; // walk through each definition in reverse order // (last one first) @@ -503,7 +504,7 @@ function getFoamDefinitions( export function stringifyMarkdownLinkReferenceDefinition( definition: NoteLinkDefinition ) { - let url = + const url = definition.url.indexOf(' ') > 0 ? `<${definition.url}>` : definition.url; let text = `[${definition.label}]: ${url}`; if (definition.title) { diff --git a/packages/foam-vscode/src/core/model/graph.ts b/packages/foam-vscode/src/core/model/graph.ts index 64520882..4fca514e 100644 --- a/packages/foam-vscode/src/core/model/graph.ts +++ b/packages/foam-vscode/src/core/model/graph.ts @@ -76,9 +76,9 @@ export class FoamGraph implements IDisposable { */ public static fromWorkspace( workspace: FoamWorkspace, - keepMonitoring: boolean = false + keepMonitoring = false ): FoamGraph { - let graph = new FoamGraph(workspace); + const graph = new FoamGraph(workspace); workspace.list().forEach(resource => graph.resolveResource(resource)); if (keepMonitoring) { @@ -99,7 +99,7 @@ export class FoamGraph implements IDisposable { private updateLinksRelatedToAddedResource(resource: Resource) { // check if any existing connection can be filled by new resource - let resourcesToUpdate: URI[] = []; + const resourcesToUpdate: URI[] = []; for (const placeholderId of this.placeholders.keys()) { // quick and dirty check for affected resources if (resource.uri.path.endsWith(placeholderId + '.md')) { diff --git a/packages/foam-vscode/src/core/model/tags.ts b/packages/foam-vscode/src/core/model/tags.ts index a8902963..7197f18b 100644 --- a/packages/foam-vscode/src/core/model/tags.ts +++ b/packages/foam-vscode/src/core/model/tags.ts @@ -20,9 +20,9 @@ export class FoamTags implements IDisposable { */ public static fromWorkspace( workspace: FoamWorkspace, - keepMonitoring: boolean = false + keepMonitoring = false ): FoamTags { - let tags = new FoamTags(); + const tags = new FoamTags(); workspace .list() diff --git a/packages/foam-vscode/src/core/model/uri.ts b/packages/foam-vscode/src/core/model/uri.ts index 9d0389a7..0026083c 100644 --- a/packages/foam-vscode/src/core/model/uri.ts +++ b/packages/foam-vscode/src/core/model/uri.ts @@ -58,7 +58,7 @@ export class URI { } static file(value: string): URI { - let [path, authority] = pathUtils.fromFsPath(value); + const [path, authority] = pathUtils.fromFsPath(value); return new URI({ scheme: 'file', authority, path }); } @@ -187,6 +187,7 @@ function encode(uri: URI, skipEncoding: boolean): string { : encodeURIComponentMinimal; let res = ''; + // eslint-disable-next-line prefer-const let { scheme, authority, path, query, fragment } = uri; if (scheme) { res += scheme; diff --git a/packages/foam-vscode/src/core/model/workspace.ts b/packages/foam-vscode/src/core/model/workspace.ts index 18659c81..b408a487 100644 --- a/packages/foam-vscode/src/core/model/workspace.ts +++ b/packages/foam-vscode/src/core/model/workspace.ts @@ -61,9 +61,10 @@ export class FoamWorkspace implements IDisposable { } public listByIdentifier(identifier: string): Resource[] { - let needle = normalize('/' + identifier); - let mdNeedle = getExtension(needle) !== '.md' ? needle + '.md' : undefined; - let resources = []; + const needle = normalize('/' + identifier); + const mdNeedle = + getExtension(needle) !== '.md' ? needle + '.md' : undefined; + const resources = []; for (const key of this.resources.keys()) { if ((mdNeedle && key.endsWith(mdNeedle)) || key.endsWith(needle)) { resources.push(this.resources.get(normalize(key))); @@ -104,7 +105,7 @@ export class FoamWorkspace implements IDisposable { return this.resources.get(normalize((reference as URI).path)) ?? null; } let resource: Resource | null = null; - let [path, fragment] = (reference as string).split('#'); + const [path, fragment] = (reference as string).split('#'); if (FoamWorkspace.isIdentifier(path)) { resource = this.listByIdentifier(path)[0]; } else { diff --git a/packages/foam-vscode/src/core/services/datastore.ts b/packages/foam-vscode/src/core/services/datastore.ts index 90ec22d6..8d9c7260 100644 --- a/packages/foam-vscode/src/core/services/datastore.ts +++ b/packages/foam-vscode/src/core/services/datastore.ts @@ -2,11 +2,12 @@ import micromatch from 'micromatch'; import fs from 'fs'; import { URI } from '../model/uri'; import { Logger } from '../utils/log'; -import glob from 'glob'; +import { glob } from 'glob'; import { promisify } from 'util'; import { isWindows } from '../common/platform'; const findAllFiles = promisify(glob); + export interface IMatcher { /** * Filters the given list of URIs, keepin only the ones that diff --git a/packages/foam-vscode/src/core/utils/core.ts b/packages/foam-vscode/src/core/utils/core.ts index 6e408041..71c02bac 100644 --- a/packages/foam-vscode/src/core/utils/core.ts +++ b/packages/foam-vscode/src/core/utils/core.ts @@ -1,19 +1,19 @@ import crypto from 'crypto'; export function isNotNull(value: T | null): value is T { - return value != null; // eslint-disable-line + return value != null; } export function isSome( value: T | null | undefined | void ): value is NonNullable { - return value != null; // eslint-disable-line + return value != null; } export function isNone( value: T | null | undefined | void ): value is null | undefined | void { - return value == null; // eslint-disable-line + return value == null; } export function isNumeric(value: string): boolean { diff --git a/packages/foam-vscode/src/core/utils/log.ts b/packages/foam-vscode/src/core/utils/log.ts index 62627051..c08927e2 100644 --- a/packages/foam-vscode/src/core/utils/log.ts +++ b/packages/foam-vscode/src/core/utils/log.ts @@ -58,7 +58,9 @@ export class ConsoleLogger extends BaseLogger { } export class NoOpLogger extends BaseLogger { - log(_l: LogLevel, _m?: string, ..._p: any[]): void {} + log(_l: LogLevel, _m?: string, ..._p: any[]): void { + // do nothing + } } export class Logger { diff --git a/packages/foam-vscode/src/dated-notes.ts b/packages/foam-vscode/src/dated-notes.ts index ce893e2f..4d996e84 100644 --- a/packages/foam-vscode/src/dated-notes.ts +++ b/packages/foam-vscode/src/dated-notes.ts @@ -114,7 +114,7 @@ export async function createDailyNoteIfNotExists( configuration.get('openDailyNote.titleFormat') ?? configuration.get('openDailyNote.filenameFormat'); - const templateFallbackText: string = `--- + const templateFallbackText = `--- foam_template: name: New Daily Note description: Foam's default daily note template diff --git a/packages/foam-vscode/src/features/backlinks.ts b/packages/foam-vscode/src/features/backlinks.ts index 4ebb91e2..d400282b 100644 --- a/packages/foam-vscode/src/features/backlinks.ts +++ b/packages/foam-vscode/src/features/backlinks.ts @@ -72,7 +72,7 @@ export class BacklinksTreeDataProvider ).split('\n'); if (link.range.start.line < lines.length) { const line = lines[link.range.start.line]; - let start = Math.max(0, link.range.start.character - 15); + const start = Math.max(0, link.range.start.character - 15); const ellipsis = start === 0 ? '' : '...'; item.label = `${link.range.start.line}: ${ellipsis}${line.substr( diff --git a/packages/foam-vscode/src/features/create-from-template.spec.ts b/packages/foam-vscode/src/features/create-from-template.spec.ts index 4cb94bd7..09e83261 100644 --- a/packages/foam-vscode/src/features/create-from-template.spec.ts +++ b/packages/foam-vscode/src/features/create-from-template.spec.ts @@ -1,7 +1,6 @@ -import { Uri } from 'vscode'; +import { Uri, commands, window, workspace } from 'vscode'; import { URI } from '../core/model/uri'; import { toVsCodeUri } from '../utils/vsc-utils'; -import { commands, window, workspace } from 'vscode'; import { createFile } from '../test/test-utils-vscode'; import * as editor from '../services/editor'; diff --git a/packages/foam-vscode/src/features/dataviz.ts b/packages/foam-vscode/src/features/dataviz.ts index f237c85a..ee486736 100644 --- a/packages/foam-vscode/src/features/dataviz.ts +++ b/packages/foam-vscode/src/features/dataviz.ts @@ -131,7 +131,7 @@ async function createGraphPanel(foam: Foam, context: vscode.ExtensionContext) { panel.webview.onDidReceiveMessage( async message => { switch (message.type) { - case 'webviewDidLoad': + case 'webviewDidLoad': { const styles = getGraphStyle(); panel.webview.postMessage({ type: 'didUpdateStyle', @@ -139,8 +139,8 @@ async function createGraphPanel(foam: Foam, context: vscode.ExtensionContext) { }); updateGraph(panel, foam); break; - - case 'webviewDidSelectNode': + } + case 'webviewDidSelectNode': { const noteUri = vscode.Uri.parse(message.payload); const selectedNote = foam.workspace.get(fromVsCodeUri(noteUri)); @@ -151,10 +151,11 @@ async function createGraphPanel(foam: Foam, context: vscode.ExtensionContext) { vscode.window.showTextDocument(doc, vscode.ViewColumn.One); } break; - - case 'error': + } + case 'error': { Logger.error('An error occurred in the graph view', message.payload); break; + } } }, undefined, diff --git a/packages/foam-vscode/src/features/document-decorator.ts b/packages/foam-vscode/src/features/document-decorator.ts index 3efe5fe3..2d506c10 100644 --- a/packages/foam-vscode/src/features/document-decorator.ts +++ b/packages/foam-vscode/src/features/document-decorator.ts @@ -36,7 +36,7 @@ const updateDecorations = ( fromVsCodeUri(editor.document.uri), editor.document.getText() ); - let placeholderRanges = []; + const placeholderRanges = []; note.links.forEach(link => { const linkUri = workspace.resolveLink(note, link); if (linkUri.isPlaceholder()) { diff --git a/packages/foam-vscode/src/features/janitor.ts b/packages/foam-vscode/src/features/janitor.ts index 75a5b800..2c512f37 100644 --- a/packages/foam-vscode/src/features/janitor.ts +++ b/packages/foam-vscode/src/features/janitor.ts @@ -97,12 +97,12 @@ async function runJanitor(foam: Foam) { // Apply Text Edits to Non Dirty Notes using fs module just like CLI const fileWritePromises = nonDirtyNotes.map(note => { - let heading = generateHeading(note); + const heading = generateHeading(note); if (heading) { updatedHeadingCount += 1; } - let definitions = + const definitions = wikilinkSetting === LinkReferenceDefinitionsSetting.off ? null : generateLinkReferences( @@ -140,7 +140,7 @@ async function runJanitor(foam: Foam) { // Get edits const heading = generateHeading(note); - let definitions = + const definitions = wikilinkSetting === LinkReferenceDefinitionsSetting.off ? null : generateLinkReferences( diff --git a/packages/foam-vscode/src/features/link-completion.ts b/packages/foam-vscode/src/features/link-completion.ts index 88ad22fb..946ed36a 100644 --- a/packages/foam-vscode/src/features/link-completion.ts +++ b/packages/foam-vscode/src/features/link-completion.ts @@ -45,7 +45,6 @@ export class SectionCompletionProvider // Requires autocomplete only if cursorPrefix matches `[[` that NOT ended by `]]`. // See https://github.com/foambubble/foam/pull/596#issuecomment-825748205 for details. - // eslint-disable-next-line no-useless-escape const match = cursorPrefix.match(SECTION_REGEX); if (!match) { @@ -104,7 +103,6 @@ export class CompletionProvider // Requires autocomplete only if cursorPrefix matches `[[` that NOT ended by `]]`. // See https://github.com/foambubble/foam/pull/596#issuecomment-825748205 for details. - // eslint-disable-next-line no-useless-escape const requiresAutocomplete = cursorPrefix.match(WIKILINK_REGEX); if (!requiresAutocomplete || cursorPrefix.indexOf('#') >= 0) { diff --git a/packages/foam-vscode/src/features/navigation-provider.spec.ts b/packages/foam-vscode/src/features/navigation-provider.spec.ts index deaccec0..b43ef951 100644 --- a/packages/foam-vscode/src/features/navigation-provider.spec.ts +++ b/packages/foam-vscode/src/features/navigation-provider.spec.ts @@ -232,6 +232,6 @@ describe('Document navigation', () => { range: new vscode.Range(0, 23, 0, 23 + 9), }); }); - it('should provide references for placeholders', async () => {}); + // it('should provide references for placeholders', async () => {}); }); }); diff --git a/packages/foam-vscode/src/features/tags-tree-view.spec.ts b/packages/foam-vscode/src/features/tags-tree-view.spec.ts index fa2d334c..b4a9edfc 100644 --- a/packages/foam-vscode/src/features/tags-tree-view.spec.ts +++ b/packages/foam-vscode/src/features/tags-tree-view.spec.ts @@ -62,6 +62,7 @@ describe('Tags tree panel', () => { childTreeItems.forEach(child => { if (child instanceof TagItem) { + // eslint-disable-next-line jest/no-conditional-expect expect(child.title).toEqual('child'); } }); @@ -94,7 +95,9 @@ describe('Tags tree panel', () => { childTreeItems.forEach(child => { if (child instanceof TagItem) { + // eslint-disable-next-line jest/no-conditional-expect expect(['child', 'subchild']).toContain(child.title); + // eslint-disable-next-line jest/no-conditional-expect expect(child.title).not.toEqual('parent'); } }); diff --git a/packages/foam-vscode/src/features/utility-commands.ts b/packages/foam-vscode/src/features/utility-commands.ts index 5dd49fe6..a0d21a0a 100644 --- a/packages/foam-vscode/src/features/utility-commands.ts +++ b/packages/foam-vscode/src/features/utility-commands.ts @@ -24,7 +24,7 @@ const feature: FoamFeature = { async (params: { uri: URI }) => { const uri = new URI(params.uri); switch (uri.scheme) { - case 'file': + case 'file': { let selection = new vscode.Range(1, 0, 1, 0); if (uri.fragment) { const foam = await foamPromise; @@ -41,8 +41,8 @@ const feature: FoamFeature = { return vscode.commands.executeCommand('vscode.open', targetUri, { selection: selection, }); - - case 'placeholder': + } + case 'placeholder': { const basedir = vscode.workspace.workspaceFolders.length > 0 ? vscode.workspace.workspaceFolders[0].uri @@ -58,6 +58,7 @@ const feature: FoamFeature = { .changeExtension('', '.md'); await NoteFactory.createForPlaceholderWikilink(title, target); return; + } } } ) diff --git a/packages/foam-vscode/src/features/wikilink-reference-generation.ts b/packages/foam-vscode/src/features/wikilink-reference-generation.ts index 7ce469ca..6c19fed1 100644 --- a/packages/foam-vscode/src/features/wikilink-reference-generation.ts +++ b/packages/foam-vscode/src/features/wikilink-reference-generation.ts @@ -61,7 +61,7 @@ const feature: FoamFeature = { // when a file is created as a result of peekDefinition // action on a wikilink, add definition update references foam.workspace.onDidAdd(_ => { - let editor = window.activeTextEditor; + const editor = window.activeTextEditor; if (!editor || !isMdEditor(editor)) { return; } @@ -79,13 +79,13 @@ function updateDocumentInNoteGraph(foam: Foam, document: TextDocument) { } async function createReferenceList(foam: FoamWorkspace) { - let editor = window.activeTextEditor; + const editor = window.activeTextEditor; if (!editor || !isMdEditor(editor)) { return; } - let refs = await generateReferenceList(foam, editor.document); + const refs = await generateReferenceList(foam, editor.document); if (refs && refs.length) { await editor.edit(function(editBuilder) { if (editor) { @@ -213,7 +213,7 @@ class WikilinkReferenceCodeLensProvider implements CodeLensProvider { ): CodeLens[] | Thenable { loadDocConfig(); - let range = detectReferenceListRange(document); + const range = detectReferenceListRange(document); if (!range) { return []; } @@ -222,7 +222,7 @@ class WikilinkReferenceCodeLensProvider implements CodeLensProvider { const oldRefs = getText(range).replace(/\r?\n|\r/g, docConfig.eol); const newRefs = refs.join(docConfig.eol); - let status = oldRefs === newRefs ? 'up to date' : 'out of date'; + const status = oldRefs === newRefs ? 'up to date' : 'out of date'; return [ new CodeLens(range, { diff --git a/packages/foam-vscode/src/services/templates.ts b/packages/foam-vscode/src/services/templates.ts index 2411d811..c416dfa7 100644 --- a/packages/foam-vscode/src/services/templates.ts +++ b/packages/foam-vscode/src/services/templates.ts @@ -82,7 +82,7 @@ export const NoteFactory = { templateUri: URI, resolver: Resolver, filepathFallbackURI?: URI, - templateFallbackText: string = '' + templateFallbackText = '' ): Promise => { const templateText = existsSync(templateUri.toFsPath()) ? await workspace.fs diff --git a/packages/foam-vscode/src/services/variable-resolver.ts b/packages/foam-vscode/src/services/variable-resolver.ts index eb62c080..4848b8b1 100644 --- a/packages/foam-vscode/src/services/variable-resolver.ts +++ b/packages/foam-vscode/src/services/variable-resolver.ts @@ -43,7 +43,7 @@ export function substituteVariables( export function findFoamVariables(templateText: string): string[] { const regex = /\$(FOAM_[_a-zA-Z0-9]*)|\${(FOAM_[[_a-zA-Z0-9]*)}/g; - var matches = []; + let matches = []; const output: string[] = []; while ((matches = regex.exec(templateText))) { output.push(matches[1] || matches[2]); diff --git a/packages/foam-vscode/src/test/suite-unit.ts b/packages/foam-vscode/src/test/suite-unit.ts index bac75da8..d5186186 100644 --- a/packages/foam-vscode/src/test/suite-unit.ts +++ b/packages/foam-vscode/src/test/suite-unit.ts @@ -15,12 +15,14 @@ process.env.FORCE_COLOR = '1'; process.env.NODE_ENV = 'test'; -import path from 'path'; +// eslint-disable-next-line import/no-extraneous-dependencies import { runCLI } from '@jest/core'; +import path from 'path'; const rootDir = path.join(__dirname, '..', '..'); export function runUnit(): Promise { + // eslint-disable-next-line no-async-promise-executor return new Promise(async (resolve, reject) => { try { const { results } = await runCLI( diff --git a/packages/foam-vscode/src/test/suite.ts b/packages/foam-vscode/src/test/suite.ts index f1cf8137..ba491192 100644 --- a/packages/foam-vscode/src/test/suite.ts +++ b/packages/foam-vscode/src/test/suite.ts @@ -15,9 +15,10 @@ process.env.FORCE_COLOR = '1'; process.env.NODE_ENV = 'test'; -import path from 'path'; +// eslint-disable-next-line import/no-extraneous-dependencies import { runCLI } from '@jest/core'; import { cleanWorkspace } from './test-utils-vscode'; +import path from 'path'; const rootDir = path.join(__dirname, '../..'); @@ -38,6 +39,7 @@ export function run(): Promise { // throw err; // }); + // eslint-disable-next-line no-async-promise-executor return new Promise(async (resolve, reject) => { await cleanWorkspace(); try { diff --git a/packages/foam-vscode/src/test/test-utils-vscode.ts b/packages/foam-vscode/src/test/test-utils-vscode.ts index 50976619..c9d0f1e7 100644 --- a/packages/foam-vscode/src/test/test-utils-vscode.ts +++ b/packages/foam-vscode/src/test/test-utils-vscode.ts @@ -65,7 +65,7 @@ export const createFile = async (content: string, filepath: string[] = []) => { }; export const createNote = (r: Resource) => { - let content = `# ${r.title} + const content = `# ${r.title} some content and ${r.links .map(l => diff --git a/packages/foam-vscode/src/utils.ts b/packages/foam-vscode/src/utils.ts index 229111f1..cfb31eaf 100644 --- a/packages/foam-vscode/src/utils.ts +++ b/packages/foam-vscode/src/utils.ts @@ -26,7 +26,7 @@ export const mdDocSelector = [ export function loadDocConfig() { // Load workspace config - let activeEditor = window.activeTextEditor; + const activeEditor = window.activeTextEditor; if (!activeEditor) { Logger.debug('Failed to load config, no active editor'); return; @@ -34,8 +34,8 @@ export function loadDocConfig() { docConfig.eol = activeEditor.document.eol === EndOfLine.CRLF ? '\r\n' : '\n'; - let tabSize = Number(activeEditor.options.tabSize); - let insertSpaces = activeEditor.options.insertSpaces; + const tabSize = Number(activeEditor.options.tabSize); + const insertSpaces = activeEditor.options.insertSpaces; if (insertSpaces) { docConfig.tab = ' '.repeat(tabSize); } else { @@ -133,7 +133,7 @@ export function isSome( value: T | null | undefined | void ): value is NonNullable { // - return value != null; // eslint-disable-line + return value != null; } /** @@ -144,7 +144,7 @@ export function isSome( export function isNone( value: T | null | undefined | void ): value is null | undefined | void { - return value == null; // eslint-disable-line + return value == null; } export async function focusNote( diff --git a/yarn.lock b/yarn.lock index ecf4bcba..d696b874 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14,7 +14,7 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.13.11.tgz#9c8fe523c206979c9a81b1e12fe50c1254f1aa35" integrity sha512-BwKEkO+2a67DcFeS3RLl0Z3Gs2OvdXewuWjc1Hfokhb5eQWP9YRYH1/+VrVZvql2CfjOiNGqSAFOYt4lsqTHzg== -"@babel/core@^7.1.0", "@babel/core@^7.11.0", "@babel/core@^7.4.4", "@babel/core@^7.7.5": +"@babel/core@^7.1.0", "@babel/core@^7.4.4", "@babel/core@^7.7.5": version "7.13.10" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.13.10.tgz#07de050bbd8193fcd8a3c27918c0890613a94559" integrity sha512-bfIYcT0BdKeAZrovpMqX2Mx5NrgAckGbwT982AkdS5GNfn3KMGiprlBAtmBcFZRUmpaufS6WZFP8trvx8ptFDw== @@ -465,13 +465,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.12.13" -"@babel/plugin-syntax-typescript@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.12.13.tgz#9dff111ca64154cef0f4dc52cf843d9f12ce4474" - integrity sha512-cHP3u1JiUiG2LFDKbXnwVad81GvfyIOmCD6HIEId6ojrY0Drfy2q1jw7BwN7dE84+kTnBjLkXoL3IEy/3JPu2w== - dependencies: - "@babel/helper-plugin-utils" "^7.12.13" - "@babel/plugin-transform-arrow-functions@^7.13.0": version "7.13.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.13.0.tgz#10a59bebad52d637a027afa692e8d5ceff5e3dae" @@ -669,7 +662,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.12.13" -"@babel/plugin-transform-runtime@^7.10.4", "@babel/plugin-transform-runtime@^7.6.0": +"@babel/plugin-transform-runtime@^7.6.0": version "7.13.10" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.13.10.tgz#a1e40d22e2bf570c591c9c7e5ab42d6bf1e419e1" integrity sha512-Y5k8ipgfvz5d/76tx7JYbKQTcgFSU6VgJ3kKQv4zGTKr+a9T/KBvfRvGtSFgKDQGt/DBykQixV0vNWKIdzWErA== @@ -717,15 +710,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.12.13" -"@babel/plugin-transform-typescript@^7.13.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.13.0.tgz#4a498e1f3600342d2a9e61f60131018f55774853" - integrity sha512-elQEwluzaU8R8dbVuW2Q2Y8Nznf7hnjM7+DSCd14Lo5fF63C9qNLbwZYbmZrtV9/ySpSUpkRpQXvJb6xyu4hCQ== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.13.0" - "@babel/helper-plugin-utils" "^7.13.0" - "@babel/plugin-syntax-typescript" "^7.12.13" - "@babel/plugin-transform-unicode-escapes@^7.12.13": version "7.12.13" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.12.13.tgz#840ced3b816d3b5127dd1d12dcedc5dead1a5e74" @@ -749,7 +733,7 @@ core-js "^2.6.5" regenerator-runtime "^0.13.4" -"@babel/preset-env@^7.11.0", "@babel/preset-env@^7.4.4": +"@babel/preset-env@^7.4.4": version "7.13.10" resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.13.10.tgz#b5cde31d5fe77ab2a6ab3d453b59041a1b3a5252" integrity sha512-nOsTScuoRghRtUsRr/c69d042ysfPHcu+KOB4A9aAO9eJYqrkat+LF8G1yp1HD18QiwixT2CisZTr/0b3YZPXQ== @@ -834,15 +818,6 @@ "@babel/types" "^7.4.4" esutils "^2.0.2" -"@babel/preset-typescript@^7.10.4": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.13.0.tgz#ab107e5f050609d806fbb039bec553b33462c60a" - integrity sha512-LXJwxrHy0N3f6gIJlYbLta1D9BDtHpQeqwzM0LIfjDlr6UE/D5Mc7W4iDiQzaE+ks0sTjT26ArcHWnJVt0QiHw== - dependencies: - "@babel/helper-plugin-utils" "^7.13.0" - "@babel/helper-validator-option" "^7.12.17" - "@babel/plugin-transform-typescript" "^7.13.0" - "@babel/runtime-corejs3@^7.10.2": version "7.13.10" resolved "https://registry.yarnpkg.com/@babel/runtime-corejs3/-/runtime-corejs3-7.13.10.tgz#14c3f4c85de22ba88e8e86685d13e8861a82fe86" @@ -2006,11 +1981,32 @@ call-me-maybe "^1.0.1" glob-to-regexp "^0.3.0" +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + "@nodelib/fs.stat@^1.1.2": version "1.1.3" resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz#2b5a3ab3f918cca48a8c754c08168e3f03eba61b" integrity sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw== +"@nodelib/fs.walk@^1.2.3": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + "@octokit/auth-token@^2.4.0": version "2.4.5" resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.4.5.tgz#568ccfb8cb46f36441fac094ce34f7a875b197f3" @@ -2309,6 +2305,11 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.7.tgz#98a993516c859eb0d5c4c8f098317a9ea68db9ad" integrity sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA== +"@types/json-schema@^7.0.9": + version "7.0.9" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d" + integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ== + "@types/json5@^0.0.29": version "0.0.29" resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" @@ -2456,6 +2457,18 @@ eslint-scope "^5.0.0" eslint-utils "^2.0.0" +"@typescript-eslint/experimental-utils@^5.0.0": + version "5.8.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-5.8.0.tgz#0916ffe98d34b3c95e3652efa0cace61a7b25728" + integrity sha512-KN5FvNH71bhZ8fKtL+lhW7bjm7cxs1nt+hrDZWIqb6ViCffQcWyLunGrgvISgkRojIDcXIsH+xlFfI4RCDA0xA== + dependencies: + "@types/json-schema" "^7.0.9" + "@typescript-eslint/scope-manager" "5.8.0" + "@typescript-eslint/types" "5.8.0" + "@typescript-eslint/typescript-estree" "5.8.0" + eslint-scope "^5.1.1" + eslint-utils "^3.0.0" + "@typescript-eslint/parser@^2.12.0", "@typescript-eslint/parser@^2.30.0": version "2.34.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.34.0.tgz#50252630ca319685420e9a39ca05fe185a256bc8" @@ -2466,6 +2479,19 @@ "@typescript-eslint/typescript-estree" "2.34.0" eslint-visitor-keys "^1.1.0" +"@typescript-eslint/scope-manager@5.8.0": + version "5.8.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.8.0.tgz#2371095b4fa4c7be6a80b380f4e1b49c715e16f4" + integrity sha512-x82CYJsLOjPCDuFFEbS6e7K1QEWj7u5Wk1alw8A+gnJiYwNnDJk0ib6PCegbaPMjrfBvFKa7SxE3EOnnIQz2Gg== + dependencies: + "@typescript-eslint/types" "5.8.0" + "@typescript-eslint/visitor-keys" "5.8.0" + +"@typescript-eslint/types@5.8.0": + version "5.8.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.8.0.tgz#e7fa74ec35d9dbe3560d039d3d8734986c3971e0" + integrity sha512-LdCYOqeqZWqCMOmwFnum6YfW9F3nKuxJiR84CdIRN5nfHJ7gyvGpXWqL/AaW0k3Po0+wm93ARAsOdzlZDPCcXg== + "@typescript-eslint/typescript-estree@2.34.0": version "2.34.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.34.0.tgz#14aeb6353b39ef0732cc7f1b8285294937cf37d5" @@ -2479,6 +2505,27 @@ semver "^7.3.2" tsutils "^3.17.1" +"@typescript-eslint/typescript-estree@5.8.0": + version "5.8.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.8.0.tgz#900469ba9d5a37f4482b014ecce4a5dbb86cb4dd" + integrity sha512-srfeZ3URdEcUsSLbkOFqS7WoxOqn8JNil2NSLO9O+I2/Uyc85+UlfpEvQHIpj5dVts7KKOZnftoJD/Fdv0L7nQ== + dependencies: + "@typescript-eslint/types" "5.8.0" + "@typescript-eslint/visitor-keys" "5.8.0" + debug "^4.3.2" + globby "^11.0.4" + is-glob "^4.0.3" + semver "^7.3.5" + tsutils "^3.21.0" + +"@typescript-eslint/visitor-keys@5.8.0": + version "5.8.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.8.0.tgz#22d4ed96fe2451135299239feedb9fe1dcec780c" + integrity sha512-+HDIGOEMnqbxdAHegxvnOqESUH6RWFRR2b8qxP1W9CZnnYh4Usz6MBL+2KMAgPk/P0o9c1HqnYtwzVH6GTIqug== + dependencies: + "@typescript-eslint/types" "5.8.0" + eslint-visitor-keys "^3.0.0" + "@zkochan/cmd-shim@^3.1.0": version "3.1.0" resolved "https://registry.yarnpkg.com/@zkochan/cmd-shim/-/cmd-shim-3.1.0.tgz#2ab8ed81f5bb5452a85f25758eb9b8681982fd2e" @@ -2790,6 +2837,11 @@ array-union@^1.0.2: dependencies: array-uniq "^1.0.1" +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + array-uniq@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" @@ -4049,6 +4101,13 @@ debug@^3.1.0, debug@^3.2.7: dependencies: ms "^2.1.1" +debug@^4.3.1, debug@^4.3.2: + version "4.3.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" + integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== + dependencies: + ms "2.1.2" + debuglog@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492" @@ -4188,6 +4247,13 @@ dir-glob@^2.2.2: dependencies: path-type "^3.0.0" +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + doctrine@1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" @@ -4479,6 +4545,17 @@ eslint-import-resolver-node@^0.3.6: debug "^3.2.7" resolve "^1.20.0" +eslint-import-resolver-typescript@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-2.5.0.tgz#07661966b272d14ba97f597b51e1a588f9722f0a" + integrity sha512-qZ6e5CFr+I7K4VVhQu3M/9xGv9/YmwsEXrsm3nimw8vWaVHRDrQRp26BgCypTxBp3vUp4o5aVEJRiy0F2DFddQ== + dependencies: + debug "^4.3.1" + glob "^7.1.7" + is-glob "^4.0.1" + resolve "^1.20.0" + tsconfig-paths "^3.9.0" + eslint-module-utils@^2.6.0: version "2.6.0" resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz#579ebd094f56af7797d19c9866c9c9486629bfa6" @@ -4542,6 +4619,13 @@ eslint-plugin-import@^2.24.2: resolve "^1.20.0" tsconfig-paths "^3.11.0" +eslint-plugin-jest@^25.3.0: + version "25.3.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-25.3.0.tgz#6c04bbf13624a75684a05391a825b58e2e291950" + integrity sha512-79WQtuBsTN1S8Y9+7euBYwxIOia/k7ykkl9OCBHL3xuww5ecursHy/D8GCIlvzHVWv85gOkS5Kv6Sh7RxOgK1Q== + dependencies: + "@typescript-eslint/experimental-utils" "^5.0.0" + eslint-plugin-jsx-a11y@^6.2.3: version "6.4.1" resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.4.1.tgz#a2d84caa49756942f42f1ffab9002436391718fd" @@ -4588,7 +4672,7 @@ eslint-plugin-react@^7.14.3: resolve "^1.18.1" string.prototype.matchall "^4.0.2" -eslint-scope@^5.0.0: +eslint-scope@^5.0.0, eslint-scope@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== @@ -4610,11 +4694,28 @@ eslint-utils@^2.0.0: dependencies: eslint-visitor-keys "^1.1.0" +eslint-utils@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" + integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== + dependencies: + eslint-visitor-keys "^2.0.0" + eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== +eslint-visitor-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" + integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== + +eslint-visitor-keys@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz#eee4acea891814cda67a7d8812d9647dd0179af2" + integrity sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA== + eslint@^6.1.0, eslint@^6.8.0: version "6.8.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.8.0.tgz#62262d6729739f9275723824302fb227c8c93ffb" @@ -4887,6 +4988,17 @@ fast-glob@^2.2.6: merge2 "^1.2.3" micromatch "^3.1.10" +fast-glob@^3.1.1: + version "3.2.7" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.7.tgz#fd6cb7a2d7e9aa7a7846111e85a196d6b2f766a1" + integrity sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" @@ -4897,6 +5009,13 @@ fast-levenshtein@~2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= +fastq@^1.6.0: + version "1.13.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" + integrity sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw== + dependencies: + reusify "^1.0.4" + fault@^1.0.1: version "1.0.4" resolved "https://registry.yarnpkg.com/fault/-/fault-1.0.4.tgz#eafcfc0a6d214fc94601e170df29954a4f842f13" @@ -5310,7 +5429,7 @@ glob-parent@^3.1.0: is-glob "^3.1.0" path-dirname "^1.0.0" -glob-parent@^5.0.0: +glob-parent@^5.0.0, glob-parent@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== @@ -5334,6 +5453,18 @@ glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.1.7: + version "7.2.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" + integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + globals@^11.1.0: version "11.12.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" @@ -5356,6 +5487,18 @@ globalyzer@0.1.0: resolved "https://registry.yarnpkg.com/globalyzer/-/globalyzer-0.1.0.tgz#cb76da79555669a1519d5a8edf093afaa0bf1465" integrity sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q== +globby@^11.0.4: + version "11.0.4" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.4.tgz#2cbaff77c2f2a62e71e9b2813a67b97a3a3001a5" + integrity sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.1.1" + ignore "^5.1.4" + merge2 "^1.3.0" + slash "^3.0.0" + globby@^9.2.0: version "9.2.0" resolved "https://registry.yarnpkg.com/globby/-/globby-9.2.0.tgz#fd029a706c703d29bdd170f4b6db3a3f7a7cb63d" @@ -5644,6 +5787,11 @@ ignore@^4.0.3, ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== +ignore@^5.1.4: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" + integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== + import-fresh@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" @@ -5994,6 +6142,13 @@ is-glob@^4.0.0, is-glob@^4.0.1: dependencies: is-extglob "^2.1.1" +is-glob@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + is-hexadecimal@^1.0.0: version "1.0.4" resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz#cc35c97588da4bd49a8eedd6bc4082d44dcb23a7" @@ -7695,7 +7850,7 @@ merge-stream@^2.0.0: resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== -merge2@^1.2.3: +merge2@^1.2.3, merge2@^1.3.0: version "1.4.1" resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== @@ -7727,6 +7882,14 @@ micromatch@^4.0.2: braces "^3.0.1" picomatch "^2.0.5" +micromatch@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9" + integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg== + dependencies: + braces "^3.0.1" + picomatch "^2.2.3" + mime-db@1.46.0: version "1.46.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.46.0.tgz#6267748a7f799594de3cbc8cde91def349661cee" @@ -8643,6 +8806,11 @@ picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.2: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== +picomatch@^2.2.3: + version "2.3.0" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" + integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw== + pify@^2.0.0, pify@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" @@ -8913,6 +9081,11 @@ query-string@^6.13.8: split-on-first "^1.0.0" strict-uri-encode "^2.0.0" +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + quick-lru@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8" @@ -9401,6 +9574,11 @@ retry@^0.10.0: resolved "https://registry.yarnpkg.com/retry/-/retry-0.10.1.tgz#e76388d217992c252750241d3d3956fed98d8ff4" integrity sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q= +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + rimraf@2, rimraf@^2.5.4, rimraf@^2.6.2, rimraf@^2.6.3: version "2.7.1" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" @@ -9486,6 +9664,13 @@ run-async@^2.2.0, run-async@^2.4.0: resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + run-queue@^1.0.0, run-queue@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47" @@ -9596,6 +9781,13 @@ semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== +semver@^7.3.5: + version "7.3.5" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" + integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== + dependencies: + lru-cache "^6.0.0" + serialize-javascript@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-4.0.0.tgz#b525e1238489a5ecfc42afacc3fe99e666f4b1aa" @@ -10595,7 +10787,7 @@ tslib@^2.0.0, tslib@^2.0.3: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a" integrity sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A== -tsutils@^3.17.1: +tsutils@^3.17.1, tsutils@^3.21.0: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==