Compare commits

..

No commits in common. "master" and "v2.0.8" have entirely different histories.

20 changed files with 13539 additions and 4816 deletions

View File

@ -12,9 +12,6 @@ stages:
- release
- metadata
before_script:
- npm install -g @shipzone/npmci
# ====================
# security stage
# ====================
@ -39,7 +36,6 @@ auditProductionDependencies:
- npmci command npm audit --audit-level=high --only=prod --production
tags:
- docker
allow_failure: true
auditDevDependencies:
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci

4
.snyk Normal file
View File

@ -0,0 +1,4 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.13.5
ignore: {}
patch: {}

24
.vscode/launch.json vendored
View File

@ -2,10 +2,28 @@
"version": "0.2.0",
"configurations": [
{
"command": "npm test",
"name": "Run npm test",
"name": "current file",
"type": "node",
"request": "launch",
"type": "node-terminal"
"args": [
"${relativeFile}"
],
"runtimeArgs": ["-r", "@gitzone/tsrun"],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart"
},
{
"name": "test.ts",
"type": "node",
"request": "launch",
"args": [
"test/test.ts"
],
"runtimeArgs": ["-r", "@gitzone/tsrun"],
"cwd": "${workspaceRoot}",
"protocol": "inspector",
"internalConsoleOptions": "openOnSessionStart"
}
]
}

View File

@ -6,27 +6,12 @@
"gitzone": {
"projectType": "npm",
"module": {
"githost": "code.foss.global",
"gitscope": "push.rocks",
"githost": "gitlab.com",
"gitscope": "pushrocks",
"gitrepo": "smartnetwork",
"description": "A toolkit for network diagnostics including speed tests, port availability checks, and more.",
"npmPackagename": "@push.rocks/smartnetwork",
"license": "MIT",
"keywords": [
"network diagnostics",
"ping",
"port check",
"speed test",
"network interface",
"public IP retrieval",
"Cloudflare speed test",
"network performance",
"network utility",
"TypeScript"
]
"shortDescription": "network diagnostics",
"npmPackagename": "@pushrocks/smartnetwork",
"license": "MIT"
}
},
"tsdoc": {
"legal": "\n## License and Legal Information\n\nThis repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository. \n\n**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.\n\n### Trademarks\n\nThis project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.\n\n### Company Information\n\nTask Venture Capital GmbH \nRegistered at District court Bremen HRB 35230 HB, Germany\n\nFor any legal inquiries or if you require further information, please contact us via email at hello@task.vc.\n\nBy using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.\n"
}
}

13393
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,33 +1,31 @@
{
"name": "@push.rocks/smartnetwork",
"version": "3.0.2",
"name": "@pushrocks/smartnetwork",
"version": "2.0.8",
"private": false,
"description": "A toolkit for network diagnostics including speed tests, port availability checks, and more.",
"description": "network diagnostics",
"main": "dist_ts/index.js",
"typings": "dist_ts/index.d.ts",
"type": "module",
"author": "Lossless GmbH",
"license": "MIT",
"scripts": {
"test": "(tstest test/)",
"build": "(tsbuild --web --allowimplicitany)"
"build": "(tsbuild --web)"
},
"devDependencies": {
"@gitzone/tsbuild": "^2.1.61",
"@gitzone/tsrun": "^1.2.39",
"@gitzone/tstest": "^1.0.69",
"@pushrocks/smartenv": "^5.0.0",
"@pushrocks/tapbundle": "^5.0.3",
"@types/node": "^18.11.3"
"@gitzone/tsbuild": "^2.1.25",
"@gitzone/tstest": "^1.0.52",
"@pushrocks/tapbundle": "^3.2.14",
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.18.0"
},
"dependencies": {
"@pushrocks/smartping": "^1.0.7",
"@pushrocks/smartpromise": "^3.1.7",
"@pushrocks/smartstring": "^4.0.2",
"@pushrocks/smartpromise": "^3.1.3",
"@pushrocks/smartstring": "^3.0.24",
"@types/default-gateway": "^3.0.1",
"isopen": "^1.3.0",
"public-ip": "^6.0.1",
"systeminformation": "^5.11.9"
"public-ip": "^4.0.3",
"speedtest-net": "^2.1.1",
"systeminformation": "^5.6.12"
},
"files": [
"ts/**/*",
@ -43,22 +41,5 @@
],
"browserslist": [
"last 1 chrome versions"
],
"keywords": [
"network diagnostics",
"ping",
"port check",
"speed test",
"network interface",
"public IP retrieval",
"Cloudflare speed test",
"network performance",
"network utility",
"TypeScript"
],
"homepage": "https://code.foss.global/push.rocks/smartnetwork",
"repository": {
"type": "git",
"url": "https://code.foss.global/push.rocks/smartnetwork.git"
}
}
]
}

