Skip to content

Commit

Permalink
Reconfig linter, add prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonpaulos committed Oct 31, 2023
1 parent 2ccc4bc commit d7f31cc
Show file tree
Hide file tree
Showing 38 changed files with 5,754 additions and 4,916 deletions.
38 changes: 18 additions & 20 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/naming-convention": "warn",
"@typescript-eslint/semi": "warn",
"curly": "warn",
"eqeqeq": "warn",
"no-throw-literal": "warn",
"semi": "off"
},
"ignorePatterns": [
"**/*.d.ts"
]
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"plugins": ["@typescript-eslint"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"rules": {
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-non-null-asserted-optional-chain": "warn",
"@typescript-eslint/no-inferrable-types": "off"
},
"ignorePatterns": ["**/*.d.ts"]
}
16 changes: 9 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ jobs:
matrix:
node-version: ['18']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run compile
- run: npm test
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run lint
- run: npm run check-format
- run: npm run compile
- run: npm test
5 changes: 5 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"semi": true,
"trailingComma": "all",
"singleQuote": true
}
12 changes: 6 additions & 6 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"dbaeumer.vscode-eslint",
"connor4312.esbuild-problem-matchers"
]
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"dbaeumer.vscode-eslint",
"connor4312.esbuild-problem-matchers"
]
}
95 changes: 41 additions & 54 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,56 +1,43 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"${workspaceFolder}/sampleWorkspace"
],
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "npm: watch"
},
{
"name": "Server",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/src/debugAdapter.ts",
"args": [
"--server=4711"
],
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"preLaunchTask": "npm: compile"
},
{
"name": "Tests",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": [
"-u", "tdd",
"--timeout", "999999",
"--colors",
"./out/tests/"
],
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"internalConsoleOptions": "openOnSessionStart",
"preLaunchTask": "npm: compile"
}
],
"compounds": [
{
"name": "Extension + Server",
"configurations": [ "Extension", "Server" ]
}
]
"version": "0.2.0",
"configurations": [
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"${workspaceFolder}/sampleWorkspace"
],
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
"preLaunchTask": "npm: watch"
},
{
"name": "Server",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/src/debugAdapter.ts",
"args": ["--server=4711"],
"outFiles": ["${workspaceFolder}/out/**/*.js"],
"preLaunchTask": "npm: compile"
},
{
"name": "Tests",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
"args": ["-u", "tdd", "--timeout", "999999", "--colors", "./out/tests/"],
"outFiles": ["${workspaceFolder}/out/**/*.js"],
"internalConsoleOptions": "openOnSessionStart",
"preLaunchTask": "npm: compile"
}
],
"compounds": [
{
"name": "Extension + Server",
"configurations": ["Extension", "Server"]
}
]
}
25 changes: 14 additions & 11 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
// 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
},
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off",
"files.exclude": {
"out": false // set this to true to hide the "out" folder with the compiled JS files
},
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off",

"git.branchProtection": ["main"],
"git.branchProtectionPrompt": "alwaysCommitToNewBranch"
}
"git.branchProtection": ["main"],
"git.branchProtectionPrompt": "alwaysCommitToNewBranch",

"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
}
62 changes: 31 additions & 31 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "build",
"isBackground": false,
"group": {
"isDefault": true,
"kind": "build"
},
"problemMatcher": "$esbuild",
"label": "npm: build"
},
{
"type": "npm",
"script": "watch",
"group": "build",
"problemMatcher": "$esbuild-watch",
"isBackground": true,
"label": "npm: watch"
},
{
"type": "npm",
"script": "watch-web",
"group": "build",
"problemMatcher": "$esbuild-watch",
"isBackground": true,
"label": "npm: watch web"
}
]
}
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "build",
"isBackground": false,
"group": {
"isDefault": true,
"kind": "build"
},
"problemMatcher": "$esbuild",
"label": "npm: build"
},
{
"type": "npm",
"script": "watch",
"group": "build",
"problemMatcher": "$esbuild-watch",
"isBackground": true,
"label": "npm: watch"
},
{
"type": "npm",
"script": "watch-web",
"group": "build",
"problemMatcher": "$esbuild-watch",
"isBackground": true,
"label": "npm: watch web"
}
]
}
Loading

0 comments on commit d7f31cc

Please sign in to comment.