Skip to content

Commit 49c4e0c

Browse files
committed
Lint fix
1 parent 1d3a48a commit 49c4e0c

3 files changed

Lines changed: 21 additions & 14 deletions

File tree

src/bin-support.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,14 @@ async function runTransform(binRoot, transformName, args, extensions = DEFAULT_E
2222
let jscodeshiftPath = path.dirname(require.resolve('jscodeshift/package'));
2323
let binPath = path.join(jscodeshiftPath, jscodeshiftPkg.bin.jscodeshift);
2424

25-
let binOptions = ['-t', transformPath, '--extensions', extensions, ...jsCodeShiftOptions, ...foundPaths];
25+
let binOptions = [
26+
'-t',
27+
transformPath,
28+
'--extensions',
29+
extensions,
30+
...jsCodeShiftOptions,
31+
...foundPaths,
32+
];
2633

2734
return execa(binPath, binOptions, {
2835
stdio: 'inherit',

src/options-support.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function extractJSCodeShiftOptions(options, codeShiftOptions = jsCodeShiftOption
2626
let cliOptions = Object.assign({}, options);
2727
let jsCodeShiftOptions = [];
2828
codeShiftOptions.forEach(option => {
29-
if(cliOptions.hasOwnProperty(option)) {
29+
if (Object.prototype.hasOwnProperty.call(cliOptions, option)) {
3030
let camelCaseOption = option.replace(/-([a-z])/g, (_, up) => up.toUpperCase());
3131
jsCodeShiftOptions.push(`--${option}`, options[option]);
3232
delete cliOptions[option];

tests/cli-test.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -463,12 +463,12 @@ QUnit.module('codemod-cli', function(hooks) {
463463
bar: { 'something.hbs': `<Foo />` },
464464
});
465465

466-
await CodemodCLI.runTransform(codemodProject.path('bin'), 'main', [
467-
'foo/**',
468-
'bar/**',
469-
'--ignore-pattern',
470-
'foo/'
471-
], 'hbs');
466+
await CodemodCLI.runTransform(
467+
codemodProject.path('bin'),
468+
'main',
469+
['foo/**', 'bar/**', '--ignore-pattern', 'foo/'],
470+
'hbs'
471+
);
472472

473473
assert.deepEqual(userProject.read(), {
474474
foo: { 'something.hbs': `<Foo />` },
@@ -495,12 +495,12 @@ QUnit.module('codemod-cli', function(hooks) {
495495
bar: { 'something.hbs': `<Foo />` },
496496
});
497497

498-
await CodemodCLI.runTransform(codemodProject.path('bin'), 'main', [
499-
'foo/**',
500-
'bar/**',
501-
'--ignore-config',
502-
'config/.gitignore'
503-
], 'hbs');
498+
await CodemodCLI.runTransform(
499+
codemodProject.path('bin'),
500+
'main',
501+
['foo/**', 'bar/**', '--ignore-config', 'config/.gitignore'],
502+
'hbs'
503+
);
504504

505505
assert.deepEqual(userProject.read(), {
506506
config: { '.gitignore': `foo/` },

0 commit comments

Comments
 (0)