Skip to content

Commit

Permalink
feat: expose auto-completion & syntax tokenization for monaco editor (#…
Browse files Browse the repository at this point in the history
…90)

* feat: expose auto-completion for monaco editor
* feat: monaco language definition
* feat: prism language definition
* fix(ci): update npm
* fix: disable eslint on the dispose method
  • Loading branch information
rhamzeh authored Dec 2, 2022
1 parent 2d683f9 commit d6dd52c
Show file tree
Hide file tree
Showing 47 changed files with 2,648 additions and 4,246 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
dist/
src/parser/grammar.ts
7 changes: 5 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ module.exports = {
"eslint:recommended",
"prettier",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
"plugin:@typescript-eslint/recommended",
"plugin:import/recommended",
"plugin:import/typescript"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
Expand All @@ -18,8 +20,9 @@ module.exports = {
"plugins": [
"@typescript-eslint"
],
"ignorePatterns": ["src/grammar.ts"],
"ignorePatterns": ["src/parser/grammar.ts"],
"rules": {
"no-case-declarations": "off",
"linebreak-style": [
"error",
"unix"
Expand Down
35 changes: 26 additions & 9 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ jobs:
always-auth: false
cache: 'npm'

- name: Update npm
run: npm i -g npm

- name: Install dependencies
run: npm ci
- name: Run FOSSA scan and upload build data
Expand All @@ -30,14 +33,16 @@ jobs:
api-key: ${{ secrets.FOSSA_API_KEY }}
run-tests: true

snyk:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/node@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

# # Snyk does not currently support npm package-lock.json version 3
# snyk:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Run Snyk to check for vulnerabilities
# uses: snyk/actions/node@master
# env:
# SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

build:
runs-on: ubuntu-latest
Expand All @@ -57,6 +62,9 @@ jobs:
always-auth: false
cache: 'npm'

- name: Update npm
run: npm i -g npm

- name: Install dependencies
run: npm ci

Expand All @@ -75,9 +83,15 @@ jobs:
node-version: '16'
cache: 'npm'

- name: Update npm
run: npm i -g npm

- name: Install dependencies
run: npm ci

- name: Build grammar
run: npm run build:grammar

- name: Audit dependencies
run: npm audit

Expand All @@ -98,7 +112,7 @@ jobs:
publish:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
needs: [build, test, fossa, snyk]
needs: [build, test, fossa]

steps:
- uses: actions/checkout@v3
Expand All @@ -112,6 +126,9 @@ jobs:
always-auth: false
cache: 'npm'

- name: Update npm
run: npm i -g npm

- name: Install dependencies
run: npm ci

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ tests/coverage
.env
credentials.json

src/grammar.ts
src/parser/grammar.ts
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
tests/__snapshots__/*
src/grammar.ts
src/parser/grammar.ts
*.ne
Loading

0 comments on commit d6dd52c

Please sign in to comment.