Eric Amodio 3 лет назад
Родитель
Сommit
1a43f3a346
10 измененных файлов: 396 добавлений и 460 удалений
  1. +14
    -9
      .eslintrc.json
  2. +15
    -14
      package.json
  3. +4
    -1
      src/git/formatters/commitFormatter.ts
  4. +0
    -1
      src/git/gitService.ts
  5. +5
    -6
      src/quickpicks/remoteProviderPicker.ts
  6. +0
    -1
      src/system/string.ts
  7. +0
    -1
      src/trackers/lineTracker.ts
  8. +6
    -8
      src/webviews/rebaseEditor.ts
  9. +6
    -1
      webpack.config.js
  10. +346
    -418
      yarn.lock

+ 14
- 9
.eslintrc.json Просмотреть файл

@ -37,7 +37,6 @@
"no-caller": "error",
"no-debugger": "warn",
"no-dupe-class-members": "off",
"no-duplicate-imports": "error",
"no-else-return": "warn",
"no-empty": ["warn", { "allowEmptyCatch": true }],
"no-eval": "error",
@ -73,13 +72,19 @@
"object-shorthand": ["error", "never"],
"one-var": ["error", "never"],
"prefer-arrow-callback": "error",
"prefer-const": "error",
"prefer-const": [
"error",
{
"destructuring": "all",
"ignoreReadBeforeAssign": false
}
],
"prefer-numeric-literals": "error",
"prefer-object-spread": "error",
"prefer-rest-params": "error",
"prefer-spread": "error",
"prefer-template": "error",
"quotes": ["error", "single", { "avoidEscape": true }],
"quotes": ["error", "single", { "avoidEscape": true, "allowTemplateLiterals": true }],
// Turn off until fix for: https://github.com/eslint/eslint/issues/11899
"require-atomic-updates": "off",
"semi": ["error", "always"],
@ -102,7 +107,6 @@
"import/no-cycle": "off",
"import/no-dynamic-require": "error",
"import/no-default-export": "error",
"import/no-duplicates": "error",
"import/no-self-import": "error",
"import/no-unresolved": ["warn", { "ignore": ["vscode"] }],
"import/order": [
@ -205,7 +209,8 @@
}
}
],
"@typescript-eslint/no-empty-function": ["warn", { "allow": ["constructors"] }],
"@typescript-eslint/no-duplicate-imports": "error",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-floating-promises": "error",
@ -215,10 +220,10 @@
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-parameter-properties": "off",
"@typescript-eslint/no-unnecessary-condition": "off",
"@typescript-eslint/no-unsafe-assignment": "off", // TODO@eamodio revisit
"@typescript-eslint/no-unsafe-call": "off", // TODO@eamodio revisit
"@typescript-eslint/no-unsafe-member-access": "off", // TODO@eamodio revisit
"@typescript-eslint/no-unsafe-return": "off", // TODO@eamodio revisit
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-unused-expressions": ["warn", { "allowShortCircuit": true }],
"@typescript-eslint/no-unused-vars": [
"warn",

+ 15
- 14
package.json Просмотреть файл

@ -9725,10 +9725,10 @@
"vscode:prepublish": "yarn run bundle"
},
"dependencies": {
"@octokit/graphql": "4.6.2",
"@octokit/graphql": "4.6.4",
"chroma-js": "2.1.2",
"dayjs": "1.10.4",
"iconv-lite": "0.6.2",
"dayjs": "1.10.5",
"iconv-lite": "0.6.3",
"lodash-es": "4.17.21",
"node-fetch": "3.0.0-beta.9",
"sortablejs": "1.13.0",
@ -9741,16 +9741,17 @@
"@types/node": "12.12.70",
"@types/sortablejs": "1.10.6",
"@types/vscode": "1.55.0",
"@typescript-eslint/eslint-plugin": "4.24.0",
"@typescript-eslint/parser": "4.24.0",
"@typescript-eslint/eslint-plugin": "4.26.1",
"@typescript-eslint/parser": "4.26.1",
"circular-dependency-plugin": "5.2.2",
"clean-webpack-plugin": "3.0.0",
"copy-webpack-plugin": "9.0.0",
"cross-env": "7.0.3",
"csp-html-webpack-plugin": "5.1.0",
"css-loader": "5.2.5",
"css-loader": "5.2.6",
"esbuild": "0.12.8",
"esbuild-loader": "2.13.1",
"eslint": "7.27.0",
"eslint": "7.28.0",
"eslint-cli": "1.1.1",
"eslint-config-prettier": "8.3.0",
"eslint-plugin-import": "2.23.3",
@ -9761,13 +9762,13 @@
"imagemin-webp": "6.0.0",
"mini-css-extract-plugin": "1.6.0",
"node-sass": "6.0.0",
"prettier": "2.3.0",
"sass-loader": "11.1.1",
"terser-webpack-plugin": "5.1.2",
"ts-loader": "9.2.2",
"typescript": "4.3.1-rc",
"vsce": "1.88.0",
"webpack": "5.37.1",
"prettier": "2.3.1",
"sass-loader": "12.1.0",
"terser-webpack-plugin": "5.1.3",
"ts-loader": "9.2.3",
"typescript": "4.3.2",
"vsce": "1.93.0",
"webpack": "5.38.1",
"webpack-bundle-analyzer": "4.4.2",
"webpack-cli": "4.2.0"
}

+ 4
- 1
src/git/formatters/commitFormatter.ts Просмотреть файл

@ -605,7 +605,10 @@ export class CommitFormatter extends Formatter {
return super.fromTemplateCoreAsync(this, template, commit, dateFormatOrOptions);
}
static override has(template: string, ...tokens: (keyof NonNullable<CommitFormatOptions['tokenOptions']>)[]): boolean {
static override has(
template: string,
...tokens: (keyof NonNullable<CommitFormatOptions['tokenOptions']>)[]
): boolean {
return super.has<CommitFormatOptions>(template, ...tokens);
}
}

+ 0
- 1
src/git/gitService.ts Просмотреть файл

@ -2617,7 +2617,6 @@ export class GitService implements Disposable {
if (status === undefined) {
const rebase = await Git.rev_parse__verify(repoPath, 'REBASE_HEAD');
if (rebase != null) {
// eslint-disable-next-line prefer-const
let [mergeBase, branch, onto, stepsNumber, stepsMessage, stepsTotal] = await Promise.all([
this.getMergeBase(repoPath, 'REBASE_HEAD', 'HEAD'),
Git.readDotGitFile(repoPath, ['rebase-merge', 'head-name']),

+ 5
- 6
src/quickpicks/remoteProviderPicker.ts Просмотреть файл

@ -193,12 +193,11 @@ export namespace RemoteProviderPicker {
// eslint-disable-next-line @typescript-eslint/strict-boolean-expressions
if (autoPick && remotes.length === 1) return items[0];
const quickpick =
window.createQuickPick<
| ConfigureCustomRemoteProviderCommandQuickPickItem
| CopyOrOpenRemoteCommandQuickPickItem
| SetADefaultRemoteCommandQuickPickItem
>();
const quickpick = window.createQuickPick<
| ConfigureCustomRemoteProviderCommandQuickPickItem
| CopyOrOpenRemoteCommandQuickPickItem
| SetADefaultRemoteCommandQuickPickItem
>();
quickpick.ignoreFocusOut = getQuickPickIgnoreFocusOut();
const disposables: Disposable[] = [];

+ 0
- 1
src/system/string.ts Просмотреть файл

@ -175,7 +175,6 @@ export function getTokensFromTemplate(template: string) {
match = tokenRegex.exec(template);
if (match == null) break;
// eslint-disable-next-line prefer-const
let [, prefix, key, truncateTo, option, suffix] = match;
// Check for a prefix group
if (prefix != null) {

+ 0
- 1
src/trackers/lineTracker.ts Просмотреть файл

@ -132,7 +132,6 @@ export class LineTracker implements Disposable {
this._disposable = Disposable.from(
window.onDidChangeActiveTextEditor(Functions.debounce(this.onActiveTextEditorChanged, 0), this),
window.onDidChangeTextEditorSelection(this.onTextEditorSelectionChanged, this),
// eslint-disable-next-line @typescript-eslint/no-empty-function
this.onStart?.() ?? { dispose: () => {} },
);

+ 6
- 8
src/webviews/rebaseEditor.ts Просмотреть файл

@ -113,10 +113,9 @@ export class RebaseEditorProvider implements CustomTextEditorProvider, Disposabl
}
get enabled(): boolean {
const associations =
configuration.inspectAny<{ [key: string]: string } | { viewType: string; filenamePattern: string }[]>(
'workbench.editorAssociations',
)?.globalValue;
const associations = configuration.inspectAny<
{ [key: string]: string } | { viewType: string; filenamePattern: string }[]
>('workbench.editorAssociations')?.globalValue;
if (associations == null || associations.length === 0) return true;
if (Array.isArray(associations)) {
@ -139,10 +138,9 @@ export class RebaseEditorProvider implements CustomTextEditorProvider, Disposabl
async setEnabled(enabled: boolean): Promise<void> {
this._disableAfterNextUse = false;
const inspection =
configuration.inspectAny<{ [key: string]: string } | { viewType: string; filenamePattern: string }[]>(
'workbench.editorAssociations',
);
const inspection = configuration.inspectAny<
{ [key: string]: string } | { viewType: string; filenamePattern: string }[]
>('workbench.editorAssociations');
let associations = inspection?.globalValue;
if (Array.isArray(associations)) {

+ 6
- 1
webpack.config.js Просмотреть файл

@ -1,6 +1,7 @@
//@ts-check
/** @typedef {import('webpack').Configuration} WebpackConfig **/
/* eslint-disable import/no-dynamic-require */
/* eslint-disable @typescript-eslint/ban-ts-comment */
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable @typescript-eslint/strict-boolean-expressions */
@ -12,6 +13,7 @@ const { CleanWebpackPlugin: CleanPlugin } = require('clean-webpack-plugin');
const CircularDependencyPlugin = require('circular-dependency-plugin');
const CopyPlugin = require('copy-webpack-plugin');
const CspHtmlPlugin = require('csp-html-webpack-plugin');
const esbuild = require('esbuild');
const { ESBuildMinifyPlugin } = require('esbuild-loader');
const ForkTsCheckerPlugin = require('fork-ts-checker-webpack-plugin');
const HtmlPlugin = require('html-webpack-plugin');
@ -143,6 +145,7 @@ function getExtensionConfig(mode, env) {
env.esbuild
? new ESBuildMinifyPlugin({
format: 'cjs',
implementation: esbuild,
minify: true,
treeShaking: true,
// Keep the class names otherwise @log won't provide a useful name
@ -150,6 +153,7 @@ function getExtensionConfig(mode, env) {
target: 'es2019',
})
: new TerserPlugin({
extractComments: false,
parallel: true,
terserOptions: {
ecma: 2019,
@ -178,6 +182,7 @@ function getExtensionConfig(mode, env) {
? {
loader: 'esbuild-loader',
options: {
implementation: esbuild,
loader: 'ts',
target: 'es2019',
tsconfigRaw: require('./tsconfig.json'),
@ -420,9 +425,9 @@ function getWebviewsConfig(mode, env) {
? {
loader: 'esbuild-loader',
options: {
implementation: esbuild,
loader: 'ts',
target: 'es2019',
// eslint-disable-next-line import/no-dynamic-require
tsconfigRaw: require(path.join(basePath, 'tsconfig.json')),
},
}

+ 346
- 418
yarn.lock
Разница между файлами не показана из-за своего большого размера
Просмотреть файл


Загрузка…
Отмена
Сохранить