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

BREAKING: Drop node 10 and move to ESM #194

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

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 0 additions & 3 deletions .README/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
```js
import { table } from 'table';

// Using commonjs?
// const { table } = require('table');

const data = [
['0A', '0B', '0C'],
['1A', '1B', '1C'],
Expand Down
11 changes: 4 additions & 7 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
"project": "tsconfig.json"
},
"extends": [
"canonical",
"canonical/typescript"
],
"ignorePatterns": ["src/generated/**/*.js"],
"rules": {
"max-len": 0,
"jsdoc/check-tag-names": [
"error", {"definedTags": ["internal"]}
],
"filenames/match-exported": 0
"max-len": "off",
"jsdoc/check-tag-names": ["error", {"definedTags": ["internal"]}],
"require-unicode-regexp": "off"
}
}
9 changes: 3 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,13 @@ jobs:
fail-fast: false
matrix:
node-version:
- 16
- 14
- 12
- 10

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup Node
uses: actions/setup-node@v1
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
node_modules
coverage
dist
src/generated
tsconfig.tsbuildinfo
*.log
.*
!.editorconfig
!.eslintrc
!.gitignore
!.README
!.mocharc.js
!.github
!.mocharc.json
!.nycrc.json
!.husky
6 changes: 6 additions & 0 deletions .husky/post-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run create-readme
git add README.md
git commit -m 'docs: generate docs' --no-verify
6 changes: 6 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run build
npm run lint
npm run test
8 changes: 0 additions & 8 deletions .mocharc.js

This file was deleted.

4 changes: 4 additions & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"node-option": ["experimental-specifier-resolution=node", "loader=ts-node/esm"],
"spec": ["test/**/*.ts"]
}
11 changes: 11 additions & 0 deletions .nycrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"include": ["src/**/*.ts"],
"exclude": ["src/types/**"],
"reporter": [
"lcov",
"text",
"text-summary"
],
"check-coverage": true,
"lines": 98
}
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ npm install table
```js
import { table } from 'table';

// Using commonjs?
// const { table } = require('table');

const data = [
['0A', '0B', '0C'],
['1A', '1B', '1C'],
Expand Down
9 changes: 0 additions & 9 deletions nyc.config.js

This file was deleted.