Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
coderaiser committed May 9, 2024
1 parent 5be983f commit 49ef87e
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 21 deletions.
3 changes: 3 additions & 0 deletions .putout.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
"match": {
"*.md": {
"remove-unreachable-code": "off"
},
".filesystem.json": {
"eslint/convert-rc-to-flat": "on"
}
},
"ignore": [".husky"]
Expand Down
5 changes: 4 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import {safeAlign} from 'eslint-plugin-putout/config';
import {createESLintConfig, mergeESLintConfigs} from '@putout/eslint-flat';
import {
createESLintConfig,
mergeESLintConfigs,
} from '@putout/eslint-flat';

const config = await mergeESLintConfigs('./packages');

Expand Down
8 changes: 4 additions & 4 deletions packages/supertape/lib/cli.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
'use strict';

const process = require('process');
const {resolve: resolvePath} = require('path');
const {once} = require('events');
const {pathToFileURL} = require('url');
const process = require('node:process');
const {resolve: resolvePath} = require('node:path');
const {once} = require('node:events');
const {pathToFileURL} = require('node:url');

const glob = require('glob');
const fullstore = require('fullstore');
Expand Down
10 changes: 5 additions & 5 deletions packages/supertape/lib/cli.spec.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
'use strict';

const process = require('process');
const {join, dirname} = require('path');
const process = require('node:process');
const {join, dirname} = require('node:path');

const {Transform} = require('stream');
const {EventEmitter} = require('events');
const {readFile} = require('fs/promises');
const {Transform} = require('node:stream');
const {EventEmitter} = require('node:events');
const {readFile} = require('node:fs/promises');

const stub = require('@cloudcmd/stub');
const mockRequire = require('mock-require');
Expand Down
2 changes: 1 addition & 1 deletion packages/supertape/lib/formatter/harness.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const {Transform: _Transform} = require('stream');
const {Transform: _Transform} = require('node:stream');
const {assign} = Object;

module.exports.createHarness = (reporter, {Transform = _Transform} = {}) => {
Expand Down
1 change: 1 addition & 0 deletions packages/supertape/lib/formatter/harness.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ test('supertape: harness: no readableObjectMode, since it breaks console.log', (
const {args} = Transform;
const [[arg]] = args;
const result = keys(arg);

const expected = [
'writableObjectMode',
'transform',
Expand Down
2 changes: 1 addition & 1 deletion packages/supertape/lib/formatter/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const {EventEmitter} = require('events');
const {EventEmitter} = require('node:events');
const {createHarness} = require('./harness');

const resolveFormatter = async (name) => await import(`@supertape/formatter-${name}`);
Expand Down
2 changes: 1 addition & 1 deletion packages/supertape/lib/is-debug.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const process = require('process');
const process = require('node:process');
const argv = process.execArgv.join();

module.exports = argv.includes('inspect') || argv.includes('debug');
4 changes: 2 additions & 2 deletions packages/supertape/lib/run-tests.spec.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

const process = require('process');
const {once, EventEmitter} = require('events');
const process = require('node:process');
const {once, EventEmitter} = require('node:events');

const montag = require('montag');
const mockRequire = require('mock-require');
Expand Down
6 changes: 3 additions & 3 deletions packages/supertape/lib/supertape.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use strict';

const process = require('process');
const {EventEmitter} = require('events');
const {PassThrough} = require('stream');
const process = require('node:process');
const {EventEmitter} = require('node:events');
const {PassThrough} = require('node:stream');

const stub = require('@cloudcmd/stub');
const once = require('once');
Expand Down
6 changes: 3 additions & 3 deletions packages/supertape/lib/supertape.spec.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use strict';

const process = require('process');
const {once} = require('events');
const {Transform} = require('stream');
const process = require('node:process');
const {once} = require('node:events');
const {Transform} = require('node:stream');

const {test, stub} = require('..');
const montag = require('montag');
Expand Down

0 comments on commit 49ef87e

Please sign in to comment.