Skip to content

Commit

Permalink
chore: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
coderaiser committed Sep 18, 2023
1 parent a449f09 commit 13ee065
Show file tree
Hide file tree
Showing 16 changed files with 19 additions and 13 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/nodejs-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ jobs:
run: redrun bootstrap
- name: Lint
run: redrun lint
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install Rust
run: rustup update
- uses: actions/cache@v3
with:
path: |
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ jobs:
run: bun i -f --no-save
- name: Lint
run: redrun fix:lint
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install Rust
run: rustup update
- uses: actions/cache@v3
with:
path: |
Expand Down
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@
"engines": {
"node": ">=16"
},
"workspaces": [
"packages/*"
],
"workspaces": ["packages/*"],
"dependencies": {}
}
1 change: 1 addition & 0 deletions packages/formatter-progress-bar/lib/progress-bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import cliProgress from 'cli-progress';
import chalk from 'chalk';
import fullstore from 'fullstore';
import {isCI} from 'ci-info';
import process from 'node:process';

global._isCI = isCI;

Expand Down
1 change: 1 addition & 0 deletions packages/formatter-progress-bar/lib/progress-bar.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
stub,
createTest,
} from 'supertape';
import process from 'node:process';
import * as progressBar from './progress-bar.js';

const {env} = process;
Expand Down
1 change: 1 addition & 0 deletions packages/formatter-short/lib/short.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
test,
createTest,
} from 'supertape';
import process from 'node:process';
import * as shortFormatter from './short.js';

const pull = async (stream, i = 9) => {
Expand Down
1 change: 1 addition & 0 deletions packages/formatter-tap/lib/tap.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
test,
createTest,
} from 'supertape';
import process from 'node:process';
import * as tapFormatter from './tap.js';

const pull = async (stream, i = 9) => {
Expand Down
6 changes: 2 additions & 4 deletions packages/operator-stub/lib/stub.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ export const calledWith = (operator) => (fn, args, message = `should be called w
if (!isArray(args))
return operator.fail(`Expected 'args' to be 'array' but received: ${stringify(args)}`);

const {length} = fn.args;
const calledArgs = fn.args[length - 1];
const calledArgs = fn.args.at(-1);

return operator.deepEqual(calledArgs, args, message);
};
Expand All @@ -52,8 +51,7 @@ export const calledWithNoArgs = (operator) => (fn, message = 'should be called w
if (!isString(message))
return operator.fail(`'t.calledWithNoArgs' expects message to be string, but received: '${stringify(message)}', looks like you need 't.calledWith'`);

const {length} = fn.args;
const calledArgs = fn.args[length - 1];
const calledArgs = fn.args.at(-1);

return operator.deepEqual(calledArgs, [], message);
};
Expand Down
1 change: 1 addition & 0 deletions packages/supertape/bin/supertape.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env node

import process from 'node:process';
import cli from '../lib/cli.js';

const {
Expand Down
1 change: 1 addition & 0 deletions packages/supertape/lib/cli.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict';

const process = require('process');
const {resolve: resolvePath} = require('path');
const {once} = require('events');
const {pathToFileURL} = require('url');
Expand Down
1 change: 1 addition & 0 deletions packages/supertape/lib/cli.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict';

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

const {Transform} = require('stream');
Expand Down
1 change: 1 addition & 0 deletions packages/supertape/lib/is-debug.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict';

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

module.exports = argv.includes('inspect') || argv.includes('debug');
1 change: 1 addition & 0 deletions packages/supertape/lib/run-tests.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict';

const process = require('process');
const fullstore = require('fullstore');
const wraptile = require('wraptile');
const tryToCatch = require('try-to-catch');
Expand Down
1 change: 1 addition & 0 deletions packages/supertape/lib/run-tests.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict';

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

const montag = require('montag');
Expand Down
1 change: 1 addition & 0 deletions packages/supertape/lib/supertape.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict';

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

Expand Down
1 change: 1 addition & 0 deletions packages/supertape/lib/supertape.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use strict';

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

Expand Down

0 comments on commit 13ee065

Please sign in to comment.