From a261ab881f55c6845720f950451fe5e22d7bbdcf Mon Sep 17 00:00:00 2001 From: Dan Flettre Date: Tue, 15 Jun 2021 18:35:19 -0500 Subject: [PATCH] resolve eslint config and plugins manually fixes #27 --- options.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/options.js b/options.js index 9e85992..dbd55f3 100644 --- a/options.js +++ b/options.js @@ -2,12 +2,21 @@ const pkg = require('./package.json') const stdVersion = require('standard/package.json').version const stdOpts = require('standard/options.js') +const standardConf = require('standard/eslintrc.json') + +const resolvedConf = { + extends: standardConf.extends.map(function (configName) { + return require.resolve(`eslint-config-${configName}`) + }) +} + const opts = Object.assign({}, stdOpts, { bugs: pkg.bugs.url, cmd: 'standardx', eslintConfig: { - baseConfig: require('standard/eslintrc.json'), - useEslintrc: true + baseConfig: resolvedConf, + useEslintrc: true, + resolvePluginsRelativeTo: __dirname }, homepage: pkg.homepage, tagline: 'Use JavaScript Standard Style (tweaked by standardx)',