4516
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -1 +0,0 @@

174
readme.md
View File

@ -1,149 +1,61 @@
# @push.rocks/smartnetwork
# @pushrocks/smartnetwork
network diagnostics
## Install
## Availabililty and Links
* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/smartnetwork)
* [gitlab.com (source)](https://gitlab.com/pushrocks/smartnetwork)
* [github.com (source mirror)](https://github.com/pushrocks/smartnetwork)
* [docs (typedoc)](https://pushrocks.gitlab.io/smartnetwork/)
To install `@push.rocks/smartnetwork`, run the following command in your terminal:
## Status for master
```bash
npm install @push.rocks/smartnetwork --save
```
This command will download `@push.rocks/smartnetwork` and add it to your project's `package.json` file.
Status Category | Status Badge
-- | --
GitLab Pipelines | [![pipeline status](https://gitlab.com/pushrocks/smartnetwork/badges/master/pipeline.svg)](https://lossless.cloud)
GitLab Pipline Test Coverage | [![coverage report](https://gitlab.com/pushrocks/smartnetwork/badges/master/coverage.svg)](https://lossless.cloud)
npm | [![npm downloads per month](https://badgen.net/npm/dy/@pushrocks/smartnetwork)](https://lossless.cloud)
Snyk | [![Known Vulnerabilities](https://badgen.net/snyk/pushrocks/smartnetwork)](https://lossless.cloud)
TypeScript Support | [![TypeScript](https://badgen.net/badge/TypeScript/>=%203.x/blue?icon=typescript)](https://lossless.cloud)
node Support | [![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
Code Style | [![Code Style](https://badgen.net/badge/style/prettier/purple)](https://lossless.cloud)
PackagePhobia (total standalone install weight) | [![PackagePhobia](https://badgen.net/packagephobia/install/@pushrocks/smartnetwork)](https://lossless.cloud)
PackagePhobia (package size on registry) | [![PackagePhobia](https://badgen.net/packagephobia/publish/@pushrocks/smartnetwork)](https://lossless.cloud)
BundlePhobia (total size when bundled) | [![BundlePhobia](https://badgen.net/bundlephobia/minzip/@pushrocks/smartnetwork)](https://lossless.cloud)
Platform support | [![Supports Windows 10](https://badgen.net/badge/supports%20Windows%2010/yes/green?icon=windows)](https://lossless.cloud) [![Supports Mac OS X](https://badgen.net/badge/supports%20Mac%20OS%20X/yes/green?icon=apple)](https://lossless.cloud)
## Usage
In this section, we will dive deep into the capabilities of the `@push.rocks/smartnetwork` package, exploring its various features through TypeScript examples. The package is designed to simplify network diagnostics tasks, including speed tests, port availability checks, ping operations, and more.
### Basic Setup
First, import the package into your project:
```typescript
import { SmartNetwork } from '@push.rocks/smartnetwork';
```
import * as smartnetwork from 'smartnetwork';
const testSmartNetwork = new smartnetwork.SmartNetwork();
const run = async () => {
// measure average speed over a period of 5 seconds
// the structure of speedResult is self explanatory using TypeScript (or the linked TypeDoc above)
const speedResult: smartnetwork.SpeedResult = testSmartNetwork.getSpeed(5000);
Then, create an instance of `SmartNetwork`:
// you can check for local ports before trying to bind to it from your nodejs program
const isLocalPortUnused: boolean = await testSmartNetwork.isLocalPortUnused(1234);
```typescript
const myNetwork = new SmartNetwork();
```
// you can run basic port checks on remote domains.
const isRemotePortAvailable: boolean = await testSmartNetwork.isRemotePortAvailable(
'google.com:80'
);
### Performing a Speed Test
You can measure the network speed using the `getSpeed` method. This feature leverages Cloudflare's speed test capabilities to assess your internet connection's download and upload speeds.
```typescript
const speedTest = async () => {
const speedResult = await myNetwork.getSpeed();
console.log(`Download speed: ${speedResult.downloadSpeed} Mbps`);
console.log(`Upload speed: ${speedResult.uploadSpeed} Mbps`);
console.log(`Latency: ${speedResult.averageTime} ms`);
// just another way to call for the same thing as above
const isRemotePortAvailable: boolean = await testSmartNetwork.isRemotePortAvailable(
'google.com',
80
);
};
speedTest();
```
### Checking Port Availability Locally
## Contribution
The `isLocalPortUnused` method allows you to check if a specific port on your local machine is available for use.
We are always happy for code contributions. If you are not the code contributing type that is ok. Still, maintaining Open Source repositories takes considerable time and thought. If you like the quality of what we do and our modules are useful to you we would appreciate a little monthly contribution: You can [contribute one time](https://lossless.link/contribute-onetime) or [contribute monthly](https://lossless.link/contribute). :)
```typescript
const checkLocalPort = async (port: number) => {
const isUnused = await myNetwork.isLocalPortUnused(port);
if (isUnused) {
console.log(`Port ${port} is available.`);
} else {
console.log(`Port ${port} is in use.`);
}
};
For further information read the linked docs at the top of this readme.
checkLocalPort(8080); // Example port number
```
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
### Checking Remote Port Availability
To verify if a certain port is available on a remote server, use `isRemotePortAvailable`. This can help determine if a service is up and reachable.
```typescript
const checkRemotePort = async (hostname: string, port: number) => {
const isAvailable = await myNetwork.isRemotePortAvailable(hostname, port);
if (isAvailable) {
console.log(`Port ${port} on ${hostname} is available.`);
} else {
console.log(`Port ${port} on ${hostname} is not available.`);
}
};
checkRemotePort('example.com', 443); // Checking HTTPS port on example.com
```
### Using Ping
The `ping` method allows you to send ICMP packets to a host to measure round-trip time and determine if the host is reachable.
```typescript
const pingHost = async (hostname: string) => {
const pingResult = await myNetwork.ping(hostname);
if (pingResult.alive) {
console.log(`${hostname} is reachable. RTT: ${pingResult.time} ms`);
} else {
console.log(`${hostname} is not reachable.`);
}
};
pingHost('google.com');
```
### Getting Network Gateways
You can also retrieve information about your network gateways, including the default gateway used by your machine.
```typescript
const showGateways = async () => {
const gateways = await myNetwork.getGateways();
console.log(gateways);
const defaultGateway = await myNetwork.getDefaultGateway();
console.log(`Default Gateway: `, defaultGateway);
};
showGateways();
```
### Discovering Public IP Addresses
To find out your public IPv4 and IPv6 addresses, the following method can be used:
```typescript
const showPublicIps = async () => {
const publicIps = await myNetwork.getPublicIps();
console.log(`Public IPv4: ${publicIps.v4}`);
console.log(`Public IPv6: ${publicIps.v6}`);
};
showPublicIps();
```
The `@push.rocks/smartnetwork` package provides an easy-to-use, comprehensive suite of tools for network diagnostics and monitoring, encapsulating complex network operations into simple asynchronous methods. By leveraging TypeScript, developers can benefit from type checking, ensuring that they can work with clear structures and expectations.
These examples offer a glimpse into the module's utility in real-world scenarios, demonstrating its versatility in handling common network tasks. Whether you're developing a network-sensitive application, diagnosing connectivity issues, or simply curious about your network performance, `@push.rocks/smartnetwork` equips you with the tools you need.
## License and Legal Information
This repository contains open-source code that is licensed under the MIT License. A copy of the MIT License can be found in the [license](license) file within this repository.
**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
### Trademarks
This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH and are not included within the scope of the MIT license granted herein. Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines, and any usage must be approved in writing by Task Venture Capital GmbH.
### Company Information
Task Venture Capital GmbH
Registered at District court Bremen HRB 35230 HB, Germany
For any legal inquiries or if you require further information, please contact us via email at hello@task.vc.
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.
[![repo-footer](https://lossless.gitlab.io/publicrelations/repofooter.svg)](https://maintainedby.lossless.com)

View File

@ -1,25 +0,0 @@
import { tap, expect, expectAsync } from '@pushrocks/tapbundle';
import * as smartnetwork from '../ts/index.js';
let testSmartnetwork: smartnetwork.SmartNetwork;
tap.test('should create a vlid instance of SmartNetwork', async () => {
testSmartnetwork = new smartnetwork.SmartNetwork();
expect(testSmartnetwork).toBeInstanceOf(smartnetwork.SmartNetwork);
});
tap.test('should send a ping to Google', async () => {
console.log(await testSmartnetwork.ping('google.com'));
await expectAsync(testSmartnetwork.ping('google.com')).property('alive').toBeTrue();
});
tap.test('should state when a ping is not alive ', async () => {
await expectAsync(testSmartnetwork.ping('notthere.lossless.com')).property('alive').toBeFalse();
});
tap.test('should send a ping to an IP', async () => {
await expectAsync(testSmartnetwork.ping('192.168.186.999')).property('alive').toBeFalse();
})
tap.start();

View File

@ -1,11 +1,11 @@
import { expect, expectAsync, tap } from '@pushrocks/tapbundle';
import * as smartnetwork from '../ts/index.js';
import { expect, tap } from '@pushrocks/tapbundle';
import * as smartnetwork from '../ts/index';
let testSmartNetwork: smartnetwork.SmartNetwork;
tap.test('should create a valid instance of SmartNetwork', async () => {
testSmartNetwork = new smartnetwork.SmartNetwork();
expect(testSmartNetwork).toBeInstanceOf(smartnetwork.SmartNetwork);
expect(testSmartNetwork).to.be.instanceOf(smartnetwork.SmartNetwork);
});
tap.test('should perform a speedtest', async () => {
@ -15,13 +15,13 @@ tap.test('should perform a speedtest', async () => {
});
tap.test('should determine wether a port is free', async () => {
await expectAsync(testSmartNetwork.isLocalPortUnused(8080)).toBeTrue();
await expect(testSmartNetwork.isLocalPortUnused(8080)).to.eventually.be.true;
});
tap.test('should scan a port', async () => {
await expectAsync(testSmartNetwork.isRemotePortAvailable('lossless.com:443')).toBeTrue();
await expectAsync(testSmartNetwork.isRemotePortAvailable('lossless.com', 443)).toBeTrue();
await expectAsync(testSmartNetwork.isRemotePortAvailable('lossless.com:444')).toBeFalse();
await expect(testSmartNetwork.isRemotePortAvailable('lossless.com:443')).to.eventually.be.true;
await expect(testSmartNetwork.isRemotePortAvailable('lossless.com', 443)).to.be.eventually.true;
// await expect(testSmartNetwork.isRemotePortAvailable('lossless.com:444')).to.eventually.be.false;
});
tap.test('should get gateways', async () => {

View File

@ -1,8 +0,0 @@
/**
* autocreated commitinfo by @pushrocks/commitinfo
*/
export const commitinfo = {
name: '@pushrocks/smartnetwork',
version: '3.0.2',
description: 'network diagnostics'
}

View File

@ -1,4 +1,4 @@
export function average(values: number[]) {
export function average(values) {
let total = 0;
for (let i = 0; i < values.length; i += 1) {
@ -8,7 +8,7 @@ export function average(values: number[]) {
return total / values.length;
}
export function median(values: number[]) {
export function median(values) {
const half = Math.floor(values.length / 2);
values.sort((a, b) => a - b);
@ -18,7 +18,7 @@ export function median(values: number[]) {
return (values[half - 1] + values[half]) / 2;
}
export function quartile(values: number[], percentile: number) {
export function quartile(values, percentile) {
values.sort((a, b) => a - b);
const pos = (values.length - 1) * percentile;
const base = Math.floor(pos);
@ -31,7 +31,7 @@ export function quartile(values: number[], percentile: number) {
return values[base];
}
export function jitter(values: number[]) {
export function jitter(values) {
// Average distance between consecutive latency measurements...
let jitters = [];

View File

@ -1 +1 @@
export * from './smartnetwork.classes.smartnetwork.js';
export * from './smartnetwork.classes.smartnetwork';

View File

@ -1,5 +1,5 @@
import * as plugins from './smartnetwork.plugins.js';
import * as stats from './helpers/stats.js';
import * as plugins from './smartnetwork.plugins';
import * as stats from './helpers/stats';
export class CloudflareSpeed {
constructor() {}
@ -10,16 +10,19 @@ export class CloudflareSpeed {
const serverLocations = await this.fetchServerLocations();
const cgiData = await this.fetchCfCdnCgiTrace();
// lets test the download speed
const testDown1 = await this.measureDownload(101000, 10);
const testDown2 = await this.measureDownload(1001000, 8);
const testDown3 = await this.measureDownload(10001000, 6);
const testDown4 = await this.measureDownload(25001000, 4);
const testDown5 = await this.measureDownload(100001000, 1);
const downloadTests = [...testDown1, ...testDown2, ...testDown3, ...testDown4, ...testDown5];
const speedDownload = stats.quartile(downloadTests, 0.9).toFixed(2);
// lets test the upload speed
const testUp1 = await this.measureUpload(11000, 10);
const testUp2 = await this.measureUpload(101000, 10);
const testUp3 = await this.measureUpload(1001000, 8);
@ -64,7 +67,7 @@ export class CloudflareSpeed {
}
public async measureDownload(bytes: number, iterations: number) {
const measurements: number[] = [];
const measurements = [];
for (let i = 0; i < iterations; i += 1) {
await this.download(bytes).then(
@ -82,7 +85,7 @@ export class CloudflareSpeed {
}
public async measureUpload(bytes: number, iterations: number) {
const measurements: number[] = [];
const measurements = [];
for (let i = 0; i < iterations; i += 1) {
await this.upload(bytes).then(
@ -106,11 +109,11 @@ export class CloudflareSpeed {
public async fetchServerLocations(): Promise<{ [key: string]: string }> {
const res = JSON.parse(await this.get('speed.cloudflare.com', '/locations'));
return res.reduce((data: any, optionsArg: { iata: string; city: string }) => {
return res.reduce((data, { iata, city }) => {
// Bypass prettier "no-assign-param" rules
const data1 = data;
data1[optionsArg.iata] = optionsArg.city;
data1[iata] = city;
return data1;
}, {});
}
@ -124,7 +127,7 @@ export class CloudflareSpeed {
method: 'GET',
},
(res) => {
const body: Array<Buffer> = [];
const body = [];
res.on('data', (chunk) => {
body.push(chunk);
});
@ -145,7 +148,7 @@ export class CloudflareSpeed {
});
}
public async download(bytes: number) {
public async download(bytes) {
const options = {
hostname: 'speed.cloudflare.com',
path: `/__down?bytes=${bytes}`,
@ -169,13 +172,13 @@ export class CloudflareSpeed {
return this.request(options, data);
}
public async request(options: plugins.https.RequestOptions, data = ''): Promise<number[]> {
let started: number;
let dnsLookup: number;
let tcpHandshake: number;
let sslHandshake: number;
let ttfb: number;
let ended: number;
public async request(options, data = '') {
let started;
let dnsLookup;
let tcpHandshake;
let sslHandshake;
let ttfb;
let ended;
return new Promise((resolve, reject) => {
started = plugins.perfHooks.performance.now();
@ -234,7 +237,7 @@ export class CloudflareSpeed {
warp: string;
gateway: string;
}> {
const parseCfCdnCgiTrace = (text: string) =>
const parseCfCdnCgiTrace = (text) =>
text
.split('\n')
.map((i) => {
@ -242,7 +245,7 @@ export class CloudflareSpeed {
return [j[0], j[1]];
})
.reduce((data: any, [k, v]) => {
.reduce((data, [k, v]) => {
if (v === undefined) return data;
// Bypass prettier "no-assign-param" rules

View File

@ -1,6 +1,6 @@
import * as plugins from './smartnetwork.plugins.js';
import * as plugins from './smartnetwork.plugins';
import { CloudflareSpeed } from './smartnetwork.classes.cloudflarespeed.js';
import { CloudflareSpeed } from './smartnetwork.classes.cloudflarespeed';
/**
* SmartNetwork simplifies actions within the network
@ -16,12 +16,6 @@ export class SmartNetwork {
return test;
}
public async ping(hostArg: string, timeoutArg: number = 500): Promise<ReturnType<typeof plugins.smartping.Smartping.prototype.ping>> {
const smartpingInstance = new plugins.smartping.Smartping();
const pingResult = await smartpingInstance.ping(hostArg, timeoutArg);
return pingResult;
}
/**
* returns a promise with a boolean answer
* note: false also resolves with false as argument
@ -84,7 +78,7 @@ export class SmartNetwork {
const domainPart = domainArg.split(':')[0];
const port = portArg ? portArg : parseInt(domainArg.split(':')[1], 10);
plugins.isopen(domainPart, port, (response: any) => {
plugins.isopen(domainPart, port, (response) => {
console.log(response);
if (response[port.toString()].isOpen) {
done.resolve(true);
@ -120,18 +114,10 @@ export class SmartNetwork {
public async getPublicIps() {
return {
v4: await plugins.publicIp.publicIpv4({
v4: await plugins.publicIp.v4({
timeout: 1000,
onlyHttps: true,
}).catch(async (err) => {
return null
}),
v6: await plugins.publicIp.publicIpv6({
timeout: 1000,
onlyHttps: true,
}).catch(async (err) => {
return null
})
};
}
}

View File

@ -6,17 +6,14 @@ import * as perfHooks from 'perf_hooks';
export { os, https, perfHooks };
// @pushrocks scope
import * as smartping from '@pushrocks/smartping';
import * as smartpromise from '@pushrocks/smartpromise';
import * as smartstring from '@pushrocks/smartstring';
export { smartpromise, smartping, smartstring };
export { smartpromise, smartstring };
// @third party scope
// @ts-ignore
import isopen from 'isopen';
// @ts-ignore
import * as publicIp from 'public-ip';
import publicIp from 'public-ip';
import * as systeminformation from 'systeminformation';
export { isopen, publicIp, systeminformation };

View File

@ -1,5 +0,0 @@
{
"compilerOptions": {
"noImplicitAny": true
}
}

View File

@ -1,14 +0,0 @@
{
"compilerOptions": {
"experimentalDecorators": true,
"useDefineForClassFields": false,
"target": "ES2022",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"esModuleInterop": true,
"verbatimModuleSyntax": true
},
"exclude": [
"dist_*/**/*.d.ts"
]
}

17
tslint.json Normal file
View File

@ -0,0 +1,17 @@
{
"extends": ["tslint:latest", "tslint-config-prettier"],
"rules": {
"semicolon": [true, "always"],
"no-console": false,
"ordered-imports": false,
"object-literal-sort-keys": false,
"member-ordering": {
"options":{
"order": [
"static-method"
]
}
}
},
"defaultSeverity": "warning"
}