Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
privatenumber committed Jul 25, 2024
1 parent 2d8a7b6 commit 8aad462
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
"eslint8": "npm:eslint@^8.56.0",
"execa": "^8.0.1",
"find-up-simple": "^1.0.0",
"ignore": "^5.3.1",
"fs-fixture": "^2.4.0",
"ignore": "^5.3.1",
"lintroll": "^1.7.1",
"manten": "^1.3.0",
"outdent": "^0.8.0",
Expand Down
2 changes: 1 addition & 1 deletion src/rules/fix-later/utils/codeowner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const cache = new Map<string, string[][]>();
const getCodeOwnerForGitRepo = (
repoPath: string,
) => {
let codeOwners = cache.get(repoPath);
const codeOwners = cache.get(repoPath);
if (codeOwners) {
return codeOwners;
}
Expand Down
20 changes: 10 additions & 10 deletions tests/specs/insert-disable-comment/git-blame.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ export default testSuite(({ describe }, eslintPath: string) => {
}),
).rejects.toThrow('not a git repository');
});

// Setup git
await execa('git', ['init'], { cwd: fixture.path });
await execa('git', ['config', 'user.name', 'John Doe'], { cwd: fixture.path });
await execa('git', ['config', 'user.email', 'john@doe.org'], { cwd: fixture.path });

await execa('git', ['commit', '--allow-empty', '-m', 'test'], { cwd: fixture.path });

await test('Unchecked file', async () => {
await expect(
() => eslint(eslintPath, {
Expand All @@ -59,10 +59,10 @@ export default testSuite(({ describe }, eslintPath: string) => {
}),
).rejects.toThrow('no such path \'file.js\' in HEAD');
});

// Add file
await execa('git', ['add', 'file.js'], { cwd: fixture.path });

await test('Uncommitted file - gets current git user', async () => {
const result = await eslint(eslintPath, {
config: {
Expand All @@ -77,7 +77,7 @@ export default testSuite(({ describe }, eslintPath: string) => {
cwd: fixture.path,
fix: true,
});

expect(result.warningCount).toBe(1);
expect(result.errorCount).toBe(0);
expect(result.output).toBe(
Expand All @@ -86,9 +86,9 @@ export default testSuite(({ describe }, eslintPath: string) => {
`,
);
});

await execa('git', ['commit', '-am', 'a'], { cwd: fixture.path });

await test('Committed file', async () => {
const result = await eslint(eslintPath, {
config: {
Expand All @@ -103,7 +103,7 @@ export default testSuite(({ describe }, eslintPath: string) => {
cwd: fixture.path,
fix: true,
});

expect(result.warningCount).toBe(1);
expect(result.errorCount).toBe(0);
expect(result.output).toBe(
Expand All @@ -129,7 +129,7 @@ export default testSuite(({ describe }, eslintPath: string) => {
cwd: fixture.path,
fix: true,
});

expect(result.warningCount).toBe(1);
expect(result.errorCount).toBe(0);
expect(result.output).toBe(
Expand Down

0 comments on commit 8aad462

Please sign in to comment.