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
What did you expect to happen?
Just report the error, but not eslint exception
What actually happened?
when runing ./node_modules/.bin/eslint null-type-error.vue, eslint throws exception, see below.
TypeError: Cannot read property 'type' of null
Occurred while linting /xxxx/eslint-plugin-vue-bug/null-type-error.vue:6
at isForbiddenType (/xxxx/eslint-plugin-vue-bug/node_modules/eslint-plugin-vue/lib/rules/require-prop-type-constructor.js:22:61)
at node.elements.filter.prop (/xxxx/eslint-plugin-vue-bug/node_modules/eslint-plugin-vue/lib/rules/require-prop-type-constructor.js:61:27)
at Array.filter (<anonymous>)
at checkPropertyNode (/xxxx/eslint-plugin-vue-bug/node_modules/eslint-plugin-vue/lib/rules/require-prop-type-constructor.js:61:12)
at utils.executeOnVueComponent (/xxxx/eslint-plugin-vue-bug/node_modules/eslint-plugin-vue/lib/rules/require-prop-type-constructor.js:79:11)
at ExportDefaultDeclaration:exit (/xxxx/eslint-plugin-vue-bug/node_modules/eslint-plugin-vue/lib/utils/index.js:666:9)
at listeners.(anonymous function).forEach.listener (/xxxx/eslint-plugin-vue-bug/node_modules/eslint/lib/util/safe-emitter.js:45:58)
at Array.forEach (<anonymous>)
at Object.emit (/xxxx/eslint-plugin-vue-bug/node_modules/eslint/lib/util/safe-emitter.js:45:38)
at NodeEventGenerator.applySelector (/xxxx/eslint-plugin-vue-bug/node_modules/eslint/lib/util/node-event-generator.js:251:26)
in file node_modules/eslint-plugin-vue/lib/rules/require-prop-type-constructor.js
}elseif(node.type==='ArrayExpression'){node.elements.filter(prop=>isForbiddenType(prop))// <------ prop maybe null here when prop type is [,,]
The text was updated successfully, but these errors were encountered:
Tell us about your environment
Please show your full configuration:
What did you do?
What did you expect to happen?
Just report the error, but not eslint exception
What actually happened?
when runing
./node_modules/.bin/eslint null-type-error.vue
, eslint throws exception, see below.in file
node_modules/eslint-plugin-vue/lib/rules/require-prop-type-constructor.js
The text was updated successfully, but these errors were encountered: