mirror of https://github.com/vladmandic/human
updated lint rules
parent
062d3a714c
commit
e7c1f95dd2
|
@ -8,8 +8,11 @@
|
||||||
"jquery": true,
|
"jquery": true,
|
||||||
"es2020": true
|
"es2020": true
|
||||||
},
|
},
|
||||||
|
"parser": "@typescript-eslint/parser",
|
||||||
"parserOptions": { "ecmaVersion": 2020 },
|
"parserOptions": { "ecmaVersion": 2020 },
|
||||||
"plugins": [ ],
|
"plugins": [
|
||||||
|
"@typescript-eslint"
|
||||||
|
],
|
||||||
"extends": [
|
"extends": [
|
||||||
"eslint:recommended",
|
"eslint:recommended",
|
||||||
"plugin:import/errors",
|
"plugin:import/errors",
|
||||||
|
@ -17,6 +20,8 @@
|
||||||
"plugin:node/recommended",
|
"plugin:node/recommended",
|
||||||
"plugin:promise/recommended",
|
"plugin:promise/recommended",
|
||||||
"plugin:json/recommended-with-comments",
|
"plugin:json/recommended-with-comments",
|
||||||
|
"plugin:@typescript-eslint/eslint-recommended",
|
||||||
|
"plugin:@typescript-eslint/recommended",
|
||||||
"airbnb-base"
|
"airbnb-base"
|
||||||
],
|
],
|
||||||
"ignorePatterns": [ "dist", "assets", "media", "models", "node_modules" ],
|
"ignorePatterns": [ "dist", "assets", "media", "models", "node_modules" ],
|
||||||
|
@ -29,6 +34,7 @@
|
||||||
"import/no-absolute-path": "off",
|
"import/no-absolute-path": "off",
|
||||||
"import/no-extraneous-dependencies": "off",
|
"import/no-extraneous-dependencies": "off",
|
||||||
"import/prefer-default-export": "off",
|
"import/prefer-default-export": "off",
|
||||||
|
"import/no-unresolved": "off",
|
||||||
"max-len": [1, 275, 3],
|
"max-len": [1, 275, 3],
|
||||||
"newline-per-chained-call": "off",
|
"newline-per-chained-call": "off",
|
||||||
"no-async-promise-executor": "off",
|
"no-async-promise-executor": "off",
|
||||||
|
@ -48,6 +54,10 @@
|
||||||
"node/no-unpublished-import": "off",
|
"node/no-unpublished-import": "off",
|
||||||
"node/no-unpublished-require": "off",
|
"node/no-unpublished-require": "off",
|
||||||
"node/no-unsupported-features/es-syntax": "off",
|
"node/no-unsupported-features/es-syntax": "off",
|
||||||
|
"node/no-missing-import": ["error", {
|
||||||
|
"allowModules": [],
|
||||||
|
"tryExtensions": [".js", ".json", ".ts"]
|
||||||
|
}],
|
||||||
"node/shebang": "off",
|
"node/shebang": "off",
|
||||||
"object-curly-newline": "off",
|
"object-curly-newline": "off",
|
||||||
"prefer-destructuring": "off",
|
"prefer-destructuring": "off",
|
||||||
|
@ -55,6 +65,11 @@
|
||||||
"promise/always-return": "off",
|
"promise/always-return": "off",
|
||||||
"promise/catch-or-return": "off",
|
"promise/catch-or-return": "off",
|
||||||
"promise/no-nesting": "off",
|
"promise/no-nesting": "off",
|
||||||
"radix": "off"
|
"radix": "off",
|
||||||
|
"lines-between-class-members": "off",
|
||||||
|
"@typescript-eslint/no-var-requires": "off",
|
||||||
|
"@typescript-eslint/ban-ts-comment": "off",
|
||||||
|
"@typescript-eslint/explicit-module-boundary-types": "off",
|
||||||
|
"@typescript-eslint/no-explicit-any": "off"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -44,7 +44,9 @@ class GLBench {
|
||||||
constructor(gl, settings = {}) {
|
constructor(gl, settings = {}) {
|
||||||
this.css = UICSS;
|
this.css = UICSS;
|
||||||
this.svg = UISVG;
|
this.svg = UISVG;
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||||
this.paramLogger = () => {};
|
this.paramLogger = () => {};
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
||||||
this.chartLogger = () => {};
|
this.chartLogger = () => {};
|
||||||
this.chartLen = 20;
|
this.chartLen = 20;
|
||||||
this.chartHz = 20;
|
this.chartHz = 20;
|
||||||
|
|
13
package.json
13
package.json
|
@ -32,25 +32,28 @@
|
||||||
"@tensorflow/tfjs-layers": "^3.0.0",
|
"@tensorflow/tfjs-layers": "^3.0.0",
|
||||||
"@tensorflow/tfjs-node": "^3.0.0",
|
"@tensorflow/tfjs-node": "^3.0.0",
|
||||||
"@tensorflow/tfjs-node-gpu": "^3.0.0",
|
"@tensorflow/tfjs-node-gpu": "^3.0.0",
|
||||||
|
"@types/node": "^14.14.27",
|
||||||
|
"@typescript-eslint/eslint-plugin": "^4.15.0",
|
||||||
|
"@typescript-eslint/parser": "^4.15.0",
|
||||||
"@vladmandic/pilogger": "^0.2.14",
|
"@vladmandic/pilogger": "^0.2.14",
|
||||||
"chokidar": "^3.5.1",
|
"chokidar": "^3.5.1",
|
||||||
"dayjs": "^1.10.4",
|
"dayjs": "^1.10.4",
|
||||||
"esbuild": "^0.8.43",
|
"esbuild": "^0.8.45",
|
||||||
"eslint": "^7.19.0",
|
"eslint": "^7.20.0",
|
||||||
"eslint-config-airbnb-base": "^14.2.1",
|
"eslint-config-airbnb-base": "^14.2.1",
|
||||||
"eslint-plugin-import": "^2.22.1",
|
"eslint-plugin-import": "^2.22.1",
|
||||||
"eslint-plugin-json": "^2.1.2",
|
"eslint-plugin-json": "^2.1.2",
|
||||||
"eslint-plugin-node": "^11.1.0",
|
"eslint-plugin-node": "^11.1.0",
|
||||||
"eslint-plugin-promise": "^4.2.1",
|
"eslint-plugin-promise": "^4.3.1",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"seedrandom": "^3.0.5",
|
"seedrandom": "^3.0.5",
|
||||||
"simple-git": "^2.34.2",
|
"simple-git": "^2.34.2",
|
||||||
"tslib": "^2.1.0",
|
"tslib": "^2.1.0",
|
||||||
"typescript": "^4.2.0-dev.20210208"
|
"typescript": "^4.3.0-dev.20210213"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node --trace-warnings --unhandled-rejections=strict --trace-uncaught --no-deprecation src/node.js",
|
"start": "node --trace-warnings --unhandled-rejections=strict --trace-uncaught --no-deprecation src/node.js",
|
||||||
"lint": "eslint src/*.js demo/*.js",
|
"lint": "eslint src demo server",
|
||||||
"dev": "npm install && node server/serve.js",
|
"dev": "npm install && node server/serve.js",
|
||||||
"build": "rimraf dist/* && rimraf types/* && node server/build.js && node server/changelog.js",
|
"build": "rimraf dist/* && rimraf types/* && node server/build.js && node server/changelog.js",
|
||||||
"update": "npm update --depth 20 --force && npm dedupe && npm prune && npm audit"
|
"update": "npm update --depth 20 --force && npm dedupe && npm prune && npm audit"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { log } from '../log';
|
import { log } from '../log';
|
||||||
import * as tf from '../../dist/tfjs.esm.js';
|
import * as tf from '../../dist/tfjs.esm.js';
|
||||||
import * as profile from '../profile.js';
|
import * as profile from '../profile';
|
||||||
|
|
||||||
let model;
|
let model;
|
||||||
let last = { age: 0 };
|
let last = { age: 0 };
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { log } from '../log';
|
import { log } from '../log';
|
||||||
import * as tf from '../../dist/tfjs.esm.js';
|
import * as tf from '../../dist/tfjs.esm.js';
|
||||||
import * as profile from '../profile.js';
|
import * as profile from '../profile';
|
||||||
|
|
||||||
const annotations = ['angry', 'disgust', 'fear', 'happy', 'sad', 'surprise', 'neutral'];
|
const annotations = ['angry', 'disgust', 'fear', 'happy', 'sad', 'surprise', 'neutral'];
|
||||||
let model;
|
let model;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { log } from '../log';
|
import { log } from '../log';
|
||||||
import * as tf from '../../dist/tfjs.esm.js';
|
import * as tf from '../../dist/tfjs.esm.js';
|
||||||
import * as profile from '../profile.js';
|
import * as profile from '../profile';
|
||||||
|
|
||||||
let model;
|
let model;
|
||||||
let last = { gender: '' };
|
let last = { gender: '' };
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
import * as tf from '../../dist/tfjs.esm.js';
|
import * as tf from '../../dist/tfjs.esm.js';
|
||||||
import * as box from './box';
|
import * as box from './box';
|
||||||
import * as util from './util';
|
import * as util from './util';
|
||||||
// eslint-disable-next-line no-unused-vars
|
|
||||||
import { log } from '../log';
|
|
||||||
|
|
||||||
// const PALM_BOX_SHIFT_VECTOR = [0, -0.4];
|
// const PALM_BOX_SHIFT_VECTOR = [0, -0.4];
|
||||||
const PALM_BOX_ENLARGE_FACTOR = 5; // default 3
|
const PALM_BOX_ENLARGE_FACTOR = 5; // default 3
|
||||||
|
|
|
@ -15,7 +15,6 @@ import * as profile from './profile';
|
||||||
import * as config from '../config';
|
import * as config from '../config';
|
||||||
import * as sample from './sample';
|
import * as sample from './sample';
|
||||||
import * as app from '../package.json';
|
import * as app from '../package.json';
|
||||||
import { NodeFileSystem } from '@tensorflow/tfjs-node/dist/io/file_system';
|
|
||||||
|
|
||||||
// helper function: gets elapsed time on both browser and nodejs
|
// helper function: gets elapsed time on both browser and nodejs
|
||||||
const now = () => {
|
const now = () => {
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { log } from './log';
|
||||||
|
|
||||||
export const data = {};
|
export const data = {};
|
||||||
|
|
||||||
export function run(name, raw) {
|
export function run(name: string, raw: any) {
|
||||||
if (!raw || !raw.kernels) return;
|
if (!raw || !raw.kernels) return;
|
||||||
const maxResults = 5;
|
const maxResults = 5;
|
||||||
const time = raw.kernels
|
const time = raw.kernels
|
||||||
|
|
Loading…
Reference in New Issue