Skip to content

Commit

Permalink
add proper readme, styling rules and CI
Browse files Browse the repository at this point in the history
  • Loading branch information
VirtualButFake committed Aug 4, 2024
1 parent c4b7461 commit aab5e58
Show file tree
Hide file tree
Showing 7 changed files with 3,293 additions and 3,122 deletions.
39 changes: 22 additions & 17 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
/**@type {import('eslint').Linter.Config} */
// eslint-disable-next-line no-undef
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
],
rules: {
'semi': [2, "always"],
'@typescript-eslint/no-unused-vars': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/explicit-module-boundary-types': 0,
'@typescript-eslint/no-non-null-assertion': 0,
}
};
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
rules: {
semi: [2, 'always'],
'@typescript-eslint/no-unused-vars': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/explicit-module-boundary-types': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'no-throw-literal': 1,
'no-unused-vars': 1,
'no-mixed-spaces-and-tabs': 1,
'no-trailing-spaces': 1,
'no-multi-spaces': 1,
'no-multiple-empty-lines': 1,
'no-irregular-whitespace': 1,
'no-unexpected-multiline': 1,
'no-duplicate-case': 1,
'no-unreachable': 1,
},
};
56 changes: 56 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: CI
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main

env:
CI: true

jobs:
eslint:
name: ESLint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v4
with:
node-version: '16'
- name: Install
run: npm install
- name: ESLint
run: npm run ci:eslint
prettier:
name: Prettier
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v4
with:
node-version: '16'
- name: Install
run: npm install
- name: Prettier
run: npm run ci:prettier
typescript:
name: TypeScript Compiler Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v4
with:
node-version: '16'
- name: Install
run: npm install
- name: TypeScript
run: npm run ci:tsc





6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"trailingComma": "es5",
"tabWidth": 4,
"semi": true,
"singleQuote": true
}
32 changes: 28 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,34 @@
<div align="center">

# zap-vscode

A simple extension that provides intellisense and highlighting for the [Zap](https://github.com/red-blox/zap/tree/main) IDL.
Large portion of the code comes from [this](https://github.com/red-blox/zap/blob/main/docs/.vitepress/components/Editor.vue) file.
This extension attempts to mimic the highlighting and intellisense seen inside of the Zap playground, so users do not need to use a web page in order to efficiently write Zap code, and can instead stay inside their editor.

[![CI](https://github.com/virtualbutfake/zap-vscode/actions/workflows/ci.yaml/badge.svg)](https://github.com/virtualbutfake/zap-vscode/actions)
[![License](https://img.shields.io/github/license/virtualbutfake/zap-vscode)](https://github.com/VirtualButFake/zap-vscode/blob/master/LICENSE.md)
[![Version](https://img.shields.io/visual-studio-marketplace/v/Virtual.zap-vscode)](https://marketplace.visualstudio.com/items?itemName=Virtual.zap-vscode)
[![Installs](https://img.shields.io/visual-studio-marketplace/d/Virtual.zap-vscode)](https://marketplace.visualstudio.com/items?itemName=Virtual.zap-vscode)

</div>

## Features

This extension provides syntax highlighting and intellisense for the Zap IDL. It is based on the Zap playground, and is designed to be as close to the playground as possible.

Support for other editors is not planned.

[Changelog](CHANGELOG.md)
[Extension Link](https://marketplace.visualstudio.com/items?itemName=Virtual.zap-vscode)
## Getting Started

zap-vscode does not require any configuration. Simply install the extension [here](https://marketplace.visualstudio.com/items?itemName=Virtual.zap-vscode) and start writing Zap code.

## Credits

[Zap](https://github.com/red-blox/zap) - A significant portion of the code comes from [this](https://github.com/red-blox/zap/blob/main/docs/.vitepress/components/Editor.vue) file.

## Contributing

Contributions are always welcomed. Code should follow the Prettier and ESLint rules for this repository. To contribute, fork this repository, make your changes, and create a pull request. Please make sure to test your changes before creating a pull request.

## License

This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/virtualbutfake/zap-vscode/blob/master/LICENSE.md) file for details.
Loading

0 comments on commit aab5e58

Please sign in to comment.