Skip to content

Commit 1b2d600

Browse files
committed
Update Jest snapshots and configuration files
1 parent eec7bfd commit 1b2d600

8 files changed

Lines changed: 175 additions & 123 deletions

File tree

.eslintrc.js

Lines changed: 0 additions & 41 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ typings/
6464
**/build
6565
/*.js
6666
!babel.config.js
67-
!.eslintrc.js
67+
!eslintrc.config.js
6868
!jest.config.js
6969
!prettier.config.js
7070
package-lock.json

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v10.16.0
1+
22.19.0

eslint.config.js

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
const js = require('@eslint/js');
2+
const typescript = require('@typescript-eslint/eslint-plugin');
3+
const typescriptParser = require('@typescript-eslint/parser');
4+
const prettierConfig = require('eslint-config-prettier');
5+
6+
module.exports = [
7+
{
8+
ignores: ['build/**', 'coverage/**', 'node_modules/**', 'dist/**']
9+
},
10+
{
11+
files: ['src/**/*.ts', 'devtools/**/*.ts'],
12+
languageOptions: {
13+
parser: typescriptParser,
14+
parserOptions: {
15+
sourceType: 'module',
16+
project: './tsconfig.json',
17+
ecmaVersion: 2020
18+
},
19+
globals: {
20+
console: 'readonly',
21+
process: 'readonly'
22+
}
23+
},
24+
plugins: {
25+
'@typescript-eslint': typescript
26+
},
27+
rules: {
28+
...js.configs.recommended.rules,
29+
...typescript.configs.recommended.rules,
30+
...prettierConfig.rules,
31+
semi: ['error', 'never'],
32+
quotes: ['error', 'single', { avoidEscape: true }],
33+
indent: 'off',
34+
curly: 2,
35+
'no-multiple-empty-lines': [2, { max: 1, maxEOF: 1 }],
36+
'array-bracket-spacing': ['error', 'never'],
37+
'brace-style': ['error', '1tbs', { allowSingleLine: true }],
38+
camelcase: ['error', { properties: 'never' }],
39+
'comma-spacing': ['error', { before: false, after: true }],
40+
'no-lonely-if': 'error',
41+
'no-tabs': 'error',
42+
'no-trailing-spaces': ['error', {
43+
skipBlankLines: false,
44+
ignoreComments: false
45+
}],
46+
'unicode-bom': ['error', 'never'],
47+
'object-curly-spacing': ['error', 'always'],
48+
'require-atomic-updates': 0,
49+
'@typescript-eslint/explicit-function-return-type': 2,
50+
'@typescript-eslint/indent': 0,
51+
'@typescript-eslint/no-use-before-define': 0,
52+
'@typescript-eslint/no-explicit-any': 1,
53+
'@typescript-eslint/no-unused-vars': 1,
54+
'@typescript-eslint/no-unused-expressions': 1,
55+
'no-useless-assignment': 1,
56+
'no-case-declarations': 2
57+
}
58+
},
59+
{
60+
files: ['tests/**/*.ts'],
61+
languageOptions: {
62+
parser: typescriptParser,
63+
parserOptions: {
64+
sourceType: 'module',
65+
ecmaVersion: 2020
66+
},
67+
globals: {
68+
console: 'readonly',
69+
process: 'readonly',
70+
describe: 'readonly',
71+
it: 'readonly',
72+
test: 'readonly',
73+
expect: 'readonly',
74+
beforeEach: 'readonly',
75+
afterEach: 'readonly',
76+
beforeAll: 'readonly',
77+
afterAll: 'readonly'
78+
}
79+
},
80+
plugins: {
81+
'@typescript-eslint': typescript
82+
},
83+
rules: {
84+
...js.configs.recommended.rules,
85+
...typescript.configs.recommended.rules,
86+
...prettierConfig.rules,
87+
'@typescript-eslint/explicit-function-return-type': 0,
88+
semi: ['error', 'never'],
89+
quotes: ['error', 'single', { avoidEscape: true }],
90+
indent: 'off'
91+
}
92+
}
93+
];
94+

jest.config.js renamed to jest.config.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ module.exports = {
1717
moduleFileExtensions: ['js', 'ts'],
1818
transform: { '^.+\\.tsx?$': 'ts-jest' }
1919
}
20+

package.json

