Ver código fonte

Removes eslint ignores

main
Eric Amodio 3 anos atrás
pai
commit
8322b5a968
11 arquivos alterados com 13 adições e 30 exclusões
  1. +1
    -2
      src/git/models/commit.ts
  2. +1
    -2
      src/quickpicks/commitQuickPickItems.ts
  3. +2
    -5
      src/system/string.ts
  4. +1
    -5
      src/views/nodes/commitFileNode.ts
  5. +1
    -2
      src/views/nodes/mergeConflictFileNode.ts
  6. +1
    -2
      src/views/nodes/rebaseStatusNode.ts
  7. +1
    -2
      src/views/nodes/resultsFileNode.ts
  8. +1
    -2
      src/views/nodes/stashNode.ts
  9. +2
    -4
      src/views/nodes/statusFileNode.ts
  10. +1
    -2
      src/webviews/apps/rebase/rebase.ts
  11. +1
    -2
      src/webviews/rebaseEditor.ts

+ 1
- 2
src/git/models/commit.ts Ver arquivo

@ -235,8 +235,7 @@ export abstract class GitCommit implements GitRevisionReference {
@memoize()
getShortMessage() {
// eslint-disable-next-line no-template-curly-in-string
return CommitFormatter.fromTemplate('${message}', this, { messageTruncateAtNewLine: true });
return CommitFormatter.fromTemplate(`\${message}`, this, { messageTruncateAtNewLine: true });
}
@memoize()

+ 1
- 2
src/quickpicks/commitQuickPickItems.ts Ver arquivo

@ -14,8 +14,7 @@ export class CommitFilesQuickPickItem extends CommandQuickPickItem {
super(
{
label: commit.getShortMessage(),
// eslint-disable-next-line no-template-curly-in-string
description: CommitFormatter.fromTemplate('${author}, ${ago} $(git-commit) ${id}', commit),
description: CommitFormatter.fromTemplate(`\${author}, \${ago} $(git-commit) \${id}`, commit),
detail: `$(files) ${commit.getFormattedDiffStatus({
expand: true,
separator: ', ',

+ 2
- 5
src/system/string.ts Ver arquivo

@ -209,8 +209,7 @@ export function getTokensFromTemplate(template: string) {
return tokens;
}
// eslint-disable-next-line no-template-curly-in-string
const tokenSanitizeReplacement = "$${$1=this.$1,($1 == null ? '' : $1)}";
const tokenSanitizeReplacement = `$\${$1=this.$1,($1 == null ? '' : $1)}`;
const interpolationMap = new Map<string, Function>();
export function interpolate(template: string, context: object | undefined): string {
@ -232,9 +231,7 @@ const AsyncFunction = Object.getPrototypeOf(async function () {
/* noop */
}).constructor;
const tokenSanitizeReplacementAsync =
// eslint-disable-next-line no-template-curly-in-string
"$${$1=this.$1,($1 == null ? '' : typeof $1.then === 'function' ? (($1 = await $1),$1 == null ? '' : $1) : $1)}";
const tokenSanitizeReplacementAsync = `$\${$1=this.$1,($1 == null ? '' : typeof $1.then === 'function' ? (($1 = await $1),$1 == null ? '' : $1) : $1)}`;
const interpolationAsyncMap = new Map<string, typeof AsyncFunction>();

+ 1
- 5
src/views/nodes/commitFileNode.ts Ver arquivo

@ -125,11 +125,7 @@ export class CommitFileNode
}
private get tooltip() {
return StatusFileFormatter.fromTemplate(
// eslint-disable-next-line no-template-curly-in-string
'${file}\n${directory}/\n\n${status}${ (originalPath)}',
this.file,
);
return StatusFileFormatter.fromTemplate(`\${file}\n\${directory}/\n\n\${status}\${ (originalPath)}`, this.file);
}
override getCommand(): Command | undefined {

+ 1
- 2
src/views/nodes/mergeConflictFileNode.ts Ver arquivo

@ -48,8 +48,7 @@ export class MergeConflictFileNode extends ViewNode implements
item.description = this.description;
item.contextValue = `${ContextValues.File}+conflicted`;
item.tooltip = StatusFileFormatter.fromTemplate(
// eslint-disable-next-line no-template-curly-in-string
'${file}\n${directory}/\n\n${status}${ (originalPath)} in Index (staged)',
`\${file}\n\${directory}/\n\n\${status}\${ (originalPath)} in Index (staged)`,
this.file,
);
// Use the file icon and decorations

+ 1
- 2
src/views/nodes/rebaseStatusNode.ts Ver arquivo

@ -200,8 +200,7 @@ export class RebaseCommitNode extends ViewRefNode
// item.contextValue = ContextValues.RebaseCommit;
// eslint-disable-next-line no-template-curly-in-string
item.description = CommitFormatter.fromTemplate('${message}', this.commit, {
item.description = CommitFormatter.fromTemplate(`\${message}`, this.commit, {
messageTruncateAtNewLine: true,
});
item.iconPath = new ThemeIcon('git-commit');

+ 1
- 2
src/views/nodes/resultsFileNode.ts Ver arquivo

@ -43,8 +43,7 @@ export class ResultsFileNode extends ViewRefFileNode implements FileNode {
item.contextValue = ContextValues.ResultsFile;
item.description = this.description;
item.tooltip = StatusFileFormatter.fromTemplate(
// eslint-disable-next-line no-template-curly-in-string
'${file}\n${directory}/\n\n${status}${ (originalPath)}',
`\${file}\n\${directory}/\n\n\${status}\${ (originalPath)}`,
this.file,
);

+ 1
- 2
src/views/nodes/stashNode.ts Ver arquivo

@ -71,8 +71,7 @@ export class StashNode extends ViewRefNode
dateFormat: Container.config.defaultDateFormat,
});
item.contextValue = ContextValues.Stash;
// eslint-disable-next-line no-template-curly-in-string
item.tooltip = CommitFormatter.fromTemplate('${ago} (${date})\n\n${message}', this.commit, {
item.tooltip = CommitFormatter.fromTemplate(`\${ago} (\${date})\n\n\${message}`, this.commit, {
dateFormat: Container.config.defaultDateFormat,
// messageAutolinks: true,
});

+ 2
- 4
src/views/nodes/statusFileNode.ts Ver arquivo

@ -75,15 +75,13 @@ export class StatusFileNode extends ViewNode implements FileNo
if (this._hasStagedChanges) {
item.contextValue += '+staged';
item.tooltip = StatusFileFormatter.fromTemplate(
// eslint-disable-next-line no-template-curly-in-string
'${file}\n${directory}/\n\n${status}${ (originalPath)} in Index (staged)',
`\${file}\n\${directory}/\n\n\${status}\${ (originalPath)} in Index (staged)`,
this.file,
);
} else {
item.contextValue += '+unstaged';
item.tooltip = StatusFileFormatter.fromTemplate(
// eslint-disable-next-line no-template-curly-in-string
'${file}\n${directory}/\n\n${status}${ (originalPath)} in Working Tree',
`\${file}\n\${directory}/\n\n\${status}\${ (originalPath)} in Working Tree`,
this.file,
);
}

+ 1
- 2
src/webviews/apps/rebase/rebase.ts Ver arquivo

@ -36,8 +36,7 @@ const rebaseActionsMap = new Map([
]);
class RebaseEditor extends App<RebaseState> {
// eslint-disable-next-line no-template-curly-in-string
private readonly commitTokenRegex = new RegExp(encodeURIComponent('${commit}'));
private readonly commitTokenRegex = new RegExp(encodeURIComponent(`\${commit}`));
constructor() {
super('RebaseEditor', (window as any).bootstrap);

+ 1
- 2
src/webviews/rebaseEditor.ts Ver arquivo

@ -575,8 +575,7 @@ async function parseRebaseTodo(
authors: [...authors.values()],
commits: commits,
commands: {
// eslint-disable-next-line no-template-curly-in-string
commit: ShowQuickCommitCommand.getMarkdownCommandArgs('${commit}', repoPath),
commit: ShowQuickCommitCommand.getMarkdownCommandArgs(`\${commit}`, repoPath),
},
};
}

Carregando…
Cancelar
Salvar