no-unused-components with class-components does not work
See original GitHub issue.eslintrc.js:
module.exports = {
root: true,
env: {
node: true
},
'extends': [
'plugin:vue/essential',
'@vue/standard',
'@vue/typescript'
],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
},
parserOptions: {
parser: '@typescript-eslint/parser'
}
}
**eslint-plugin-vue version: ** ^5.0.0
Node version: v8.12.0
My Actions:
1. Created new vue-cli project
2. Created component
<template>
<div>
</div>
</template>
<script lang="ts">
import { Component, Prop, Vue } from 'vue-property-decorator'
import TestComponent from '@/components/TestComponent.vue'
@Component({
components: { TestComponent }
})
export default class HelloWorld extends Vue {
}
</script>
- Ran linter with command: ‘vue-cli-service lint’
What actually happened?:
linter log: DONE No lint errors found!
Expecting Error:
Component TestComponent
was registered, but never used
Issue Analytics
- State:
- Created 5 years ago
- Reactions:8
- Comments:5 (1 by maintainers)
Top Results From Across the Web
TypeScript errors in React Class Component property does ...
I'm currently getting a TypeScript error when trying to dynamically setState that says Property 'input' does not exist on type 'Readonly<{}>' .
Read more >The Eight Parts of Speech - TIP Sheets - Butte College
Proper nouns always start with a capital letter; common nouns do not. Nouns can be singular or plural, concrete or abstract. Nouns show...
Read more >Understanding Functional Components vs. Class ... - Twilio
Understand the differences between functional and class components with sample code so that you can dive into the world of modern React!
Read more >How to Use Props to Pass Data to Child Components in React.js
The last step is to access the props in the child component. In function components, we access the props through the first function...
Read more >Grammar: Main Parts of Speech - Academic Guides
Nouns are typically used as subjects, objects, objects of prepositions, and modifiers of ... However, the cause of the problem has not been...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@negibouze Has a great solution but it didn’t work for me because I was using the following ESLint config
So I updated his rule and the updated code is here - https://gist.github.com/NikhilVerma/7613191dfffb38011ebb3c95468a423a
Follow his repo example to see how to use it : https://github.com/negibouze/customize-no-unused-components-rule
No progress has been made on this so far.