Skip to content

Commit f8a63b5

Browse files
committed
feature: client: key: binder: migrate to ESM
1 parent d250bf0 commit f8a63b5

4 files changed

Lines changed: 4 additions & 11 deletions

File tree

.madrun.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ export default {
2626
'build:start': () => run(['build:client', 'start']),
2727
'build:start:dev': () => run(['build:client:dev', 'start:dev']),
2828
'lint:all': () => run('lint:progress'),
29-
'lint': () => 'putout .',
29+
'lint': () => 'redlint scan; putout .',
3030
'lint:progress': () => run('lint', '-f progress'),
3131
'watch:lint': () => 'nodemon -w client -w server -w test -w common -w .webpack -x "putout -s"',
3232
'fresh:lint': () => run('lint', '--fresh'),
3333
'lint:fresh': () => run('lint', '--fresh'),
34-
'fix:lint': () => run('lint', '--fix'),
34+
'fix:lint': async () => `redlint fix && putout --fix .`,
3535
'lint:stream': () => run('lint', '-f stream'),
3636
'test': () => [testEnv, `tape 'test/**/*.{js,mjs}' '{client,static,common,server}/**/*.spec.{js,mjs}' -f fail`],
3737
'test:client': () => `tape 'test/client/**/*.js'`,
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
'use strict';
2-
3-
module.exports.createBinder = () => {
1+
export const createBinder = () => {
42
let binded = false;
53

64
return {

client/key/index.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import * as Buffer from '../dom/buffer.mjs';
66
import * as KEY from './key.mjs';
77
import _vim from './vim/index.js';
88
import setCurrentByChar from './set-current-by-char.js';
9-
import {createBinder} from './binder.js';
9+
import {createBinder} from './binder.mjs';
1010

1111
const Chars = fullstore();
1212

client/key/vim/index.spec.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
'use strict';
22

3-
const {join} = require('node:path');
43
const {test, stub} = require('supertape');
54

6-
const dir = '../';
7-
8-
const pathVim = join(dir, 'vim');
9-
105
const {getDOM, getCloudCmd} = require('./globals.fixture');
116

127
globalThis.DOM = getDOM();

0 commit comments

Comments
 (0)