diff --git a/lib/options-manager.js b/lib/options-manager.js index 3c0759bb..2f46186a 100644 --- a/lib/options-manager.js +++ b/lib/options-manager.js @@ -293,6 +293,10 @@ Transform an XO options into ESLint compatible options: const buildConfig = (options, prettierOptions) => { options = normalizeOptions(options); + if (options.useEslintrc) { + throw new Error('The `useEslintrc` option is not supported'); + } + return flow( buildESLintConfig(options), buildXOConfig(options), diff --git a/test/options-manager.js b/test/options-manager.js index b22bc1d9..3d9a3220 100644 --- a/test/options-manager.js +++ b/test/options-manager.js @@ -462,6 +462,17 @@ test('buildConfig: parserOptions', t => { t.is(config.baseConfig.parserOptions.sourceType, 'script'); }); +test('buildConfig: prevents useEslintrc option', t => { + t.throws(() => { + manager.buildConfig({ + useEslintrc: true + }); + }, { + instanceOf: Error, + message: 'The `useEslintrc` option is not supported' + }); +}); + test('findApplicableOverrides', t => { const result = manager.findApplicableOverrides('/user/dir/foo.js', [ {files: '**/f*.js'},