Skip to content

Commit

Permalink
fix: replace type: 'array' with array: true (#872)
Browse files Browse the repository at this point in the history
`'array'` is not a valid value for `'type'` so we can remove the `@ts-ignore`
that was smothering the error message telling us so.
  • Loading branch information
achingbrain authored Aug 14, 2021
1 parent fa70ff7 commit 4608c85
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/cmds/lint.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module.exports = {
default: userConfig.lint.fix
},
files: {
type: 'array',
array: true,
describe: 'Files to lint.',
default: userConfig.lint.files
},
Expand Down
4 changes: 2 additions & 2 deletions src/cmds/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ module.exports = {
target: {
alias: 't',
describe: 'In which target environment to execute the tests',
type: 'array',
array: true,
choices: ['node', 'browser', 'webworker', 'electron-main', 'electron-renderer', 'react-native-android', 'react-native-ios'],
default: userConfig.test.target
},
Expand All @@ -55,7 +55,7 @@ module.exports = {
files: {
alias: 'f',
describe: 'Custom globs for files to test',
type: 'array',
array: true,
default: userConfig.test.files
},
timeout: {
Expand Down
6 changes: 3 additions & 3 deletions src/cmds/ts.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ const { userConfig } = require('../config/user')

const EPILOG = `
Presets:
\`check\` Runs the type checker with your local config (without writing any files). .
\`check\` Runs the type checker with your local config (without writing any files). .
\`types\` Emits type declarations, copies a any .d.ts files or a types folder to \`dist\` folder.
\`config\` Prints base config to stdout.
Note:
Note:
Check out the documentation for JSDoc based TS types here: https://github.com/ipfs/aegir/blob/master/md/ts-jsdoc.md
Supports options forwarding with '--' for more info check https://www.typescriptlang.org/docs/handbook/compiler-options.html
Expand All @@ -35,7 +35,7 @@ module.exports = {
default: userConfig.ts.preset
},
include: {
type: 'array',
array: true,
describe: 'Values are merged into the local TS config include property.',
default: userConfig.ts.include
},
Expand Down
6 changes: 3 additions & 3 deletions src/cmds/z-dependency-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ module.exports = {
.example('aegir dependency-check -- --unused --ignore typescript', 'To check unused packages in your repo, ignoring typescript.')
.positional('input', {
describe: 'Files to check',
// @ts-ignore
type: 'array',
type: 'string',
array: true,
default: userConfig.dependencyCheck.input
})
.option('p', {
Expand All @@ -38,7 +38,7 @@ module.exports = {
.option('i', {
alias: 'ignore',
describe: 'Ignore these dependencies when considering which are used and which are not',
type: 'array',
array: true,
default: userConfig.dependencyCheck.ignore
})
},
Expand Down

0 comments on commit 4608c85

Please sign in to comment.