Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: format all code with prettier #209

Merged
merged 1 commit into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/lib
26 changes: 11 additions & 15 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
{
"root": true,
"env": {
"es2022": true,
"node": true,
"jest/globals": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
"plugins": [
"jest",
"testcafe",
"@typescript-eslint"
],
"rules": {
"@typescript-eslint/no-var-requires": "off"
},
"env": {
"jest/globals": true
},
"ignorePatterns": ["lib/"],
"parser": "@typescript-eslint/parser",
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
}
}
"rules": {
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-var-requires": "warn"
}
}
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/lib
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": true
}
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
presets: [['@babel/preset-env', {targets: {node: 'current'}}]],
presets: [['@babel/preset-env', { targets: { node: 'current' } }]],
};
4 changes: 2 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ const config = {
collectCoverage: true,
preset: 'ts-jest',
transformIgnorePatterns: [
'/node_modules/(?!(axios)/)' // Uses module import statements, which aren't supported by jest, so it has to be transformed by babel.
]
'/node_modules/(?!(axios)/)', // Uses module import statements, which aren't supported by jest, so it has to be transformed by babel.
],
};

module.exports = config;
160 changes: 140 additions & 20 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"scripts": {
"build": "tsc && cp src/sauce-testcafe-config.cjs lib/",
"test": "node lib/console-wrapper.js",
"lint": "eslint tests/ src/**/*.ts",
"lint": "prettier --check '**/*.{js,ts,mjs,cjs}' && eslint .",
"fmt": "prettier --write '**/*.{js,ts,mjs,cjs}'",
"unit-test": "jest --env node",
"integration-test": "bash ./tests/run.sh"
},
Expand Down Expand Up @@ -45,13 +46,16 @@
"@typescript-eslint/eslint-plugin": "^6.8.0",
"@typescript-eslint/parser": "^6.8.0",
"babel-jest": "^29.7.0",
"eslint": "^8.51.0",
"eslint": "^8.52.0",
"eslint-config-appium": "^4.7.0",
"eslint-plugin-jest": "^27.4.2",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-jest": "^27.4.3",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-testcafe": "^0.2.1",
"husky": "^8.0.3",
"jest": "^29.7.0",
"mocha": "^10.2.0",
"prettier": "^3.0.3",
"release-it": "^16.2.1",
"ts-jest": "^29.1.1"
}
Expand Down
Loading