Skip to content

Commit 54bcadc

Browse files
andymaiclaude
andcommitted
Fix ESLint formatting issues in security tests
- Fix indentation to match codebase style - Remove trailing spaces - Add parentheses around arrow function parameters - Ensure consistent spacing 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent ee448c1 commit 54bcadc

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/src/core/importType.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ describe('isAbsolute', () => {
370370
expect(() => isAbsolute(false)).not.to.throw();
371371
expect(() => isAbsolute(0)).not.to.throw();
372372
expect(() => isAbsolute(NaN)).not.to.throw();
373-
});
373+
});
374374

375375
it('should not use dynamic regex patterns that could cause ReDoS vulnerabilities', function () {
376376
// Test that dangerous patterns are blocked by isDangerousPattern
@@ -385,8 +385,8 @@ describe('isAbsolute', () => {
385385
'a*', // Too short
386386
'ab*', // Too short
387387
];
388-
389-
dangerousPatterns.forEach(pattern => {
388+
389+
dangerousPatterns.forEach((pattern) => {
390390
const context = testContext({ 'import/core-modules': [pattern] });
391391
// These should all be blocked and not match anything
392392
expect(isBuiltIn('test-module', context.settings, null)).to.equal(false);
@@ -397,7 +397,6 @@ describe('isAbsolute', () => {
397397
it('should use safe glob matching instead of regex construction', function () {
398398
// Verify no dynamic regex patterns like [\\s\\S]*? are created
399399
const context = testContext({ 'import/core-modules': ['@my-monorepo/*'] });
400-
401400
// Valid patterns should work safely without regex construction
402401
expect(isBuiltIn('@my-monorepo/package-a', context.settings, null)).to.equal(true);
403402
expect(isBuiltIn('@my-monorepo/package-b', context.settings, null)).to.equal(true);

0 commit comments

Comments
 (0)