Skip to content

Commit

Permalink
Merge pull request #1 from hildjj/update
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
hildjj authored Nov 29, 2022
2 parents 385e064 + eabcb09 commit fde1f8c
Show file tree
Hide file tree
Showing 14 changed files with 2,030 additions and 37 deletions.
23 changes: 3 additions & 20 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,28 +1,11 @@
'use strict'

module.exports = {
root: true,
ignorePatterns: [
'node_modules/',
'docs/',
'coverage/',
],
extends: ['@cto.af'],
parserOptions: {
sourceType: 'module',
},
rules: {
'sort-imports': 'error',
'capitalized-comments': ['error', 'always', {
ignoreConsecutiveComments: true,
ignorePattern: 'c8',
}],

// [Possible Errors](https://eslint.org/docs/rules/#possible-errors)
'node/no-unsupported-features/es-syntax': [
'error',
{
version: '>=12.19',
ignores: ['modules'],
},
],
},
extends: ['@cto.af/eslint-config/modules'],
}
16 changes: 11 additions & 5 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

strategy:
matrix:
node-version: [12, 14, 16]
node-version: [14, 16, 18]
platform: [ubuntu-latest]

runs-on: ${{ matrix.platform }}
Expand All @@ -22,16 +22,22 @@ jobs:
OS: ${{ matrix.os }}
NODE: ${{ matrix.node-version }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2.2.4
with:
version: 7.17.0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm install
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- run: npm run lint
- run: npm run coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
files: coverage/lcov.info
env_vars: OS,NODE
Expand Down
1 change: 0 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
engine-strict=true
package-lock=false
7 changes: 7 additions & 0 deletions examples/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict'

module.exports = {
rules: {
'no-console': 'off',
},
}
2 changes: 1 addition & 1 deletion lib/kernel.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line no-unused-vars
import {EventEmitter} from 'events'
import {extendedError} from './utils.js'

Expand All @@ -11,7 +12,6 @@ export class Kernel {
* Creates an instance of Kernel.
*/
constructor() {
/* eslint-disable-line jsdoc/check-types */
/** @type {Object.<number, EventEmitter>} */
this.ports = {}

Expand Down
1 change: 1 addition & 0 deletions lib/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {extendedError, log, normalizeArgs} from './utils.js'
import {EventEmitter} from 'events'
import {MockSocket} from './socket.js'
import {globalKernel} from './kernel.js'
// eslint-disable-next-line no-unused-vars
import stream from 'stream'

/**
Expand Down
2 changes: 0 additions & 2 deletions lib/utils.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import util from 'util'

// Object.<> triggers this:
/* eslint-disable jsdoc/check-types */
/**
* Normalize arguments for functions that take one of these three things
* for the first arg: port (number), options (object), listener (function).
Expand Down Expand Up @@ -36,7 +35,6 @@ export function normalizeArgs(options = {}, listener = null) {
...opts,
}
}
/* eslint-enable jsdoc/check-types*/

/**
* Create an extended Error, by assigning all of the properties in opts.
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@
"jsrsasign": "^10.6.1"
},
"devDependencies": {
"@cto.af/eslint-config": "^0.1.7",
"@cto.af/eslint-config": "^0.1.8",
"@types/node": "^18.11.9",
"ava": "^5.1.0",
"c8": "^7.12.0",
"eslint": "^7.32.0",
"eslint": "^8.28.0",
"eslint-plugin-ava": "^13.2.0",
"eslint-plugin-jsdoc": "^39.6.2",
"eslint-plugin-node": "^11.1.0",
Expand All @@ -47,6 +47,6 @@
"typescript": "^4.9.3"
},
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
"node": "^14.13.1 || >=16.0.0"
}
}
Loading

0 comments on commit fde1f8c

Please sign in to comment.