Closed
Description
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have read the FAQ and my problem is not listed.
Repro
{
"rules": {
"@typescript-eslint/no-restricted-imports": "error"
}
}
OR extend the plugin:@typescript-eslint/all
config.
export default "test";
tsconfig.json
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx"
},
"include": ["src"]
}
Expected Result
No fatal errors.
Actual Result
Fatal error:
Oops! Something went wrong! :(
ESLint: 7.32.0
TypeError: Error while loading rule '@typescript-eslint/no-restricted-imports': Cannot convert undefined or null to object
Occurred while linting /src/test.tsx
at hasOwnProperty (<anonymous>)
at isObjectOfPaths (/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-restricted-imports.js:50:44)
at isOptionsArrayOfStringOrObject (/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-restricted-imports.js:56:9)
at getRestrictedPaths (/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-restricted-imports.js:65:9)
at create (/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-restricted-imports.js:97:33)
Additional Info
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
4.32.0 |
@typescript-eslint/parser |
4.32.0 |
TypeScript |
4.4.3 |
ESLint |
7.32.0 |
node |
14.17.5 |