diff --git a/.eslintrc.json b/.eslintrc.json index 4db51ca..3de38b4 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -39,7 +39,8 @@ }, "rules": { "max-len": "off", - "prefer-arrow-callback": "off" + "prefer-arrow-callback": "off", + "no-return-assign": "off" } } ], diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..d6350dd --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,46 @@ +name: Build + +on: [push, pull_request] + +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Setup + uses: actions/setup-node@v3 + with: + node-version: 20.x + + - name: Install tools + run: npm install --location=global bslint + + - name: Install dependencies + run: npm install + + - name: Lint + run: npm run lint + + - name: Lint types + run: npm run lint-types + + test: + name: Test + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Setup + uses: actions/setup-node@v3 + with: + node-version: 20.x + + - name: Install dependencies + run: npm install + + - name: Test + run: npm run test diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..bf12e2e --- /dev/null +++ b/package-lock.json @@ -0,0 +1,32 @@ +{ + "name": "bufio", + "version": "1.0.7", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "bufio", + "version": "1.0.7", + "license": "MIT", + "devDependencies": { + "bmocha": "^2.1.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/bmocha": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/bmocha/-/bmocha-2.1.8.tgz", + "integrity": "sha512-bog23Ckl9lRyBxrsi4FmX1rTz4d1WhHRpIA+q2lpoiXmNuroMHr1JUOU5sPiMZwvhLCxqffvWv3xCJC7PC126w==", + "dev": true, + "bin": { + "_bmocha": "bin/_bmocha", + "bmocha": "bin/bmocha" + }, + "engines": { + "node": ">=8.0.0" + } + } + } +} diff --git a/package.json b/package.json index 52c0923..49e27c4 100644 --- a/package.json +++ b/package.json @@ -15,14 +15,14 @@ "author": "Christopher Jeffrey ", "main": "./lib/bufio.js", "scripts": { - "lint": "eslint lib/ test/ || exit 0", + "lint": "eslint lib/ test/", "test": "bmocha --reporter spec test/*-test.js" }, "devDependencies": { "bmocha": "^2.1.0" }, "engines": { - "node": ">=8.0.0" + "node": ">=14.0.0" }, "browser": { "./lib/custom": "./lib/custom-browser.js"