mirror of
https://github.com/smartxworks/sunmao-ui.git
synced 2024-11-21 03:15:49 +08:00
add noUnusedLocals to tsconfig
This commit is contained in:
parent
fd3f27a9e9
commit
3563b0af25
@ -1,7 +1,6 @@
|
||||
import { createTrait } from '@meta-ui/core';
|
||||
import { Static, Type } from '@sinclair/typebox';
|
||||
import { TraitImplementation } from '../../registry';
|
||||
import { stateStore } from '../../store';
|
||||
|
||||
const HasInitializedMap = new Map<string, boolean>();
|
||||
|
||||
@ -17,7 +16,6 @@ const useStateTrait: TraitImplementation<{
|
||||
if (!hasInitialized) {
|
||||
mergeState({ [key]: initialValue });
|
||||
|
||||
const upperCaseKey = capitalizeFirstLetter(key);
|
||||
const methods = {
|
||||
setValue({ key, value }: KeyValue) {
|
||||
mergeState({ [key]: value });
|
||||
@ -35,10 +33,6 @@ const useStateTrait: TraitImplementation<{
|
||||
};
|
||||
};
|
||||
|
||||
function capitalizeFirstLetter(str: string) {
|
||||
return str.charAt(0).toUpperCase() + str.slice(1);
|
||||
}
|
||||
|
||||
const KeyPropertySchema = Type.String();
|
||||
const InitialValuePropertySchema = Type.Any();
|
||||
|
||||
|
@ -13,7 +13,9 @@
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"noEmit": true,
|
||||
"jsx": "react"
|
||||
"jsx": "react",
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true
|
||||
},
|
||||
"include": ["./src"]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user