diff --git a/.eslintrc b/.eslintrc index 635b07b..d11a5c3 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,14 +1,11 @@ { "root": true, "extends": [ - "./node_modules/eslint-config.xyz/targets/node", + "@asd14/eslint-config/targets/node", ], "parserOptions": { "ecmaVersion": 9 }, - "env": { - "node": true - }, "rules": { }, "settings": { diff --git a/.gitignore b/.gitignore index bd7d050..ba8f585 100644 --- a/.gitignore +++ b/.gitignore @@ -75,3 +75,5 @@ compile/ # Flow type flow-typed/ + +tags diff --git a/bin/cli.js b/bin/cli.js index 1618f3b..3d885cd 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -1,6 +1,6 @@ #!/usr/bin/env node -const { isEmpty } = require("m.xyz") +const { isEmpty } = require("@asd14/m") // First args will always be the node path followed by interpreted file const params = require("minimist")(process.argv.slice(2), { diff --git a/src/core.hooks/use-scanner/scanner.worker.js b/src/core.hooks/use-scanner/scanner.worker.js index fa06a0f..b4d4434 100644 --- a/src/core.hooks/use-scanner/scanner.worker.js +++ b/src/core.hooks/use-scanner/scanner.worker.js @@ -3,7 +3,7 @@ */ const dependencyTree = require("dependency-tree") -const { forEach } = require("m.xyz") +const { forEach } = require("@asd14/m") process.on( "message", diff --git a/src/core.libs/depends-on.js b/src/core.libs/depends-on.js index 44dc90e..28d995f 100644 --- a/src/core.libs/depends-on.js +++ b/src/core.libs/depends-on.js @@ -1,7 +1,7 @@ const espree = require("espree") const fs = require("fs") const path = require("path") -const { pipe, filterWith, startsWith, map, read } = require("m.xyz") +const { pipe, filterWith, startsWith, map, read } = require("@asd14/m") const scanRequiredFiles = source => { const content = fs.readFileSync(source, "utf8") diff --git a/src/core.ui/loader.js b/src/core.ui/loader.js index 4603fab..3cb62a0 100644 --- a/src/core.ui/loader.js +++ b/src/core.ui/loader.js @@ -1,5 +1,5 @@ const blessed = require("neo-blessed") -const { is } = require("m.xyz") +const { is } = require("@asd14/m") const asciiFrames = ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"] diff --git a/src/index.js b/src/index.js index 2a9b21a..ef1fe34 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,5 @@ const blessed = require("neo-blessed") -const { reduce, forEach } = require("m.xyz") +const { reduce, forEach } = require("@asd14/m") const projectPkg = require(`${process.cwd()}/package.json`) @@ -13,8 +13,8 @@ const { useRunner } = require("./core.hooks/use-runner/runner.hook") /** * Main app function, called from "bin/cli.js" * - * @param {String[]} props.requireModules asd - * @param {String[]} props.fileGlob asd + * @param {string[]} props.requireModules asd + * @param {string[]} props.fileGlob asd */ module.exports = ({ requireModules, fileGlob }) => { const testRunArgs = reduce( diff --git a/src/index.state.js b/src/index.state.js index c00021d..cca949e 100644 --- a/src/index.state.js +++ b/src/index.state.js @@ -3,7 +3,7 @@ const glob = require("glob") const { sep } = require("path") const { buildList } = require("just-a-list.redux") const { createStore, combineReducers } = require("redux") -const { flatten, distinct, split, last, map, pipe } = require("m.xyz") +const { flatten, distinct, split, last, map, pipe } = require("@asd14/m") /** * diff --git a/src/page.home/home.js b/src/page.home/home.js index fe82670..fd93878 100644 --- a/src/page.home/home.js +++ b/src/page.home/home.js @@ -9,7 +9,7 @@ const { push, contains, filterWith, -} = require("m.xyz") +} = require("@asd14/m") const { store, FileList } = require("../index.state") diff --git a/src/page.home/ui/cli.js b/src/page.home/ui/cli.js index c437656..36a16fe 100644 --- a/src/page.home/ui/cli.js +++ b/src/page.home/ui/cli.js @@ -43,7 +43,7 @@ const commandUI = ({ if (value === "") { onCancel() } else { - onChange(value.substr(0, value.length - 1)) + onChange(value.slice(0, Math.max(0, value.length - 1))) } } diff --git a/src/page.home/ui/files.js b/src/page.home/ui/files.js index fc61cd8..cac27ec 100644 --- a/src/page.home/ui/files.js +++ b/src/page.home/ui/files.js @@ -8,7 +8,7 @@ const { findIndexWith, contains, is, -} = require("m.xyz") +} = require("@asd14/m") const { loaderUI } = require("../../core.ui/loader") diff --git a/src/page.home/ui/help.js b/src/page.home/ui/help.js index 22280ba..3598d6b 100644 --- a/src/page.home/ui/help.js +++ b/src/page.home/ui/help.js @@ -1,5 +1,5 @@ const blessed = require("neo-blessed") -const { map, pipe, join } = require("m.xyz") +const { map, pipe, join } = require("@asd14/m") const helpUI = ({ parent, width, left, bottom }) => { const shortcutList = [ diff --git a/src/page.home/ui/tabs.js b/src/page.home/ui/tabs.js index 0b4010b..7acb36e 100644 --- a/src/page.home/ui/tabs.js +++ b/src/page.home/ui/tabs.js @@ -1,5 +1,5 @@ const blessed = require("neo-blessed") -const { map, reduce } = require("m.xyz") +const { map, reduce } = require("@asd14/m") const tabsUI = ({ parent, top, tabs }) => { const props = { tabs } diff --git a/src/page.loader/loader.js b/src/page.loader/loader.js index f930290..9f4c1f8 100644 --- a/src/page.loader/loader.js +++ b/src/page.loader/loader.js @@ -11,7 +11,7 @@ const { all, hasKey, pipe, -} = require("m.xyz") +} = require("@asd14/m") const { FileList, store } = require("../index.state")