Skip to content

Commit

Permalink
Merge pull request #49 from 2Toad/jp-issue-48
Browse files Browse the repository at this point in the history
Fix #48: Upgrade dependencies, formatting, and Node
  • Loading branch information
JasonPierce authored Aug 29, 2024
2 parents 29986cb + e09de06 commit bb92d76
Show file tree
Hide file tree
Showing 11 changed files with 2,677 additions and 4,277 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"extends": ["airbnb-base", "airbnb-typescript/base", "plugin:security/recommended", "plugin:prettier/recommended"],
"plugins": ["security", "prettier"],
"parserOptions": {
"ecmaVersion": 2018,
"ecmaVersion": 2019,
"project": "./tsconfig.json"
},
"rules": {
Expand Down
21 changes: 6 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,12 @@ jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x, 14.x, lts/*]

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build, and test
run: |
npm ci
npm run lint
npm run build
npm test
env:
CI: true
node-version: lts/*
- run: npm ci
- run: npm run lint
- run: npm run build
- run: npm test
2 changes: 1 addition & 1 deletion .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ jobs:
node-version: lts/*
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm publish
- run: npm publish --dry-run
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ tests/
.eslintcache
.eslintignore
.eslintrc.json
.gitattributes
.gitignore
.nvmrc
.prettierignore
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.17.0
20.17.0
5 changes: 2 additions & 3 deletions contribute.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ The Profanity project includes an .nvmrc file, so you can run `nvm use` to switc

The Profanity project includes Husky for running Git Hooks. Running `git commit` will trigger `lint-staged` which will lint all files currently staged in Git. If linting fails, the commit will be cancelled

##### Setup
### Dependencies

1. Install husky: `npx husky install`
2. Give Husky permission: `sudo chmod -R +x .husky`
- `chai`: we must use v4.x because v5.x is pure ESM, and we require CommonJS modules
Loading

0 comments on commit bb92d76

Please sign in to comment.