Skip to content

Commit

Permalink
Merge pull request #130 from webdriverio-community/upgrade-wdio-v8-ts
Browse files Browse the repository at this point in the history
Upgrade wdio v8 ts
  • Loading branch information
christian-bromann authored Dec 21, 2023
2 parents 9c05b68 + 6bad6bc commit 56585f6
Show file tree
Hide file tree
Showing 599 changed files with 33,180 additions and 37,489 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[{.babelrc,.eslintrc,.codeclimate.yml,*.json,.eslintrc.js}]
[{**/*.json,.github/**/*.yml}]
indent_size = 2
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
lib/resemble/
*.d.ts
75 changes: 75 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/** @type {import('eslint').Linter.Config} */
const config = {
root: true,
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'unicorn', 'import'],
extends: ['eslint:recommended'],
env: {
node: true,
es6: true,
},
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
},
rules: {
quotes: ['error', 'single', { avoidEscape: true }],
camelcase: ['error', { properties: 'never' }],
semi: ['error', 'never'],
indent: [2, 4],
eqeqeq: ['error', 'always'],

'prefer-const': 'error',
'no-multiple-empty-lines': [2, { max: 1, maxEOF: 1 }],
'array-bracket-spacing': ['error', 'never'],
'brace-style': ['error', '1tbs', { allowSingleLine: true }],
'comma-spacing': ['error', { before: false, after: true }],
'no-lonely-if': 'error',
'dot-notation': 'error',
'no-else-return': 'error',
'no-tabs': 'error',
'no-trailing-spaces': [
'error',
{
skipBlankLines: false,
ignoreComments: false,
},
],
'no-var': 'error',
'unicode-bom': ['error', 'never'],
curly: ['error', 'all'],
'object-curly-spacing': ['error', 'always'],
'keyword-spacing': ['error'],
'require-atomic-updates': 0,
'linebreak-style': ['error', 'unix'],
'unicorn/prefer-node-protocol': ['error'],
'import/extensions': ['error', 'ignorePackages'],
'no-restricted-syntax': [
'error',
'IfStatement > ExpressionStatement > AssignmentExpression',
],
'unicorn/prefer-ternary': 'error',
},
overrides: [
{
files: ['*.ts'],
rules: {
// see https://stackoverflow.com/questions/55280555/typescript-eslint-eslint-plugin-error-route-is-defined-but-never-used-no-un
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'error',
'@typescript-eslint/consistent-type-imports': 'error',
'no-undef': 'off',
// allow overloads
'no-redeclare': 'off',
},
},
{
files: ['*.test.ts'],
rules: {
'dot-notation': 'off',
},
},
],
}

module.exports = config
38 changes: 0 additions & 38 deletions .eslintrc.js

This file was deleted.

3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.ts text eol=lf
*.js text eol=lf
*.md text eol=lf
14 changes: 7 additions & 7 deletions .github/workflows/wdio-image-comparison-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@ jobs:
working-directory: ./
run: npm ci

- name: Run Unit Tests and generate coverage report
working-directory: ./
run: npm run test.unit.coverage
# - name: Run Unit Tests and generate coverage report
# working-directory: ./
# run: npm run test.unit.coverage

- name: Lint the code
working-directory: ./
run: npm run test.unit.coverage
# - name: Lint the code
# working-directory: ./
# run: npm run test.unit.coverage

- name: Lint the code
working-directory: ./
run: npm run lint
run: npm run test.eslint

- name: Compile the code
working-directory: ./
Expand Down
6 changes: 2 additions & 4 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
#!/bin/sh

npx lint-staged
npx lint-staged
git diff-index --cached --name-only --diff-filter=d HEAD | grep -E ".*\\.[cm]?[jt]sx?$" | xargs -r node_modules/eslint/bin/eslint.js
3 changes: 3 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

npm run test.eslint
3 changes: 0 additions & 3 deletions .prettierignore

This file was deleted.

6 changes: 0 additions & 6 deletions .prettierrc.json

This file was deleted.

18 changes: 18 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"],
"[javascript]": {
"editor.formatOnSave": false
},
"[javascriptreact]": {
"editor.formatOnSave": false
},
"[typescript]": {
"editor.formatOnSave": false
},
"[typescriptreact]": {
"editor.formatOnSave": false
}
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

![wdio-image-comparison workflow](https://github.com/wswebcreation/wdio-image-comparison-service/actions/workflows/wdio-image-comparison-service.yml/badge.svg)
[![codecov](https://codecov.io/gh/wswebcreation/wdio-image-comparison-service/branch/master/graph/badge.svg?token=6zGW0ccdqR)](https://codecov.io/gh/wswebcreation/wdio-image-comparison-service)
[![Build Status](https://app.eu-central-1.saucelabs.com/buildstatus/wdio-image-comparison-service)](https://app.eu-central-1.saucelabs.com/u/wdio-image-comparison-service)
[![NPM](https://nodei.co/npm/wdio-image-comparison-service.png)](https://nodei.co/npm/wdio-image-comparison-service/)

[![Browser Status](https://app.eu-central-1.saucelabs.com/browser-matrix/wdio-image-comparison-service.svg)](https://app.eu-central-1.saucelabs.com/u/wdio-image-comparison-service)
[![Build Status](https://app.eu-central-1.saucelabs.com/buildstatus/wdio-image-comparison-service)](https://app.eu-central-1.saucelabs.com/u/wdio-image-comparison-service)
[![Sauce Test Status](https://app.eu-central-1.com/browser-matrix/wdio-image-comparison-service)](https://app.eu-central-1.com/u/wdio-image-comparison-service)

> **NOTE for Windows users!!<br/>**
> Please check the [FAQ](./README.md#faq)
Expand Down
12 changes: 0 additions & 12 deletions babel.config.js

This file was deleted.

43 changes: 0 additions & 43 deletions demo.html

This file was deleted.

3 changes: 0 additions & 3 deletions lib/index.js

This file was deleted.

3 changes: 3 additions & 0 deletions lib/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import WdioICS from './service.js'

export default WdioICS
Loading

0 comments on commit 56585f6

Please sign in to comment.