Przeglądaj źródła

Removes eslint ignores

main
Eric Amodio 3 lat temu
rodzic
commit
8322b5a968
11 zmienionych plików z 13 dodań i 30 usunięć
  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 Wyświetl plik

@ -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 Wyświetl plik

@ -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 Wyświetl plik

@ -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 Wyświetl plik

@ -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 Wyświetl plik

@ -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 Wyświetl plik

@ -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 Wyświetl plik

@ -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 Wyświetl plik

@ -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 Wyświetl plik

@ -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 Wyświetl plik

@ -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 Wyświetl plik

@ -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),
},
};
}

Ładowanie…
Anuluj
Zapisz