Closed schw4rzlicht closed 2 years ago
Checklist
Tell us about your environment
Please show your full configuration:
require("@rushstack/eslint-patch/modern-module-resolution"); module.exports = { root: true, extends: [ "plugin:eslint-comments/recommended", "plugin:vue/vue3-strongly-recommended", "plugin:vue/vue3-recommended", "airbnb-typescript/base", "@vue/typescript/recommended", "@vue/prettier", "plugin:storybook/recommended", "plugin:markdown/recommended", "prettier", ], plugins: ["import"], parserOptions: { ecmaVersion: 2020, project: ["./tsconfig.json", "./tsconfig.vite-config.json"], }, settings: { "import/parsers": { "@typescript-eslint/parser": [".ts", ".tsx"], }, }, env: { node: true, es2021: true, "vue/setup-compiler-macros": true, }, rules: { "@typescript-eslint/quotes": ["error", "double", { allowTemplateLiterals: true, avoidEscape: true }], "max-len": ["error", 200, 4], "no-param-reassign": "off", "no-use-before-define": "off", "no-console": "error", "no-debugger": "error", "no-plusplus": "off", "@typescript-eslint/no-unused-vars": "error", "eslint-comments/disable-enable-pair": ["error", { allowWholeFile: true }], "vue/no-v-html": "error", }, overrides: [ { files: ["vite.config.ts", "tailwind.config.js"], rules: { "import/no-extraneous-dependencies": "off", }, }, ], };
What did you do?
export interface SomePropInterface { someProp?: false | string; } withDefaults(defineProps<SomePropInterface>(), { someProp: false, });
What did you expect to happen?
Assigning false to someProp as default value should be okay.
false
someProp
What actually happened?
ESLint: Type of the default value for 'someProp' prop must be a string.(vue/require-valid-default-prop)
Repository to reproduce this issue
I don't really think it's necessary but I will take the time to create one if really needed.
Thank you for the bug report. I started to fix it.
Checklist
Tell us about your environment
Please show your full configuration:
What did you do?
What did you expect to happen?
Assigning
false
tosomeProp
as default value should be okay.What actually happened?
ESLint: Type of the default value for 'someProp' prop must be a string.(vue/require-valid-default-prop)
Repository to reproduce this issue
I don't really think it's necessary but I will take the time to create one if really needed.