Skip to content

Commit

Permalink
Merge pull request #26 from davelopez/dev_improvements
Browse files Browse the repository at this point in the history
Development improvements
  • Loading branch information
davelopez authored Apr 29, 2022
2 parents 9227f45 + fe1c88a commit 6fcffbd
Show file tree
Hide file tree
Showing 51 changed files with 17,080 additions and 10,033 deletions.
66 changes: 47 additions & 19 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,50 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
"root": true,
"parser": "@typescript-eslint/parser",
"env": {
"node": true,
"es6": true
},
"parserOptions": {
"sourceType": "module"
},
"plugins": ["@typescript-eslint", "prettier"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"rules": {
"prettier/prettier": "error",
"@typescript-eslint/no-use-before-define": [
"error",
{
"functions": false,
"classes": false
}
],
"rules": {
"@typescript-eslint/naming-convention": "warn",
"@typescript-eslint/semi": "warn",
"curly": "warn",
"eqeqeq": "warn",
"no-throw-literal": "warn",
"semi": "off"
},
"ignorePatterns": [
"**/*.d.ts"
]
"@typescript-eslint/no-unused-vars": ["warn"],
"@typescript-eslint/explicit-function-return-type": [
1,
{
"allowExpressions": true
}
],
"eol-last": ["error"],
"space-infix-ops": [
"error",
{
"int32Hint": false
}
],
"no-multi-spaces": [
"error",
{
"ignoreEOLComments": true
}
],
"keyword-spacing": ["error"]
},
"ignorePatterns": ["**/*.d.ts"]
}
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Run prettier after first setup
ccf5ae234335873b9933823c5266722c3a31c090
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
out
dist
node_modules
.vscode-test/
.vscode-test-web/
*.vsix
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.vscode-test
out
dist
6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"arrowParens": "always",
"printWidth": 120,
"trailingComma": "es5",
"endOfLine": "auto"
}
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": ["dbaeumer.vscode-eslint", "amodio.tsl-problem-matcher"]
"recommendations": ["dbaeumer.vscode-eslint", "amodio.tsl-problem-matcher", "esbenp.prettier-vscode"]
}
121 changes: 69 additions & 52 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,56 +3,73 @@
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
],
"smartStep": true,
"sourceMaps": true,
"outFiles": [
"${workspaceFolder}/client/dist/**/*.js"
],
"preLaunchTask": {
"type": "npm",
"script": "compile"
},
"sourceMapPathOverrides": {
"webpack://?:*/*": "${workspaceFolder}/client/*"
}
},
{
"name": "Launch Extension in Webworker",
"type": "pwa-extensionHost",
"debugWebWorkerHost": true,
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceRoot}",
"--extensionDevelopmentKind=web"
],
"smartStep": true,
"sourceMaps": true,
"outFiles": [
"${workspaceRoot}/client/dist/web/**/*.js"
],
"preLaunchTask": {
"type": "npm",
"script": "compile"
}
},
{
"type": "node",
"request": "attach",
"name": "Attach to Server",
"port": 6009,
"restart": true,
"outFiles": [
"${workspaceRoot}/server/dist/**/*.js"
]
}
]
"version": "0.2.0",
"configurations": [
{
"name": "Launch Extension",
"type": "extensionHost",
"request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"smartStep": true,
"sourceMaps": true,
"preLaunchTask": {
"type": "npm",
"script": "watch"
},
"sourceMapPathOverrides": {
"webpack://?:*/*": "${workspaceFolder}/client/*"
}
},
{
"name": "Launch Extension in Webworker",
"type": "pwa-extensionHost",
"debugWebWorkerHost": true,
"request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceRoot}", "--extensionDevelopmentKind=web"],
"smartStep": true,
"sourceMaps": true,
"preLaunchTask": {
"type": "npm",
"script": "compile"
}
},
{
"type": "node",
"request": "attach",
"name": "Attach to Server",
"port": 6009,
"restart": true,
"sourceMapPathOverrides": {
"webpack://?:*/*": "${workspaceFolder}/server/*"
}
},
{
"type": "node",
"name": "Debug Unit Tests",
"program": "${workspaceFolder}/node_modules/jest/bin/jest.js",
"request": "launch",
"args": ["-i"],
"internalConsoleOptions": "openOnSessionStart",
"preLaunchTask": {
"type": "npm",
"script": "watch"
}
},
{
"name": "Debug e2e Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--disable-extensions",
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/client/out/e2e/suite/index"
],
"outFiles": ["${workspaceFolder}client/out/e2e/**/*.js"],
"preLaunchTask": {
"type": "npm",
"script": "test-compile"
}
}
]
}
17 changes: 12 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
// Place your settings in this file to overwrite default and user settings.
{
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"gitlens.advanced.blame.customArguments": ["--ignore-revs-file", ".git-blame-ignore-revs"]
}
43 changes: 27 additions & 16 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "compile",
"group": "build",
"presentation": {
"panel": "dedicated",
"reveal": "never"
},
"problemMatcher": [
"$ts-webpack",
"$tslint-webpack"
]
}
]
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "compile",
"group": "build",
"presentation": {
"panel": "dedicated",
"reveal": "never"
},
"problemMatcher": ["$ts-webpack", "$tslint-webpack"]
},
{
"type": "npm",
"script": "watch",
"isBackground": true,
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"panel": "dedicated",
"reveal": "never"
},
"problemMatcher": ["$ts-webpack-watch", "$tslint-webpack-watch"]
}
]
}
26 changes: 19 additions & 7 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
.vscode/**
.vscode-test-web/**
src/**
out/**
node_modules/**
.git-blame-ignore-revs
.gitignore
webpack.config.js
.prettierignore
.prettierrc
.vscode-test-web/**
.vscode-test/**
.vscode/**
.yarnrc
**/tsconfig.json
**/.eslintrc.json
**/*.map
**/*.ts
**/*webpack.config.js
**/jest.config.js
**/node_modules/**
**/out/**
**/package-lock.json
**/package.json
**/tsconfig.json
docs/**
images/**
src/**
test-data/**

!docs/CHANGELOG.md
25 changes: 25 additions & 0 deletions client/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// For a detailed explanation regarding each configuration property, visit:
// https://jestjs.io/docs/en/configuration.html

module.exports = {
// A set of global variables that need to be available in all test environments
globals: {
"ts-jest": {
tsconfig: "tsconfig.json",
},
},

// An array of directory names to be searched recursively up from the requiring module's location
moduleDirectories: ["node_modules"],

// An array of file extensions your modules use
moduleFileExtensions: ["ts", "tsx", "js"],

// The test environment that will be used for testing
testEnvironment: "node",

// A map from regular expressions to paths to transformers
transform: {
"^.+\\.(ts|tsx)$": "ts-jest",
},
};
Loading

0 comments on commit 6fcffbd

Please sign in to comment.