typo in eslint filter apply
oklas opened this issue · 0 comments
oklas commented
@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)