CI: add TS indentation check via esLint (#24810)
This commit is contained in:
@@ -621,7 +621,7 @@ export default translation
|
||||
&& !trimmed.startsWith('//'))
|
||||
break
|
||||
}
|
||||
else {
|
||||
else {
|
||||
break
|
||||
}
|
||||
|
||||
|
@@ -60,7 +60,7 @@ describe('Description Validation Logic', () => {
|
||||
try {
|
||||
validateDescriptionLength(invalidDescription)
|
||||
}
|
||||
catch (error) {
|
||||
catch (error) {
|
||||
expect((error as Error).message).toBe(expectedErrorMessage)
|
||||
}
|
||||
})
|
||||
@@ -86,7 +86,7 @@ describe('Description Validation Logic', () => {
|
||||
expect(() => validateDescriptionLength(testDescription)).not.toThrow()
|
||||
expect(validateDescriptionLength(testDescription)).toBe(testDescription)
|
||||
}
|
||||
else {
|
||||
else {
|
||||
expect(() => validateDescriptionLength(testDescription)).toThrow(
|
||||
'Description cannot exceed 400 characters.',
|
||||
)
|
||||
|
@@ -39,7 +39,7 @@ describe('Document List Sorting', () => {
|
||||
const result = aValue.localeCompare(bValue)
|
||||
return order === 'asc' ? result : -result
|
||||
}
|
||||
else {
|
||||
else {
|
||||
const result = aValue - bValue
|
||||
return order === 'asc' ? result : -result
|
||||
}
|
||||
|
@@ -196,7 +196,7 @@ describe('Plugin Tool Workflow Integration', () => {
|
||||
const _pluginId = (tool.uniqueIdentifier as any).split(':')[0]
|
||||
}).toThrow()
|
||||
}
|
||||
else {
|
||||
else {
|
||||
// Valid tools should work fine
|
||||
expect(() => {
|
||||
const _pluginId = tool.uniqueIdentifier.split(':')[0]
|
||||
|
@@ -252,7 +252,7 @@ describe('Real Browser Environment Dark Mode Flicker Test', () => {
|
||||
|
||||
if (hasStyleChange)
|
||||
console.log('⚠️ Style changes detected - this causes visible flicker')
|
||||
else
|
||||
else
|
||||
console.log('✅ No style changes detected')
|
||||
|
||||
expect(timingData.length).toBeGreaterThan(1)
|
||||
|
@@ -15,7 +15,7 @@ const originalEnv = process.env.NEXT_PUBLIC_MAX_PARALLEL_LIMIT
|
||||
function setupEnvironment(value?: string) {
|
||||
if (value)
|
||||
process.env.NEXT_PUBLIC_MAX_PARALLEL_LIMIT = value
|
||||
else
|
||||
else
|
||||
delete process.env.NEXT_PUBLIC_MAX_PARALLEL_LIMIT
|
||||
|
||||
// Clear module cache to force re-evaluation
|
||||
@@ -25,7 +25,7 @@ function setupEnvironment(value?: string) {
|
||||
function restoreEnvironment() {
|
||||
if (originalEnv)
|
||||
process.env.NEXT_PUBLIC_MAX_PARALLEL_LIMIT = originalEnv
|
||||
else
|
||||
else
|
||||
delete process.env.NEXT_PUBLIC_MAX_PARALLEL_LIMIT
|
||||
|
||||
jest.resetModules()
|
||||
|
Reference in New Issue
Block a user