-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Apply prettier formatting (#13)
- Matching config from other projects
- Loading branch information
Showing
124 changed files
with
1,382 additions
and
1,385 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module.exports = { | ||
root: true, | ||
// This tells ESLint to load the config from the package `eslint-config-custom` | ||
extends: ["custom"], | ||
extends: ['custom'], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"trailingComma": "es5", | ||
"tabWidth": 2, | ||
"semi": true, | ||
"singleQuote": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
module.exports = { | ||
presets: [ | ||
['@babel/preset-env', {targets: {node: 'current'}}], | ||
'@babel/preset-typescript', | ||
], | ||
}; | ||
presets: [ | ||
['@babel/preset-env', { targets: { node: 'current' } }], | ||
'@babel/preset-typescript', | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
describe("describe block 1", () => { | ||
it("expect 1 to match 1", () => { | ||
describe('describe block 1', () => { | ||
it('expect 1 to match 1', () => { | ||
expect(1).toBe(1); | ||
}); | ||
|
||
it.todo("todo test"); | ||
it.todo('todo test'); | ||
|
||
it.skip("skipped test case", () => { | ||
it.skip('skipped test case', () => { | ||
expect(2).toBe(2); | ||
}); | ||
}); | ||
|
||
describe.skip("skipped describe block", () => { | ||
it("expect 3 to match 3", () => { | ||
describe.skip('skipped describe block', () => { | ||
it('expect 3 to match 3', () => { | ||
expect(3).toBe(3); | ||
}); | ||
|
||
it("expect 4 to match 4", () => { | ||
it('expect 4 to match 4', () => { | ||
expect(4).toBe(4); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { sum } from "./sum"; | ||
import { sum } from './sum'; | ||
|
||
test("adds 1 + 2 to equal 3", () => { | ||
test('adds 1 + 2 to equal 3', () => { | ||
expect(sum(1, 2)).toBe(3); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export function sum(a, b) { | ||
return a + b; | ||
} | ||
return a + b; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
jest.retryTimes(2); | ||
let j = 0; | ||
describe("Flaky", () => { | ||
it("should pass only on second run", async () => { | ||
describe('Flaky', () => { | ||
it('should pass only on second run', async () => { | ||
expect(j++).toEqual(1); | ||
}); | ||
|
||
it("AAA", async () => { | ||
it('AAA', async () => { | ||
expect(1).toEqual(1); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
jest.retryTimes(2); | ||
|
||
describe("Test cases with same title", () => { | ||
describe('Test cases with same title', () => { | ||
let j = 0; | ||
|
||
test("Test case example", () => { | ||
test('Test case example', () => { | ||
expect(j++).toBe(2); | ||
}); | ||
|
||
test.skip("Test case example", () => { | ||
test.skip('Test case example', () => { | ||
expect(1).toBe(1); | ||
}); | ||
|
||
test("Test case example", () => { | ||
test('Test case example', () => { | ||
expect(1).toBe(1); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
describe.skip("skipped block", () => { | ||
it("test inside skipped block", () => { | ||
describe.skip('skipped block', () => { | ||
it('test inside skipped block', () => { | ||
expect(1).toBe(1); | ||
}, 5000); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import { sum } from "./sum"; | ||
import { sum } from './sum'; | ||
|
||
test("[failed] adds 1 + 2 to equal 3", () => { | ||
test('[failed] adds 1 + 2 to equal 3', () => { | ||
expect(sum(1, 2)).toBe(4); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export function sum(a, b) { | ||
return a + b; | ||
} | ||
return a + b; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
describe("Test with @tag", () => { | ||
test("Test A @tagA", () => { | ||
describe('Test with @tag', () => { | ||
test('Test A @tagA', () => { | ||
expect(1).toBe(1); | ||
}); | ||
|
||
test.skip("Test B @tagB", () => { | ||
test.skip('Test B @tagB', () => { | ||
expect(1).toBe(1); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,26 @@ | ||
#!/usr/bin/env node | ||
|
||
const { execSync } = require("child_process"); | ||
const fs = require("fs"); | ||
const pkg = require("./package.json"); | ||
const { Command } = require("commander"); | ||
const { execSync } = require('child_process'); | ||
const fs = require('fs'); | ||
const pkg = require('./package.json'); | ||
const { Command } = require('commander'); | ||
|
||
const program = new Command() | ||
.name("publish") | ||
.option("-t, --tag <alpha | beta | latest>", "npm dist-tag to publish to"); | ||
.name('publish') | ||
.option('-t, --tag <alpha | beta | latest>', 'npm dist-tag to publish to'); | ||
|
||
program.parse(process.argv); | ||
const options = program.opts(); | ||
|
||
console.log(options); | ||
if (!options.tag) { | ||
console.log("No tag supplied: beta or latest"); | ||
console.log('No tag supplied: beta or latest'); | ||
process.exit(1); | ||
} | ||
console.log(process.cwd()); | ||
// fs.copyFileSync("./CHANGELOG.md", "./CHANGELOG.md"); | ||
fs.copyFileSync("../../LICENSE.md", "./LICENSE.md"); | ||
fs.copyFileSync('../../LICENSE.md', './LICENSE.md'); | ||
execSync(`npm pack --dry-run && npm publish --tag ${options.tag}`, { | ||
cwd: "./", | ||
stdio: "inherit", | ||
cwd: './', | ||
stdio: 'inherit', | ||
}); |
Oops, something went wrong.