Skip to content

Commit

Permalink
Merge remote-tracking branch 'Parent/main' into Current
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaRHristov committed Jul 13, 2024
2 parents 1f51355 + bf0f879 commit ad2a817
Show file tree
Hide file tree
Showing 51 changed files with 18,729 additions and 99 deletions.
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

# Tab indentation
[*]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true

# The indent size used in the `package.json` file cannot be changed
# https://github.com/npm/npm/pull/3180#issuecomment-16336516
[{.travis.yml,npm-shrinkwrap.json,package.json}]
indent_style = space
indent_size = 4
142 changes: 142 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
module.exports = {
env: {
browser: true,
es6: true,
node: true
},
extends: ['prettier'],
ignorePatterns: ['*.js', 'vscode.*.d.ts', 'vscode.d.ts', 'types'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: ['tsconfig.json'],
sourceType: 'module'
},
plugins: [
'eslint-plugin-import',
'eslint-plugin-jsdoc',
'eslint-plugin-no-null',
'eslint-plugin-prefer-arrow',
'eslint-plugin-react',
'@typescript-eslint',
'@typescript-eslint/tslint',
'no-only-tests',
'header'
],
rules: {
'no-only-tests/no-only-tests': ['error', { block: ['test', 'suite'], focus: ['only'] }],
// Overriding ESLint rules with Typescript-specific ones
'@typescript-eslint/ban-ts-comment': [
'error',
{
'ts-ignore': 'allow-with-description'
}
],
'@typescript-eslint/explicit-module-boundary-types': 'off',
'no-bitwise': 'off',
'no-dupe-class-members': 'off',
'@typescript-eslint/no-dupe-class-members': 'error',
'no-empty-function': 'off',
'@typescript-eslint/no-empty-function': ['error'],
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-non-null-assertion': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '_\\w*' }],
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': 'off',
'no-useless-constructor': 'off',
'@typescript-eslint/no-useless-constructor': 'error',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-floating-promises': [
'error',
{
ignoreVoid: false
}
],

// Other rules
'class-methods-use-this': 'off',
'func-names': 'off',
'import/extensions': 'off',
'import/namespace': 'off',
'import/no-extraneous-dependencies': 'off',
'import/no-unresolved': [
'error',
{
ignore: ['monaco-editor', 'vscode']
}
],
'import/prefer-default-export': 'off',
'linebreak-style': 'off',
'no-await-in-loop': 'off',
'no-console': 'off',
'no-control-regex': 'off',
'no-extend-native': 'off',
'no-multi-str': 'off',
'no-param-reassign': 'off',
'no-prototype-builtins': 'off',
'no-restricted-syntax': [
'error',
{
selector: 'ForInStatement',
message:
'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.'
},

{
selector: 'LabeledStatement',
message:
'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.'
},
{
selector: 'WithStatement',
message: '`with` is disallowed in strict mode because it makes code impossible to predict and optimize.'
}
],
'no-template-curly-in-string': 'off',
'no-underscore-dangle': 'off',
'no-useless-escape': 'off',
'no-void': [
'error',
{
allowAsStatement: true
}
],
'operator-assignment': 'off',
'no-restricted-imports': ['error', { paths: ['lodash', 'rxjs', 'lodash/noop', 'rxjs/util/noop'] }],
strict: 'off',
'header/header': [
'error',
'line',
[' Copyright (c) Microsoft Corporation.', ' Licensed under the MIT License.'],
2
]
},
overrides: [
{
files: ['**/*.test.ts'],
rules: {
'@typescript-eslint/no-explicit-any': 'off'
}
}
],
settings: {
'import/extensions': ['.ts', '.tsx', '.d.ts', '.js', '.jsx'],
'import/external-module-folders': ['node_modules', 'node_modules/@types'],
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx', '.d.ts']
},
'import/resolver': {
node: {
extensions: ['.ts', '.tsx', '.d.ts', '.js', '.jsx']
}
},
react: {
pragma: 'React',
version: 'detect'
},
propWrapperFunctions: ['forbidExtraProps', 'exact', 'Object.freeze'],
'import/core-modules': [],
'import/ignore': ['node_modules', '\\.(coffee|scss|css|less|hbs|svg|json)$']
}
};
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v16.14.2
Empty file added .prettierignore
Empty file.
15 changes: 15 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
singleQuote: true,
printWidth: 120,
tabWidth: 4,
endOfLine: 'auto',
trailingComma: 'none',
overrides: [
{
files: ['*.yml', '*.yaml'],
options: {
tabWidth: 2
}
}
]
};
11 changes: 11 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"amodio.tsl-problem-matcher",
"dbaeumer.vscode-eslint",
"ms-toolsair.jupyter",
"editorconfig.editorconfig",
"esbenp.prettier-vscode"
]
}
57 changes: 57 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// A launch configuration that compiles the extension and then opens it inside a new window
{
"version": "0.1.0",
"configurations": [
{
"name": "Build and launch",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"smartStep": true,
"sourceMaps": true,
"outFiles": ["${workspaceFolder}/dist/**/*", "!${workspaceFolder}/**/node_modules**/*"],
"preLaunchTask": "Compile",
"skipFiles": ["<node_internals>/**"],
"presentation": {
"group": "1_extension",
"order": 1
}
},
{
"name": "Launch",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"smartStep": true,
"sourceMaps": true,
"outFiles": ["${workspaceFolder}/dist/**/*", "!${workspaceFolder}/**/node_modules**/*"],
"skipFiles": ["<node_internals>/**"],
"presentation": {
"group": "1_extension",
"order": 1
}
},
{
"name": "Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"${workspaceFolder}/tmp",
"--enable-proposed-api",
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index.js"
],
"sourceMaps": true,
"outFiles": ["${workspaceFolder}/out/**/*.js", "!${workspaceFolder}/**/node_modules**/*"],
"preLaunchTask": "Compile",
"skipFiles": ["<node_internals>/**"],
"presentation": {
"group": "2_tests",
"order": 6
}
}
]
}
43 changes: 43 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"out": false, // set this to true to hide the "out" folder with the compiled JS files
"obj": true,
"bin": true,
"**/node_modules": false,
".vscode-test": true,
".vscode-test-web": true,
"**/.venv/**": true
},
"search.exclude": {
"out": true, // set this to false to include "out" folder in search results
"**/node_modules": true,
"coverage": true,
"**/.venv/**": true,
"languageServer*/**": true,
".vscode-test": true,
".vscode-test-web": true
},
"[typescript]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"git.branchProtection": ["main", "release*"],
"git.branchProtectionPrompt": "alwaysCommitToNewBranch",
"typescript.tsdk": "./node_modules/typescript/lib", // we want to use the TS server from our node_modules folder to control its version
"typescript.preferences.quoteStyle": "single",
"javascript.preferences.quoteStyle": "single",
"typescriptHero.imports.stringQuoteStyle": "'",
"prettier.printWidth": 120,
"prettier.singleQuote": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.fixAll.tslint": "explicit"
},
"typescript.preferences.importModuleSpecifier": "relative",
"mochaExplorer.nodeArgv": ["--enable-source-maps"]
}
21 changes: 21 additions & 0 deletions .vscode/shared.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
// Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. The scope defines in watch languages the snippet is applicable. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted.Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
"MSFT Copyright Header": {
"scope": "javascript,typescript",
"prefix": [
"header",
"copyright"
],
"body": [
"// Copyright (c) Microsoft Corporation.",
"// Licensed under the MIT License.",
"",
"$0"
],
"description": "Insert Copyright Statement"
}
}
53 changes: 53 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"version": "2.0.0",
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared"
},
"tasks": [
{
"label": "Compile",
"type": "npm",
"script": "esbuild",
"isBackground": true,
"problemMatcher": ["$tsc-watch"],
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Compile Web Extension",
"type": "npm",
"script": "esbuild-web-watch",
"isBackground": true,
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Compile Desktop Extension",
"type": "npm",
"script": "esbuild-node-watch",
"isBackground": true,
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "Compile TS No Watch",
"type": "npm",
"script": "test-compile"
},
{
"label": "Compile Web Tests No watch",
"type": "npm",
"script": "test-compile-webpack",
"dependsOn": ["Compile TS No Watch"]
}
]
}
Loading

0 comments on commit ad2a817

Please sign in to comment.