Skip to content

Commit 04d528e

Browse files
committed
chore(deps): update devDeps
1 parent 1161b60 commit 04d528e

File tree

5 files changed

+886
-1284
lines changed

5 files changed

+886
-1284
lines changed

.githooks/pre-commit

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
npx --no-install lint-staged

package.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -35,37 +35,37 @@
3535
"prepublish": "npm run --if-present build",
3636
"test:updateSnapshot": "cross-env UPDATE_SNAPSHOT=1 npm test",
3737
"test": "mocha \"test/**/*.ts\"",
38-
"prettier": "prettier --write \"**/*.{js,jsx,ts,tsx,css}\"",
39-
"watch": "tsc -p . --watch"
38+
"watch": "tsc -p . --watch",
39+
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,css}\"",
40+
"prepare": "git config --local core.hooksPath .githooks"
4041
},
4142
"prettier": {
42-
"printWidth": 120,
4343
"singleQuote": false,
44-
"tabWidth": 4
44+
"printWidth": 120,
45+
"tabWidth": 4,
46+
"trailingComma": "none"
4547
},
4648
"devDependencies": {
47-
"@types/escape-string-regexp": "^0.0.32",
49+
"@types/escape-string-regexp": "^2.0.1",
4850
"@types/lodash.sortby": "^4.7.3",
4951
"@types/lodash.uniq": "^4.5.3",
5052
"@types/lodash.uniqwith": "^4.5.3",
51-
"@types/mocha": "^5.2.0",
52-
"@types/node": "^10.1.2",
53-
"cross-env": "^5.1.5",
54-
"husky": "^0.14.3",
55-
"lint-staged": "^7.1.2",
56-
"mocha": "^5.2.0",
57-
"prettier": "^1.12.1",
58-
"ts-node": "^6.0.3",
59-
"ts-node-test-register": "^3.0.0",
60-
"typescript": "^2.8.3"
53+
"@types/mocha": "^9.1.1",
54+
"@types/node": "^17.0.34",
55+
"cross-env": "^7.0.3",
56+
"lint-staged": "^12.4.1",
57+
"mocha": "^10.0.0",
58+
"prettier": "^2.6.2",
59+
"ts-node": "^10.7.0",
60+
"ts-node-test-register": "^10.0.0",
61+
"typescript": "^4.6.4"
6162
},
6263
"publishConfig": {
6364
"access": "public"
6465
},
6566
"lint-staged": {
6667
"*.{js,jsx,ts,tsx,css}": [
67-
"prettier --write",
68-
"git add"
68+
"prettier --write"
6969
]
7070
},
7171
"dependencies": {

src/regexp-string-matcher.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ const isEqualMatchPatternResult = (a: matchPatternResult, b: matchPatternResult)
5151
export const matchPatterns = (text: string, regExpLikeStrings: string[]): matchPatternResult[] => {
5252
const matchPatternResults: matchPatternResult[] = [];
5353
regExpLikeStrings
54-
.map(patternString => {
54+
.map((patternString) => {
5555
return createRegExp(patternString);
5656
})
57-
.forEach(regExp => {
57+
.forEach((regExp) => {
5858
const execallResults = execall(regExp, text);
5959
execallResults.forEach((result: { match: string; index: number; sub: string[] }) => {
6060
const match = result.match;

test/snapshot-test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ const fixturesDir = path.join(__dirname, "snapshots");
1515
*
1616
*/
1717
describe("Snapshot testing", () => {
18-
fs.readdirSync(fixturesDir).map(caseName => {
19-
it(`Test ${caseName}`, async function() {
18+
fs.readdirSync(fixturesDir).map((caseName) => {
19+
it(`Test ${caseName}`, async function () {
2020
const fixtureDir = path.join(fixturesDir, caseName);
2121
const inputText: string = fs.readFileSync(path.join(fixtureDir, "input.txt"), "utf-8");
2222
const inputPatterns: string[] = require(path.join(fixtureDir, "input-patterns.json"));
@@ -25,7 +25,7 @@ describe("Snapshot testing", () => {
2525
const outputForMachinePath = path.join(fixtureDir, "output-for-machine.json");
2626

2727
const humanResult = results
28-
.map(result => {
28+
.map((result) => {
2929
return `
3030
- match text: **${result.match}**
3131
- startIndex: **${result.startIndex}**

0 commit comments

Comments
 (0)