mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-10-06 02:49:56 +00:00
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:
parent
0b88342661
commit
11829f97ef
5 changed files with 5 additions and 5 deletions
|
|
@ -408,7 +408,7 @@ export const cppProvider = defineLanguage({
|
|||
'QApplication',
|
||||
],
|
||||
},
|
||||
],
|
||||
] satisfies AstFrameworkPatternConfig[],
|
||||
treeSitterQueries: CPP_QUERIES,
|
||||
typeConfig: cCppConfig,
|
||||
exportChecker: cCppExportChecker,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ export const phpProvider = defineLanguage({
|
|||
'#[Route(',
|
||||
],
|
||||
},
|
||||
],
|
||||
] satisfies AstFrameworkPatternConfig[],
|
||||
treeSitterQueries: PHP_QUERIES,
|
||||
typeConfig: phpConfig,
|
||||
exportChecker: phpExportChecker,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue