Skip to content

Commit

Permalink
Merge #33
Browse files Browse the repository at this point in the history
33: Revert "Start using prettier" r=noppej a=Yatekii

Reverts #32

`@dbrgn` ... bringing forward my requests from #32:
- Please can we ensure we do not reformat `src/debugProtocol.json` ... this file is downloaded from the DAP spec in one of the npm scripts.
- I really appreciate the work you've done here, but I'd prefer if we can hold of a few days with merging this, until #31 has been merged (just to avoid unnecessary conflict resolution on the latter).

Co-authored-by: Yatekii <[email protected]>
  • Loading branch information
bors[bot] and Yatekii authored Apr 14, 2022
2 parents 934ebb2 + 1878489 commit 2357c71
Show file tree
Hide file tree
Showing 17 changed files with 4,960 additions and 5,461 deletions.
4 changes: 3 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"ecmaVersion": 6,
"sourceType": "module"
},
"plugins": ["@typescript-eslint"],
"plugins": [
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/naming-convention": "warn",
"@typescript-eslint/semi": "warn",
Expand Down
1 change: 0 additions & 1 deletion .gitattributes

This file was deleted.

22 changes: 11 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ jobs:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: 14.x
- run: yarn install
- run: xvfb-run -a yarn pretest
if: runner.os == 'Linux'
- run: yarn pretest
if: runner.os != 'Linux'
- name: Checkout
uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v2
with:
node-version: 14.x
- run: yarn install
- run: xvfb-run -a yarn pretest
if: runner.os == 'Linux'
- run: yarn pretest
if: runner.os != 'Linux'
5 changes: 0 additions & 5 deletions .prettierignore

This file was deleted.

15 changes: 0 additions & 15 deletions .prettierrc.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
language: node_js
node_js:
- '7.9'
- "7.9"
sudo: false
15 changes: 7 additions & 8 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"dbaeumer.vscode-eslint",
"amodio.tsl-problem-matcher",
"esbenp.prettier-vscode"
]
}
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"dbaeumer.vscode-eslint",
"amodio.tsl-problem-matcher"
]
}
28 changes: 16 additions & 12 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/dist/ext/**/*.js"],
"preLaunchTask": "npm: watch"
}
]
}
"version": "0.2.0",
"configurations": [
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
],
"outFiles": [
"${workspaceFolder}/dist/ext/**/*.js"
],
"preLaunchTask": "npm: watch"
}
]
}
8 changes: 2 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,5 @@
"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",
// Enable prettier format on save
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.formatOnPaste": false
}
"typescript.tsc.autoDetect": "off"
}
17 changes: 13 additions & 4 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,28 @@
"script": "watch",
"group": "build",
"isBackground": true,
"problemMatcher": ["$ts-webpack-watch", "$tslint-webpack-watch"]
"problemMatcher": [
"$ts-webpack-watch",
"$tslint-webpack-watch"
]
},
{
"type": "npm",
"script": "compile-web",
"problemMatcher": ["$ts-webpack", "$tslint-webpack"]
"problemMatcher": [
"$ts-webpack",
"$tslint-webpack"
]
},
{
"type": "npm",
"script": "watch-web",
"group": "build",
"isBackground": true,
"problemMatcher": ["$ts-webpack-watch", "$tslint-webpack-watch"]
"problemMatcher": [
"$ts-webpack-watch",
"$tslint-webpack-watch"
]
}
]
}
}
85 changes: 40 additions & 45 deletions build/extension.webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,48 +12,43 @@
const path = require('path');

