src/index.js
function resolveConfig({
    filePath,
    stylelintPath,
    stylelintConfig,
    prettierOptions
}) {
    const resolve = resolveConfig.resolve;
    const stylelint = requireRelative(stylelintPath, filePath, 'stylelint');
    const linterAPI = stylelint.createLinter();

    if (stylelintConfig) {
        return Promise.resolve(resolve(stylelintConfig, prettierOptions));
    }

    return linterAPI
        .getConfigForFile(filePath)
        .then(({ config }) => resolve(config, prettierOptions));
}
function resolveConfig({
    filePath,
    stylelintPath,
    stylelintConfig,
    prettierOptions
}) {
    const resolve = resolveConfig.resolve;
    const stylelint = requireRelative(stylelintPath, filePath, 'stylelint');
    const linterAPI = stylelint.createLinter();

    if (stylelintConfig) {
        return Promise.resolve(resolve(stylelintConfig, prettierOptions));
    }

    return linterAPI
        .getConfigForFile(filePath)
        .then(({ config }) => resolve(config, prettierOptions));
}
function resolveConfig ( { filePath , stylelintPath , stylelintConfig , prettierOptions } ) { const resolve = resolveConfig . resolve ; const stylelint = requireRelative ( stylelintPath , filePath , 'stylelint' ) ; const linterAPI = stylelint . createLinter ( ) ; if ( stylelintConfig ) { return Promise . resolve ( resolve ( stylelintConfig , prettierOptions ) ) ; } return linterAPI . getConfigForFile ( filePath ) . then ( ( { config } ) => resolve ( config , prettierOptions ) ) ; }
Resolve Config for the given file

@export
@param {string} file - filepath
@param {Object} options - options
@returns {Promise} -
Resolve Config for the given file