diff --git a/.madrun.mjs b/.madrun.mjs index c8779b5f..12042101 100644 --- a/.madrun.mjs +++ b/.madrun.mjs @@ -26,12 +26,12 @@ export default { 'build:start': () => run(['build:client', 'start']), 'build:start:dev': () => run(['build:client:dev', 'start:dev']), 'lint:all': () => run('lint:progress'), - 'lint': () => 'putout .', + 'lint': () => 'redlint scan; putout .', 'lint:progress': () => run('lint', '-f progress'), 'watch:lint': () => 'nodemon -w client -w server -w test -w common -w .webpack -x "putout -s"', 'fresh:lint': () => run('lint', '--fresh'), 'lint:fresh': () => run('lint', '--fresh'), - 'fix:lint': () => run('lint', '--fix'), + 'fix:lint': async () => `redlint fix && putout --fix .`, 'lint:stream': () => run('lint', '-f stream'), 'test': () => [testEnv, `tape 'test/**/*.{js,mjs}' '{client,static,common,server}/**/*.spec.{js,mjs}' -f fail`], 'test:client': () => `tape 'test/client/**/*.js'`, diff --git a/client/key/binder.js b/client/key/binder.mjs similarity index 81% rename from client/key/binder.js rename to client/key/binder.mjs index 2e858d76..6aec97ea 100644 --- a/client/key/binder.js +++ b/client/key/binder.mjs @@ -1,6 +1,4 @@ -'use strict'; - -module.exports.createBinder = () => { +export const createBinder = () => { let binded = false; return { diff --git a/client/key/index.mjs b/client/key/index.mjs index f963350e..a62d6929 100644 --- a/client/key/index.mjs +++ b/client/key/index.mjs @@ -6,7 +6,7 @@ import * as Buffer from '../dom/buffer.mjs'; import * as KEY from './key.mjs'; import _vim from './vim/index.js'; import setCurrentByChar from './set-current-by-char.js'; -import {createBinder} from './binder.js'; +import {createBinder} from './binder.mjs'; const Chars = fullstore(); diff --git a/client/key/vim/index.spec.js b/client/key/vim/index.spec.js index 64901b2a..6c203c6c 100644 --- a/client/key/vim/index.spec.js +++ b/client/key/vim/index.spec.js @@ -1,12 +1,7 @@ 'use strict'; -const {join} = require('node:path'); const {test, stub} = require('supertape'); -const dir = '../'; - -const pathVim = join(dir, 'vim'); - const {getDOM, getCloudCmd} = require('./globals.fixture'); globalThis.DOM = getDOM();