refactor(ingestion): apply satisfies AstFrameworkPatternConfig[] to remaining providers

The c-cpp, dart, php, ruby, and swift providers imported AstFrameworkPatternConfig
but never used it, which the root ESLint config flagged as a hard error in the
quality / lint CI gate.

Use the type the same way csharp/go/java/kotlin/python/rust/typescript already do —
as a satisfies assertion on the astFrameworkPatterns array. This both clears the
unused-import error and gives every provider compile-time validation of pattern
shape, narrowing the gap that the original review flagged about lost exhaustiveness
on the optional astFrameworkPatterns field.
This commit is contained in:
Gergo Magyar 2026-05-03 10:14:41 +01:00
parent 0b88342661
commit 11829f97ef
5 changed files with 5 additions and 5 deletions

View file

@ -408,7 +408,7 @@ export const cppProvider = defineLanguage({
'QApplication',
],
},
],
] satisfies AstFrameworkPatternConfig[],
treeSitterQueries: CPP_QUERIES,
typeConfig: cCppConfig,
exportChecker: cCppExportChecker,

View file

@ -129,7 +129,7 @@ export const dartProvider = defineLanguage({
reason: 'riverpod-pattern',
patterns: ['@riverpod', 'ref.watch', 'ref.read', 'AsyncNotifier', 'Notifier'],
},
],
] satisfies AstFrameworkPatternConfig[],
treeSitterQueries: DART_QUERIES,
typeConfig: dartConfig,
exportChecker: dartExportChecker,

View file

@ -274,7 +274,7 @@ export const phpProvider = defineLanguage({
'#[Route(',
],
},
],
] satisfies AstFrameworkPatternConfig[],
treeSitterQueries: PHP_QUERIES,
typeConfig: phpConfig,
exportChecker: phpExportChecker,

View file

@ -176,7 +176,7 @@ export const rubyProvider = defineLanguage({
reason: 'sinatra-pattern',
patterns: ['Sinatra::Base', 'Sinatra::Application'],
},
],
] satisfies AstFrameworkPatternConfig[],
treeSitterQueries: RUBY_QUERIES,
typeConfig: rubyConfig,
exportChecker: rubyExportChecker,

View file

@ -313,7 +313,7 @@ export const swiftProvider = defineLanguage({
reason: 'vapor-routing',
patterns: ['app.get', 'app.post', 'req.content.decode', 'Vapor'],
},
],
] satisfies AstFrameworkPatternConfig[],
treeSitterQueries: SWIFT_QUERIES,
typeConfig: swiftConfig,
exportChecker: swiftExportChecker,