Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typo in eslint filter apply #6

Closed
oklas opened this issue Jun 4, 2020 · 0 comments
Closed

typo in eslint filter apply #6

oklas opened this issue Jun 4, 2020 · 0 comments

Comments

@oklas
Copy link
Owner

oklas commented Jun 4, 2020

@oklas This almost works, but there is one bug:

- if(rule.use && 0 < rule.use.filter(isRuleOfEslint)) return true
+ if(rule.use && 0 < rule.use.filter(isRuleOfEslint).length) return true

Otherwise, this function always returns false. You can easily test it like this:

module.exports = function override(config) {
    const configCopy = JSON.parse(JSON.stringify(config));

    aliasDangerous({
        ...configPaths('tsconfig.paths.json')
    })(config);

    console.log("These should be equivalent:")
    console.log(configCopy.module.rules[1].include);
    console.log(config.module.rules[1].include);

    return config;
}

Also note that you might have cache pollution and need to delete the .cache folder in node_modules. I opened a new PR with the fix for the fix and some documentation.

Originally posted by @JollyGoodHolly in oklas/react-app-rewire-alias#3 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant