Skip to content

Commit

Permalink
Engineering (#135)
Browse files Browse the repository at this point in the history
* Fixup Development.md

* Sort package.json

Using https://www.npmjs.com/package/sort-package-json 1.57.0

* Add prettierrc

From mark-wiemer/vscode-helloworld

* Teardown format tests correctly

Previously tests were modifying the `in` sample files, which needed to be manually reverted.

Now tests do not change any of the files they touch.

* Convert grammar to YAML, run tests via CLI

* Add ESLint and fix problems

* Add validate script

* Add formatter

Remove `Getting started` as it's covered by `Contributing`

* Add pre-commit hooks

Excessive output: lint-staged/lint-staged#1145
nbd
  • Loading branch information
mark-wiemer authored Jun 27, 2022
1 parent 8f0c8d0 commit db11591
Show file tree
Hide file tree
Showing 49 changed files with 35,375 additions and 624 deletions.
17 changes: 17 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"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"
},
"ignorePatterns": ["out", "dist", "**/*.d.ts"]
}
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
7 changes: 4 additions & 3 deletions .github/ISSUE_TEMPLATE/bug-report--non-formatter-.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
name: Bug report (non-formatter)
about: Report a bug with the extension. For issues with the formatter, please use
the "Formatting bug" template
about:
Report a bug with the extension. For issues with the formatter, please use
the "Formatting bug" template
title: ''
labels: bug
assignees: mark-wiemer

---

## Description
Expand All @@ -15,6 +15,7 @@ A clear and concise description of what the bug is.
## Reproduction steps

Steps to reproduce the behavior:

1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: mark-wiemer

---

**Is your feature request related to a problem? Please describe.**
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/formatting-bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ about: Report issues with code formatting
title: ''
labels: bug, formatter
assignees: mark-wiemer

---

### Description
Expand Down
3 changes: 0 additions & 3 deletions .github/ISSUE_TEMPLATE/other-issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,4 @@ about: Not sure if it's a bug or a feature? Open a blank issue
title: ''
labels: ''
assignees: mark-wiemer

---


3 changes: 2 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
Closes #ISSUE.

Changes proposed in this pull request:
- CHANGE

- CHANGE

---

Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
# Contents of this file are also in `.prettierignore`

# Folders
.idea/
.@vscode/test-electron/
.vscode-test/
node_modules
out

# Files
.vscode/settings.json
*.vsix
*.vsix
syntaxes/*.json
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
13 changes: 13 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# From `.gitignore`

# Folders
.idea/
.@vscode/test-electron/
.vscode-test/
node_modules
out

# Files
.vscode/settings.json
*.vsix
syntaxes/*.json
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
singleQuote: true
tabWidth: 4
trailingComma: all
overrides:
- files: ['*.yml', '*.yaml', '.prettierrc']
options:
tabWidth: 2
1 change: 1 addition & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--disable-extensions",
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
],
Expand Down
24 changes: 24 additions & 0 deletions Contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Contributing

I welcome any issues or PRs :)

## Running locally

1. Clone the repo
1. Install the relevant dependencies
- VS Code Insiders (needed to run the tests from CLI, see [using Insiders version for extension development](https://code.visualstudio.com/api/working-with-extensions/testing-extension#using-insiders-version-for-extension-development))
- Node 16 with npm 8
1. `npm i`

## Validate the build

1. `npm run test`
1. Go to `Run and Debug` viewlet (`Ctrl+Shift+D`) and click "Run Extension"

## Automated checks

All checks are found in `package.json`.

- Test
- Pretest (compile): tsc, js-yaml
- Automated tests: Mocha
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# AutoHotkey Plus Plus (AHK++)

AutoHotkey Plus Plus (AHK++) provides AutoHotkey language support for VS Code. This includes:
- IntelliSense
- code highlighting
- basic debug support
- code formatting
- ...and more!

AHK++ is a fork of [AutoHotkey Plus by cweijan](https://github.com/AutoHotkey-Plus/vscode-autohotkey), with the primary goal of fixing bugs and adding user-requested features.
- IntelliSense
- code highlighting
- basic debug support
- code formatting
- ...and more!

AHK++ is a fork of [AutoHotkey Plus by cweijan](https://github.com/AutoHotkey-Plus/vscode-autohotkey), with the primary goal of fixing bugs and adding user-requested features.

> View this README on the [project site](https://github.com/mark-wiemer/vscode-autohotkey-plus-plus#readme)
Expand Down
7 changes: 3 additions & 4 deletions docs/Development.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The tests should run automatically, and you should see passing output in the Deb
1. Bump the version in `package.json`. The message of the commit should be e.g. `v2.8.2`.
1. Push the changes.
1. Merge the PR. The body of the commit message should be the changelog entry.
1. Checkout `main`
1. `git checkout main`
1. Package the new version using `vsce package`.
1. Install the new version:
1. Select the newly-created `.vsix` file.
Expand All @@ -48,10 +48,9 @@ The tests should run automatically, and you should see passing output in the Deb
### Publishing

1. Tag the release
1. Delete the release branch in local
1. `git checkout main`
1. `git tag v<major>.<minor>.<patch>`
1. `git push origin v<major>.<minor>.<patch>`
1. e.g. `git tag v2.8.2`
1. `git push origin v2.8.2`
1. [Create a new release for this tag](https://github.com/mark-wiemer/vscode-autohotkey-plus-plus/tags)
1. Release title: Same as in [Changelog.md](../Changelog.md)
1. Description: Same as in changelog
Expand Down
12 changes: 0 additions & 12 deletions docs/Getting started.md

This file was deleted.

Loading

0 comments on commit db11591

Please sign in to comment.