Skip to content

Commit c399a85

Browse files
committed
Lint nits
1 parent 5b0341b commit c399a85

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

.config/rollup.dist.config.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ const distRequirePath = path.join(rootDistPath, 'require')
3939

4040
const editablePkgJson = readPackageJsonSync(rootPath, { editable: true })
4141

42-
const processEnvTapRegExp = /\bprocess\.env(?:\.TAP|\[['"]TAP['"]\])(\s*\?[^:]+:\s*)?/g
42+
const processEnvTapRegExp =
43+
/\bprocess\.env(?:\.TAP|\[['"]TAP['"]\])(\s*\?[^:]+:\s*)?/g
4344

4445
function removeDtsFilesSync(distPath) {
4546
for (const filepath of tinyGlobSync(['**/*.d.ts'], {
@@ -132,7 +133,7 @@ export default () => {
132133
// operation, or replace it with `false`.
133134
socketModifyPlugin({
134135
find: processEnvTapRegExp,
135-
replace: (match, ternary) => ternary ? '' : 'false'
136+
replace: (match, ternary) => (ternary ? '' : 'false')
136137
}),
137138
{
138139
generateBundle(_options, bundle) {

src/constants.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,10 @@ const lazyRootDistPath = () =>
105105
// Lazily access constants.rootPath.
106106
path.join(constants.rootPath, 'dist')
107107

108-
// The '@rollup/plugin-replace' will replace 'process.env.TAP' with `false` and
109-
// it will be dead code eliminated by Rollup.
110-
const lazyRootPath = () => path.resolve(realpathSync(__dirname), process.env['TAP'] ? '../..' : '..')
108+
const lazyRootPath = () =>
109+
// The '@rollup/plugin-replace' will replace 'process.env.TAP' with `false` and
110+
// it will be dead code eliminated by Rollup.
111+
path.resolve(realpathSync(__dirname), process.env['TAP'] ? '../..' : '..')
111112

112113
const lazyRootPkgJsonPath = () =>
113114
// Lazily access constants.rootPath.

0 commit comments

Comments
 (0)