diff --git a/lib/options-manager.js b/lib/options-manager.js index 0c81dc46..ffa8a67b 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 b9054e89..ba560aab 100644 --- a/test/options-manager.js +++ b/test/options-manager.js @@ -457,6 +457,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'},