I am seeing my eslint rules applied in VSCode however they are not working in Babel. I believe that I need to clear the cache, but I don't know how to do it.
Could you tell me how to do this?
rules
"@typescript-eslint/camelcase": ["warn"],
"camelcase": "off"
Babel output

vscode output

If you are using a babel.config.js file which looks like below. You can turn off the cache by passing false to api.cache(false)
module.exports = function (api) {
const presets = [
[
'@babel/preset-env',
{
useBuiltIns: 'usage',
corejs: { version: 3, proposals: true }
}
],
'@babel/preset-react',
'@babel/preset-flow'
];
const plugins = [
'lodash',
['@babel/plugin-transform-spread', { loose: true }],
['@babel/plugin-proposal-class-properties', { loose: true }],
'@babel/plugin-transform-runtime'
];
/** this is just for minimal working purposes,
* for testing larger applications it is
* advisable to cache the transpiled modules in
* node_modules/.bin/.cache/@babel/register* */
api.cache(false);
return {
presets,
plugins
};
};
You should delete .babel_cache folder that's create parallel to your output folder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With