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

Modernize tech stack and add support for node.js 18 and 20 #49

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
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
227 changes: 227 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
/*
👋 Hi! This file was autogenerated by tslint-to-eslint-config.
https://github.com/typescript-eslint/tslint-to-eslint-config

It represents the closest reasonable ESLint configuration to this
project's original TSLint configuration.

We recommend eventually switching this configuration to extend from
the recommended rulesets in typescript-eslint.
https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md

Happy linting! 💖
*/
module.exports = {
"env": {
"es6": true,
"node": true
},
"extends": [
"prettier"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"sourceType": "module"
},
"plugins": [
"eslint-plugin-jsdoc",
"eslint-plugin-import",
"@typescript-eslint",
"@typescript-eslint/tslint"
],
"root": true,
"rules": {
"@typescript-eslint/array-type": [
"error",
{
"default": "array"
}
],
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
"accessibility": "explicit"
}
],
"@typescript-eslint/indent": [
"error",
4,
{
"FunctionDeclaration": {
"parameters": "first"
},
"FunctionExpression": {
"parameters": "first"
}
}
],
"@typescript-eslint/member-delimiter-style": [
"error",
{
"multiline": {
"delimiter": "semi",
"requireLast": true
},
"singleline": {
"delimiter": "semi",
"requireLast": false
}
}
],
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "variable",
"format": [
"camelCase",
"UPPER_CASE"
],
"leadingUnderscore": "forbid",
"trailingUnderscore": "forbid"
}
],
"@typescript-eslint/no-empty-function": "error",
"@typescript-eslint/no-for-in-array": "error",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-shadow": [
"error",
{
"hoist": "all"
}
],
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/quotes": [
"error",
"double"
],
"@typescript-eslint/restrict-plus-operands": "error",
"@typescript-eslint/semi": [
"error",
"always"
],
"@typescript-eslint/type-annotation-spacing": "error",
"comma-dangle": [
"error",
"always-multiline"
],
"curly": "error",
"default-case": "error",
"eol-last": "error",
"eqeqeq": [
"error",
"always"
],
"id-denylist": [
"error",
"any",
"Number",
"number",
"String",
"string",
"Boolean",
"boolean",
"Undefined",
"undefined"
],
"id-match": "error",
"import/no-default-export": "error",
"indent": "off",
"jsdoc/check-alignment": "error",
"jsdoc/check-indentation": "error",
"jsdoc/newline-after-description": "error",
"linebreak-style": [
"error",
"unix"
],
"max-len": [
"error",
{
"code": 120
}
],
"new-parens": "error",
"no-console": [
"error",
{
"allow": [
"warn",
"dir",
"time",
"timeEnd",
"timeLog",
"trace",
"assert",
"clear",
"count",
"countReset",
"group",
"groupEnd",
"table",
"debug",
"info",
"dirxml",
"error",
"groupCollapsed",
"Console",
"profile",
"profileEnd",
"timeStamp",
"context"
]
}
],
"no-empty": "error",
"no-empty-function": "off",
"no-eval": "error",
"no-multiple-empty-lines": "error",
"no-redeclare": "error",
"no-shadow": "off",
"no-trailing-spaces": "error",
"no-underscore-dangle": "error",
"no-unsafe-finally": "error",
"no-unused-expressions": "off",
"no-unused-labels": "error",
"no-var": "error",
"object-shorthand": "error",
"quote-props": [
"error",
"consistent-as-needed"
],
"quotes": "off",
"semi": "off",
"spaced-comment": [
"error",
"always",
{
"markers": [
"/"
]
}
],
"use-isnan": "error",
"valid-typeof": "error",
"@typescript-eslint/tslint/config": [
"error",
{
"rules": {
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-module",
"check-seperator",
"check-type"
]
}
}
]
}
};
7 changes: 7 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
semi: true,
printWidth: 120,
singleQuote: true,
arrowParens: 'always',
trailingComma: 'none'
};
27 changes: 23 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dist: focal
language: node_js
compiler: gcc
env:
Expand All @@ -20,6 +21,12 @@ jobs:
- stage: build
node_js: "16"
os: linux
- stage: build
node_js: "18"
os: linux
- stage: build
node_js: "20"
os: linux
- stage: build
node_js: "10"
os: osx
Expand All @@ -35,6 +42,15 @@ jobs:
- stage: build
node_js: "16"
os: osx
osx_image: xcode13.1
- stage: build
node_js: "18"
os: osx
osx_image: xcode13.1
- stage: build
node_js: "20"
os: osx
osx_image: xcode13.1
addons:
apt:
sources:
Expand All @@ -47,10 +63,13 @@ addons:
before_install:
- npm install -g yarn
- if [ $TRAVIS_OS_NAME == "linux" ]; then
export CC="gcc-7";
export CXX="g++-7";
export LINK="gcc-7";
export LINKXX="g++-7";
export CC="gcc-7";
export CXX="g++-7";
export LINK="gcc-7";
export LINKXX="g++-7";
sed -i '911s!^!//!' deps/libpng/pngpriv.h;
else
sed -i '' '911s/^/\/\/ /' deps/libpng/pngpriv.h;
fi
- node --version
- yarn --version
Expand Down
Loading