Skip to content

Commit

Permalink
Merge pull request #3 from H0R15H0/prettier
Browse files Browse the repository at this point in the history
Add Prettier
  • Loading branch information
H0R15H0 authored Jul 30, 2023
2 parents 8c811b6 + 8785eb9 commit 06795b4
Show file tree
Hide file tree
Showing 17 changed files with 356 additions and 294 deletions.
40 changes: 17 additions & 23 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
{
"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": [
"src/golang-parser/golang.ts",
"out",
"dist",
"**/*.d.ts"
]
"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": ["src/golang-parser/golang.ts", "out", "dist", "**/*.d.ts"],
"extends": ["prettier"]
}
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
src/golang-parser/golang.ts
54 changes: 25 additions & 29 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,29 @@
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"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"
}
]
"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"
}
]
}
14 changes: 8 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
"*.jison": "lex"
},
"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
"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
"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"
}
"typescript.tsc.autoDetect": "off",
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
69 changes: 33 additions & 36 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,37 @@
// 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": []
}
]
"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": []
}
]
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Go Getter Setter is a powerful extension that generates getters and setters for
Generate getters and setters, regardless of whether the selected struct has fields of complex types.

### How to Use

1. Select a range of structs you wish to generate.
2. Press `Cmd+Shift+P` (or `Ctrl+Shift+P` in Windows) to select the command.

Expand Down
29 changes: 29 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"displayName": "Go Getter Setter",
"description": "Go Getter Setter is a powerful extension that generates getters and setters for Golang struct fields.",
"license": "MIT",
"publisher": "H0R15H0",
"repository": {
"type": "git",
"url": "https://github.com/H0R15H0/go-getter-setter"
},
"publisher": "H0R15H0",
"repository": {
"type": "git",
"url": "https://github.com/H0R15H0/go-getter-setter"
},
"version": "0.0.1",
"engines": {
"vscode": "^1.80.0"
Expand Down Expand Up @@ -46,9 +46,11 @@
"@typescript-eslint/parser": "^5.59.8",
"@vscode/test-electron": "^2.3.2",
"eslint": "^8.41.0",
"eslint-config-prettier": "^8.9.0",
"glob": "^8.1.0",
"mocha": "^10.2.0",
"nodemon": "^2.0.22",
"prettier": "^2.8.8",
"ts-loader": "^9.4.3",
"typescript": "^5.1.3",
"webpack": "^5.85.0",
Expand Down
4 changes: 2 additions & 2 deletions src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const SELECT_BTN_GETTER = 'Getter';
export const SELECT_BTN_SETTER = 'Setter';
export const SELECT_BTN_GETTER = "Getter";
export const SELECT_BTN_SETTER = "Setter";
Loading

0 comments on commit 06795b4

Please sign in to comment.