Skip to content

Commit f45e470

Browse files
Add cache CLI options for eslint
1 parent 47362f1 commit f45e470

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/Task/ESLint.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ public static function getConfigurableOptions(): ConfigOptionsResolver
3434
// ESLint native config options
3535
'config' => null,
3636
'ignore_path' => null,
37+
'cache' => null,
38+
'cache_location' => null,
3739
'debug' => false,
3840
'format' => null,
3941
'max_warnings' => null,
@@ -49,6 +51,8 @@ public static function getConfigurableOptions(): ConfigOptionsResolver
4951
// ESLint native config options
5052
$resolver->addAllowedTypes('config', ['null', 'string']);
5153
$resolver->addAllowedTypes('ignore_path', ['null', 'string']);
54+
$resolver->addAllowedTypes('cache', ['null', 'bool']);
55+
$resolver->addAllowedTypes('cache_location', ['null', 'string']);
5256
$resolver->addAllowedTypes('debug', ['bool']);
5357
$resolver->addAllowedTypes('format', ['null', 'string']);
5458
$resolver->addAllowedTypes('max_warnings', ['null', 'integer']);
@@ -82,6 +86,8 @@ public function run(ContextInterface $context): TaskResultInterface
8286

8387
$arguments->addOptionalArgument('--config=%s', $config['config']);
8488
$arguments->addOptionalArgument('--ignore-path=%s', $config['ignore_path']);
89+
$arguments->addOptionalArgument('--cache', $config['cache']);
90+
$arguments->addOptionalArgument('--cache-location=%s', $config['cache_location']);
8591
$arguments->addOptionalArgument('--debug', $config['debug']);
8692
$arguments->addOptionalArgument('--format=%s', $config['format']);
8793
$arguments->addOptionalArgument('--no-eslintrc', $config['no_eslintrc']);

0 commit comments

Comments
 (0)