Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

d2-vscode-extension #11

Closed
wants to merge 26 commits into from
Closed
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
13f3092
d2-vscode-extension
BarryNolte Dec 4, 2022
55049ca
d2-vscode-extension
BarryNolte Dec 4, 2022
d189451
Revert "d2-vscode-extension"
BarryNolte Dec 4, 2022
9aaa385
Revert "Revert "d2-vscode-extension""
BarryNolte Dec 4, 2022
20b01ff
Added context menus and code cleanup
BarryNolte Dec 6, 2022
ed90ca2
Update tsconfig.json
BarryNolte Dec 22, 2022
4051681
Update src/refreshTimer.ts
BarryNolte Dec 22, 2022
ec03fc5
Update src/docToPreviewGenerator.ts
BarryNolte Dec 22, 2022
7bd47b7
Update src/browserWindow.ts
BarryNolte Dec 22, 2022
f934f9b
Update src/browserWindow.ts
BarryNolte Dec 22, 2022
9650284
Changes from Review
BarryNolte Dec 23, 2022
3d7a028
Updated branding
BarryNolte Dec 28, 2022
0582752
Update package.json
BarryNolte Dec 29, 2022
690c953
Update package.json
BarryNolte Dec 29, 2022
855d816
Update pages/previewPage.html
BarryNolte Dec 29, 2022
4e02fc1
Code review fixes
BarryNolte Jan 10, 2023
88a1efb
d2-vscode-extension
BarryNolte Dec 4, 2022
380cb9b
Update pages/previewPage.html
BarryNolte Dec 29, 2022
3e50d87
Code review fixes
BarryNolte Jan 10, 2023
f1aa469
Merge remote-tracking branch 'origin/d2-vscode-extension' into d2-vsc…
BarryNolte Jan 12, 2023
d365bb8
d2-vscode-extension
BarryNolte Dec 4, 2022
a04006a
d2-vscode-extension
BarryNolte Dec 4, 2022
ba2e08f
Revert "d2-vscode-extension"
BarryNolte Dec 4, 2022
518f8dd
Revert "Revert "d2-vscode-extension""
BarryNolte Dec 4, 2022
c7fcc3a
Added context menus and code cleanup
BarryNolte Dec 6, 2022
5dba3b0
Changes from Review
BarryNolte Dec 23, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
plugins: ['@typescript-eslint', 'simple-import-sort', 'unused-imports'],
extends: [
'eslint:recommended',
'next',
'next/core-web-vitals',
'plugin:@typescript-eslint/recommended',
'prettier',
],
rules: {
'no-unused-vars': 'off',
'no-console': 'warn',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@next/next/no-img-element': 'off',

'react/display-name': 'off',
'react/jsx-curly-brace-presence': ['warn', { props: 'never', children: 'never' }],

//#region //*=========== Unused Import ===========
'@typescript-eslint/no-unused-vars': 'off',
'unused-imports/no-unused-imports': 'warn',
'unused-imports/no-unused-vars': [
'warn',
{
vars: 'all',
varsIgnorePattern: '^_',
args: 'after-used',
argsIgnorePattern: '^_',
},
],
//#endregion //*======== Unused Import ===========

//#region //*=========== Import Sort ===========
'simple-import-sort/exports': 'warn',
'simple-import-sort/imports': [
'warn',
{
groups: [
// ext library & side effect imports
['^@?\\w', '^\\u0000'],
// {s}css files
['^.+\\.s?css$'],
// Lib and hooks
['^@/lib', '^@/hooks'],
// static data
['^@/data'],
// components
['^@/components', '^@/container'],
// zustand store
['^@/store'],
// Other imports
['^@/'],
// relative paths up until 3 level
[
'^\\./?$',
'^\\.(?!/?$)',
'^\\.\\./?$',
'^\\.\\.(?!/?$)',
'^\\.\\./\\.\\./?$',
'^\\.\\./\\.\\.(?!/?$)',
'^\\.\\./\\.\\./\\.\\./?$',
'^\\.\\./\\.\\./\\.\\.(?!/?$)',
],
['^@/types'],
// other that didnt fit in
['^'],
],
},
],
//#endregion //*======== Import Sort ===========
},
globals: {
React: true,
JSX: true,
},
};
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.DS_Store
node_modules
*.vsix
dist
44 changes: 34 additions & 10 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,35 @@
// A launch configuration that compiles the extension and then opens it inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
BarryNolte marked this conversation as resolved.
Show resolved Hide resolved
{
"version": "0.2.0",
"configurations": [
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"]
}
]
}
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}"
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
],
"outFiles": [
"${workspaceFolder}/out/**/*.js",
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "tasks: watch-tests"
}
BarryNolte marked this conversation as resolved.
Show resolved Hide resolved
]
}
13 changes: 13 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// 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
"dist": false // set this to true to hide the "dist" folder with the compiled JS files
},
"search.exclude": {
"out": true, // set this to false to include "out" folder in search results
"dist": true // set this to false to include "dist" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
}
40 changes: 40 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": "$ts-webpack-watch",
"isBackground": true,
"presentation": {
"reveal": "never",
"group": "watchers"
},
"group": {
"kind": "build",
"isDefault": true
}
},
{
"type": "npm",
"script": "watch-tests",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never",
"group": "watchers"
},
"group": "build"
},
{
"label": "tasks: watch-tests",
"dependsOn": [
"npm: watch",
"npm: watch-tests"
],
"problemMatcher": []
}
BarryNolte marked this conversation as resolved.
Show resolved Hide resolved
]
}
Loading