Closed rowrowrowrow closed 3 years ago
hi, sorry for the late! can you share your source code?
I also have this issue, I believe it was introduced by later versions of babel-eslint and perhaps due to duplicated instances of @babel/types
https://github.com/babel/babel-eslint/issues/681
sounds like that way. an example code can be helpful!
@aladdin-add I'm having the same problem. Seems like the problem is unused function parameters:
// exits with error: typeError: Cannot read property 'range' of null
export const startToolExercise = async (toolId: number): Promise<string> => {
return '1'
}
// works fine
export const startToolExercise = async (toolId: number): Promise<string> => {
toolId;
return '1'
}
I'm going to close the issue, as @MaffooBristol mentioned :the error is something related with babel-eslint, but not related to the plugin.
please upgrade to latest babel-eslint => @babel/eslint-parser to see if it has been fixed!
Tell us about your environment
"^6.8.0"
"^1.0.0"
module.exports = { "extends": ["react-app", "plugin:jsx-a11y/recommended"], "plugins": ["autofix", "jsx-a11y"], "rules": { "autofix/no-debugger": "error", "autofix/no-console": "error", "autofix/no-plusplus": "error", "autofix/no-unused-vars": "warn", } }
Expected behavior
run: 'eslint src' or 'eslint src --fix' expectation: Autofixes according to the defined rules
Actual behavior
typeError: Cannot read property 'range' of null Occurs while linting.....
Note: I've tried each plugin individually and it occurs for each plugin. I've tried other plugins and the error doesn't occur.