FIX:TypeError: Cannot read property range of null from template-curly-spacing
升级[email protected]
之后,使用babel-eslint
提交代码执行git-hooks eslint
时候,报错:TypeError: Cannot read property 'range' of null from template-curly-spacing
可以尝试执行如下命令进行修复:
1 2 3 |
npm install --save-dev @babel/types@7.2.0 @babel/traverse@7.1.6 npm dedupe npm uninstall --save-dev @babel/types @babel/traverse |
参考 https://github.com/babel/babel-eslint/issues/530
如果上面的方法不奏效,建议把@babel/*
统一安装7.7.4
版本的,避免版本交叉即可解决。