module.exports = /** @type WebpackConfig */ {
context: path.dirname(__dirname),
mode: 'none', // this leaves the source code as close as possible to the original (when packaging we set this to 'production')
target: 'node', // vscode extensions run in a Node.js-context
entry: {
extension: './src/extension.ts',
},
resolve: {
// support reading TypeScript and JavaScript files
extensions: ['.ts', '.js'],
},
node: {
__dirname: false, // leave the __dirname-behaviour intact
},
module: {
rules: [
{
test: /\.ts$/,
exclude: /node_modules/,
use: [
{
// configure TypeScript loader:
// * enable sources maps for end-to-end source maps
loader: 'ts-loader',
options: {
compilerOptions: {
sourceMap: true,
declaration: false,
},
},
},
],
},
],
},
externals: {
vscode: 'commonjs vscode', // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed
},
output: {
filename: 'extension.js',
path: path.resolve(__dirname, '../dist/ext'),
libraryTarget: 'commonjs2',
devtoolModuleFilenameTemplate: '../../[resource-path]',
},
devtool: 'source-map',
};
context: path.dirname(__dirname),
mode: 'none', // this leaves the source code as close as possible to the original (when packaging we set this to 'production')
target: 'node', // vscode extensions run in a Node.js-context
entry: {
extension: './src/extension.ts'
},
resolve: { // support reading TypeScript and JavaScript files
extensions: ['.ts', '.js']
},
node: {
__dirname: false, // leave the __dirname-behaviour intact
},
module: {
rules: [{
test: /\.ts$/,
exclude: /node_modules/,
use: [{
// configure TypeScript loader:
// * enable sources maps for end-to-end source maps
loader: 'ts-loader',
options: {
compilerOptions: {
'sourceMap': true,
'declaration': false
}
}
}]
}]
},
externals: {
vscode: "commonjs vscode" // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed
},
output: {
filename: 'extension.js',
path: path.resolve(__dirname, '../dist/ext'),
libraryTarget: 'commonjs2',
devtoolModuleFilenameTemplate: "../../[resource-path]"
},
devtool: 'source-map'
}
85 changes: 41 additions & 44 deletions build/web-extension.webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,48 +12,45 @@
const path = require('path');

module.exports = /** @type WebpackConfig */ {
context: path.dirname(__dirname),
mode: 'none', // this leaves the source code as close as possible to the original (when packaging we set this to 'production')
target: 'webworker', // extensions run in a webworker context
entry: {
extension: './src/web/extension.ts',
},
resolve: {
mainFields: ['module', 'main'],
extensions: ['.ts', '.js'], // support ts-files and js-files
alias: {},
},
module: {
rules: [
{
test: /\.ts$/,
exclude: /node_modules/,
use: [
{
// configure TypeScript loader:
// * enable sources maps for end-to-end source maps
loader: 'ts-loader',
options: {
compilerOptions: {
sourceMap: true,
declaration: false,
},
},
},
],
},
],
},
externals: {
vscode: 'commonjs vscode', // ignored because it doesn't exist
},
performance: {
hints: false,
},
output: {
filename: 'extension.js',
path: path.join(__dirname, '../dist/web'),
libraryTarget: 'commonjs',
},
devtool: 'source-map',
context: path.dirname(__dirname),
mode: 'none', // this leaves the source code as close as possible to the original (when packaging we set this to 'production')
target: 'webworker', // extensions run in a webworker context
entry: {
extension: './src/web/extension.ts',
},
resolve: {
mainFields: ['module', 'main'],
extensions: ['.ts', '.js'], // support ts-files and js-files
alias: {
}
},
module: {
rules: [{
test: /\.ts$/,
exclude: /node_modules/,
use: [{
// configure TypeScript loader:
// * enable sources maps for end-to-end source maps
loader: 'ts-loader',
options: {
compilerOptions: {
'sourceMap': true,
'declaration': false
}
}
}]
}]
},
externals: {
'vscode': 'commonjs vscode', // ignored because it doesn't exist
},
performance: {
hints: false
},
output: {
filename: 'extension.js',
path: path.join(__dirname, '../dist/web'),
libraryTarget: 'commonjs'
},
devtool: 'source-map'
};
Loading

0 comments on commit 2357c71

Please sign in to comment.