Update rules
This commit is contained in:
@ -29,8 +29,6 @@ export default createRule<Option[], MessageId>({
|
||||
type: 'problem',
|
||||
docs: {
|
||||
description: 'Enforce template literal expressions to be of `string` type',
|
||||
recommended: 'recommended',
|
||||
requiresTypeChecking: true,
|
||||
},
|
||||
messages: {
|
||||
invalidType: 'Invalid type "{{type}}" of template literal expression.',
|
||||
@ -55,6 +53,8 @@ export default createRule<Option[], MessageId>({
|
||||
defaultOptions: [defaultOption],
|
||||
create(context, [options]) {
|
||||
const services = getParserServices(context);
|
||||
if (!services.program) return {};
|
||||
|
||||
const checker = services.program.getTypeChecker();
|
||||
const allowed = new Set(options.allow);
|
||||
|
||||
|
Reference in New Issue
Block a user