Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

TS6133: 'xxx' is declared but its value is never read #426

Open
zhouxiang1991 opened this issue Jun 20, 2022 · 0 comments
Open

TS6133: 'xxx' is declared but its value is never read #426

zhouxiang1991 opened this issue Jun 20, 2022 · 0 comments

Comments

@zhouxiang1991
Copy link

zhouxiang1991 commented Jun 20, 2022

I am using typescript+vue2+script setup+vue-property-decorator.
I have to open typescipt compilerOptions.noUnusedLocals and disable '@typescript-eslint/no-unused-vars' rule to adapter scrip setup grammar,but an error occurs: 'TS6133: xxx is declared but its value is never read' is happen.
What should i do ?

eslintrc.js

{
	rules: [
		'@typescript-eslint/no-unused-vars': [0],
		...
	]	
}

tsconfig.json

{
	"compilerOptions":  {
		"noUnusedLocals": true
		...
	}
}

*.vue

export default class List extends Vue {
	private loading: boolean = true
	...
  	private created() {
		//. to do
	}
	...
}

console

TS:6133 'loading' is declared but its value is never read.
  > 165 |   private loading: boolean = true
TS:6133  'created' is declared but its value is never read.
  > 201 |   private created() {
@zhouxiang1991 zhouxiang1991 changed the title i am using typescript+vue2+script setup, i have to open typescipt compilerOptions.noUnusedLocals and disable '@typescript-eslint/no-unused-vars' rule to adapter scrip setup grammar,but an error occurs: 'TS6133: 'xxx' is declared but its value is never read is happen'. what should i do ? TS6133: 'xxx' is declared but its value is never read Jun 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant