You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeError: Cannot read property 'kind' of null
Occurred while linting /Users/john.louderback/Documents/Git/headless-frontend/src/models/Product/Props/Gender.ts:2
at isGetter (/Users/john.louderback/Documents/Git/headless-frontend/node_modules/eslint-plugin-jsdoc/dist/jsdocUtils.js:1239:30)
at Object.exemptSpeciaMethods (/Users/john.louderback/Documents/Git/headless-frontend/node_modules/eslint-plugin-jsdoc/dist/jsdocUtils.js:1276:120)
at Object.utils.avoidDocs (/Users/john.louderback/Documents/Git/headless-frontend/node_modules/eslint-plugin-jsdoc/dist/iterateJsdoc.js:486:29)
at canSkip (/Users/john.louderback/Documents/Git/headless-frontend/node_modules/eslint-plugin-jsdoc/dist/rules/requireReturns.js:33:26)
at _default.contextDefaults (/Users/john.louderback/Documents/Git/headless-frontend/node_modules/eslint-plugin-jsdoc/dist/rules/requireReturns.js:47:7)
at iterate (/Users/john.louderback/Documents/Git/headless-frontend/node_modules/eslint-plugin-jsdoc/dist/iterateJsdoc.js:793:3)
at checkJsdoc (/Users/john.louderback/Documents/Git/headless-frontend/node_modules/eslint-plugin-jsdoc/dist/iterateJsdoc.js:1095:9)
at /Users/john.louderback/Documents/Git/headless-frontend/node_modules/eslint/lib/linter/safe-emitter.js:45:58
at Array.forEach (<anonymous>)
at Object.emit (/Users/john.louderback/Documents/Git/headless-frontend/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
Expected behavior
The file Gender.ts should lint.
Actual behavior
The above exception is thrown while linting.
ESLint Config
/** * Examples of functions that would match as a Functional Component: * `const component = (): Element => {};` * `const component = (): React.Element => {};` * `const component = (): Component => {};` * `const component = (): React.Component => {};` * `const component: FC = () => {};` * `const component: React.FC = () => {};` * `const component: FunctionComponent = () => {};` * `const component: React.FunctionComponent = () => {};` */constfunctionalComponentsSelector=// Handles functional components declared like: `const component = (): Element => {};`'[returnType.typeAnnotation.typeName.name=/Element|Component$/],'+// Handles functional components declared like: `const component: FunctionComponent = () => {};`'VariableDeclarator[id.typeAnnotation.typeAnnotation.typeName.name=/FC|FunctionComponent$/] > :function,'+// Handles functional components declared like: `const component = (): React.Element => {};`'[returnType.typeAnnotation.typeName.right.name=/Element|Component$/],'+// Handles functional components declared like: `const component: React.FunctionComponent = () => {};`'VariableDeclarator[id.typeAnnotation.typeAnnotation.typeName.right.name=/FC|FunctionComponent$/] > :function';module.exports={env: {browser: true,es6: true},parserOptions: {ecmaFeatures: {jsx: true},ecmaVersion: 2019,sourceType: 'module'},globals: {Atomics: 'readonly',SharedArrayBuffer: 'readonly'},plugins: ['jsdoc'],rules: {'jsdoc/no-types': 2,'jsdoc/require-asterisk-prefix': 2,'jsdoc/require-description': 2,'jsdoc/require-hyphen-before-param-description': 1,'jsdoc/require-param': [2,{checkDestructured: false,unnamedRootBase: ['props','args'],/** * This excludes React functional components from requiring documentation * around their params, since they're always the props for that component. */contexts: [':not(:matches('+functionalComponentsSelector+'))[params]']}],'jsdoc/require-param-description': 2,'jsdoc/require-param-name': 2,'jsdoc/require-property': 2,'jsdoc/require-property-description': 2,'jsdoc/require-returns': [2,{/** * This excludes React functional components from requiring documentation * around their return types, since it's extraneous and implicit. */contexts: [':not(:matches('+functionalComponentsSelector+'))']}],'jsdoc/require-returns-check': 2,'jsdoc/require-returns-description': 2,'jsdoc/require-throws': 2,'jsdoc/require-yields': 2,'jsdoc/require-yields-check': 2,'jsdoc/check-syntax': 2,'jsdoc/check-tag-names': 2,'jsdoc/require-jsdoc': [2,{publicOnly: false,checkGetters: 'no-setter',enableFixer: true,contexts: [// Require JS Doc on any non-nested function.':function:not(:matches(:function :function))',// Require JS Doc for interfaces."TSInterfaceDeclaration:not([id.name=/Props$/])",// Require JS Doc for type aliases.'TSTypeAliasDeclaration',// Require JS Doc for enums.'TSEnumDeclaration',// Require JS Doc for interface properties.{context: 'TSInterfaceDeclaration TSPropertySignature',inlineCommentBlock: true},// Require JS Doc for public class properties.{context: 'PropertyDefinition[accessibility="public"]',inlineCommentBlock: true}],require: {// Arrow function documentation is handled in "contexts" above.ArrowFunctionExpression: false,ClassDeclaration: true,ClassExpression: true,FunctionDeclaration: true,FunctionExpression: true,MethodDefinition: true}}],'jsdoc/require-description-complete-sentence': 1},settings: {'import/resolver': {typescript: {project: '.'}},jsdoc: {mode: 'typescript'}}};
ESLint sample
/** Enumerates possible genders for a product's target demographic. */enumGender{Unisex,Mens,Women}exportdefaultGender;
Environment
Node version: v14.17.3
ESLint version v7.29.0
eslint-plugin-jsdoc version: ^37.6.1
The text was updated successfully, but these errors were encountered:
Expected behavior
The file
Gender.ts
should lint.Actual behavior
The above exception is thrown while linting.
ESLint Config
ESLint sample
Environment
eslint-plugin-jsdoc
version: ^37.6.1The text was updated successfully, but these errors were encountered: