Skip to content

Commit bf6eb25

Browse files
committedDec 8, 2020
Add processor option
Fixes #464
1 parent 7731ea1 commit bf6eb25

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed
 

Diff for: ‎lib/options-manager.js

+4
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,10 @@ const buildXOConfig = options => config => {
327327
config.baseConfig.parser = options.parser;
328328
}
329329

330+
if (options.processor) {
331+
config.baseConfig.processor = options.processor;
332+
}
333+
330334
config.baseConfig.settings = options.settings || {};
331335
config.baseConfig.settings['import/resolver'] = gatherImportResolvers(options);
332336

Diff for: ‎readme.md

+6
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,12 @@ Type: `string`
261261

262262
ESLint parser. For example, [`babel-eslint`](https://github.com/babel/babel-eslint) if you're using language features that ESLint doesn't yet support.
263263

264+
### processor
265+
266+
Type: `string`
267+
268+
[ESLint processor.](https://eslint.org/docs/user-guide/configuring#specifying-processor)
269+
264270
### esnext
265271

266272
Type: `boolean`\

Diff for: ‎test/options-manager.js

+6
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,12 @@ test('buildConfig: parser', t => {
384384
t.deepEqual(config.baseConfig.parser, parser);
385385
});
386386

387+
test('buildConfig: processor', t => {
388+
const processor = 'svelte3/svelte3';
389+
const config = manager.buildConfig({processor});
390+
t.deepEqual(config.baseConfig.processor, processor);
391+
});
392+
387393
test('buildConfig: settings', t => {
388394
const settings = {'import/resolver': {webpack: {}}};
389395
const config = manager.buildConfig({settings});

0 commit comments

Comments
 (0)
Please sign in to comment.