Lines changed: 49 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,51 @@
11
{
2-
"name": "tracelib",
3-
"version": "1.0.1",
4-
"description": "A Node.js library that provides Chrome DevTools trace models to parse arbitrary trace logs.",
5-
"main": "./build/src/index.js",
6-
"scripts": {
7-
"build": "run-s clean compile",
8-
"clean": "rm -rf build coverage",
9-
"compile": "NODE_ENV=production tsc",
10-
"prepublishOnly": "npm prune && run-s build",
11-
"release": "npm run release:patch",
12-
"release:patch": "np patch",
13-
"release:minor": "np minor",
14-
"release:major": "np major",
15-
"test": "run-s test:*",
16-
"test:lint": "run-p test:lint:*",
17-
"test:lint:eslint": "eslint --ext ts src devtools tests",
18-
"test:lint:tsc": "tsc",
19-
"test:unit": "jest --coverage",
20-
"watch": "tsc --watch"
21-
},
22-
"repository": {
23-
"type": "git",
24-
"url": "git+https://github.com/saucelabs/tracelib.git"
25-
},
26-
"keywords": [
27-
"chrome",
28-
"devtools"
29-
],
30-
"author": "Christian Bromann <christian@saucelabs.com>",
31-
"license": "Apache-2.0",
32-
"bugs": {
33-
"url": "https://github.com/saucelabs/tracelib/issues"
34-
},
35-
"homepage": "https://github.com/saucelabs/tracelib#readme",
36-
"devDependencies": {
37-
"@types/jest": "^24.0.16",
38-
"@typescript-eslint/eslint-plugin": "^1.13.0",
39-
"@typescript-eslint/parser": "^1.13.0",
40-
"eslint": "^6.1.0",
41-
"eslint-config-prettier": "^6.0.0",
42-
"eslint-plugin-prettier": "^3.1.0",
43-
"jest": "^24.8.0",
44-
"np": "^5.0.3",
45-
"npm-run-all": "^4.1.5",
46-
"prettier": "^1.18.2",
47-
"ts-jest": "^24.0.2",
48-
"typescript": "^3.5.3"
49-
}
2+
"name": "tracelib",
3+
"version": "1.0.1",
4+
"description": "A Node.js library that provides Chrome DevTools trace models to parse arbitrary trace logs.",
5+
"main": "./build/src/index.js",
6+
"scripts": {
7+
"build": "run-s clean compile",
8+
"clean": "rm -rf build coverage",
9+
"compile": "NODE_ENV=production tsc",
10+
"prepublishOnly": "npm prune && run-s build",
11+
"release": "npm run release:patch",
12+
"release:patch": "np patch",
13+
"release:minor": "np minor",
14+
"release:major": "np major",
15+
"test": "run-s test:*",
16+
"test:lint": "run-p test:lint:*",
17+
"test:lint:eslint": "eslint --ext ts src devtools tests",
18+
"test:lint:tsc": "tsc",
19+
"test:unit": "jest --coverage",
20+
"watch": "tsc --watch"
21+
},
22+
"repository": {
23+
"type": "git",
24+
"url": "git+https://github.com/saucelabs/tracelib.git"
25+
},
26+
"keywords": [
27+
"chrome",
28+
"devtools"
29+
],
30+
"author": "Christian Bromann <christian@saucelabs.com>",
31+
"license": "Apache-2.0",
32+
"bugs": {
33+
"url": "https://github.com/saucelabs/tracelib/issues"
34+
},
35+
"homepage": "https://github.com/saucelabs/tracelib#readme",
36+
"devDependencies": {
37+
"@eslint/js": "^10.0.0",
38+
"@types/jest": "^30.0.0",
39+
"@typescript-eslint/eslint-plugin": "^8.56.1",
40+
"@typescript-eslint/parser": "^8.56.1",
41+
"eslint": "^10.0.0",
42+
"eslint-config-prettier": "^10.1.8",
43+
"eslint-plugin-prettier": "^5.5.5",
44+
"jest": "^30.2.0",
45+
"np": "^11.0.2",
46+
"npm-run-all": "^4.1.5",
47+
"prettier": "^3.8.1",
48+
"ts-jest": "^29.4.6",
49+
"typescript": "^5.9.3"
50+
}
5051
}

tests/.eslintrc.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)