Skip to content

Commit

Permalink
ci: lint top level scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Aug 22, 2024
1 parent 58385f7 commit fe462a3
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
"lint-fix": "yarn lerna run --no-bail lint-fix",
"lint": "yarn run -T run-s --continue-on-error 'lint:*'",
"lint:packages": "yarn lerna run --no-bail lint",
"lint:scripts": "yarn eslint scripts/*js",
"test": "yarn lerna run --no-bail test",
"test:c8-all": "rm -rf coverage/tmp && C8_OPTIONS=\"--clean=false --temp-directory=$PWD/coverage/tmp\" lerna run test:c8",
"test:xs": "yarn workspaces foreach --all run test:xs",
Expand Down
7 changes: 5 additions & 2 deletions scripts/ava-nesm.cjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#! /usr/bin/env node
/* eslint-env node */

const fs = require('fs');

const packageJson = fs.readFileSync('package.json', 'utf-8');
const package = JSON.parse(packageJson);
const { ava: avaConfig } = package;
const packageInfo = JSON.parse(packageJson);
const { ava: avaConfig } = packageInfo;
if (avaConfig.require) {
const newRequire = avaConfig.require.filter(m => m !== 'esm');
if (newRequire.length) {
Expand Down
2 changes: 2 additions & 0 deletions scripts/check-untested-packages.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
import fs from 'fs';
import path from 'path';
import { execFileSync } from 'child_process';
// eslint-disable-next-line import/no-relative-packages -- allow for this one-off script
import { listWorkspaces } from '../packages/agoric-cli/src/lib/yarn.js';

// @ts-expect-error not built
const parent = new URL('..', import.meta.url).pathname;

const testYaml = path.resolve(
Expand Down
3 changes: 2 additions & 1 deletion scripts/create-agoric-cli.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#! /usr/bin/env node
/* eslint-env node */

const fs = require('fs');
const path = require('path');
Expand Down Expand Up @@ -37,7 +38,7 @@ try {
# AUTOMATICALLY GENERATED by ${process.argv[1]}
# Maybe execute the checked-out Agoric CLI with the --sdk flag.
opts=\${AGORIC_CLI_OPTS-"--sdk"}
exec ${cli} \$opts \${1+"\$@"}
exec ${cli} $opts \${1+"$@"}
`;

console.log(`creating ${script}`);
Expand Down
1 change: 1 addition & 0 deletions scripts/migrate-test-names.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Then for the couple deeper packages
yarn lerna exec --concurrency 1 --no-bail '../../../scripts/migrate-test-names.mjs'
`;
console.log(usage);

const packageObj = fs.readJsonSync('package.json');
console.log(`${chalk.bold(`Migrating test names: ${packageObj.name}`)}\n`);
Expand Down
1 change: 1 addition & 0 deletions scripts/update-typedoc-functions-path.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env node
/* eslint-env node */

/**
* Help us workaround a limitation in Cloudflare Pages that prevents us from
Expand Down

0 comments on commit fe462a3

Please sign in to comment.