Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grab bag of dev goodies, gha, lint, dep versions #607

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
env:
es6: true
node: true
mocha: true

root: true

rules:
semi: [ warn, always ]
no-unreachable: [ warn ]
no-unused-vars: [ warn, { args: none } ]
no-useless-escape: [ warn ]
no-undef: [ warn ]
no-redeclare: [ warn ]
no-constant-condition: [ warn ]
no-prototype-builtins: [ warn ]
no-trailing-spaces: [ warn ]

parserOptions:
ecmaVersion: 2020

extends:
- eslint:recommended
38 changes: 38 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

name: Tests

on: [ push ]

env:
CI: true

jobs:

ci-test:

runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ ubuntu-latest ]
node-version: [ 12.x, 14.x, 16.x ]
fail-fast: false

steps:
- uses: actions/checkout@v2
name: Checkout Module
with:
fetch-depth: 1

- uses: actions/setup-node@v2
name: Use Node.js ${{ matrix.node-version }}
with:
node-version: ${{ matrix.node-version }}

- name: npm install
run: |
npm install
cd docs; npm install; cd ..

- name: Run tests
run: npm run test
42 changes: 42 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

name: Docs

on: [ push ]

env:
CI: true

jobs:

ci-test:

runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ ubuntu-latest ]
node-version: [ 16.x ]
fail-fast: false

steps:
- uses: actions/checkout@v2
name: Checkout Module
with:
fetch-depth: 1

- uses: actions/setup-node@v2
name: Use Node.js ${{ matrix.node-version }}
with:
node-version: ${{ matrix.node-version }}

- name: npm install
run: |
npm install
cd docs; npm install; cd ..

- name: Docs
run: |
cd docs; npm run make; cd ..
git status
git diff
git diff-index --quiet HEAD -- docs || (echo "$(tput bold)$(tput setaf 4)Did you forget to rebuild the docs? $ cd docs; npm run make$(tput sgr0)"; exit 1)
34 changes: 34 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

name: Lint

on: [ push ]

jobs:

lint:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [ 14 ]

steps:
- uses: actions/checkout@v2
name: Checkout Module
with:
fetch-depth: 1

- uses: actions/setup-node@v2
name: Use Node.js ${{ matrix.node-version }}
with:
node-version: ${{ matrix.node-version }}

- name: npm install
run: npm install

- name: Lint using eslint
run: npm run lint

env:
CI: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ docs/node_modules/
test/profile.log
test/grammars/parens.js
test/grammars/whitespace.js
test/parens.js
*.swp
*.ps1
*.cmd
Expand Down
1 change: 0 additions & 1 deletion docs/package-lock.json

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

Loading