Merge pull request #2 from IT4Change/linting

refactor(other): fix linting
This commit is contained in:
mahula 2024-02-22 19:04:00 +01:00 committed by GitHub
commit 0a9ad44a38
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 472 additions and 471 deletions

View File

@ -1 +1,3 @@
build/
cypress/reports/
node_modules/

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
build/
cypress/reports/
node_modules/
.vuepress/.cache
.vuepress/.temp

View File

@ -1,41 +1,18 @@
import { addCucumberPreprocessorPlugin } from '@badeball/cypress-cucumber-preprocessor'
import webpack from '@cypress/webpack-preprocessor'
import { createEsbuildPlugin } from '@badeball/cypress-cucumber-preprocessor/esbuild'
import createBundler from '@bahmutov/cypress-esbuild-preprocessor'
import { defineConfig } from 'cypress'
const setupNodeEvents = async (on: Cypress.PluginEvents, config: Cypress.PluginConfigOptions) => {
await addCucumberPreprocessorPlugin(on, config, {
omitAfterRunHandler: true,
})
async function setupNodeEvents(
on: Cypress.PluginEvents,
config: Cypress.PluginConfigOptions,
): Promise<Cypress.PluginConfigOptions> {
await addCucumberPreprocessorPlugin(on, config)
on(
'file:preprocessor',
webpack({
webpackOptions: {
resolve: {
extensions: ['.ts', '.js'],
},
module: {
rules: [
{
test: /\.ts$/,
exclude: [/node_modules/],
use: [
{
loader: 'ts-loader',
},
],
},
{
test: /\.feature$/,
use: [
{
loader: '@badeball/cypress-cucumber-preprocessor/webpack',
options: config,
},
],
},
],
},
},
createBundler({
plugins: [createEsbuildPlugin(config)],
}),
)

View File

@ -1,3 +1,6 @@
/* eslint-disable @typescript-eslint/no-unsafe-call */
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable import/no-relative-parent-imports */
import { Given, When, Then } from '@badeball/cypress-cucumber-preprocessor'
import { loginPage } from '../../pages/LoginPage'

View File

@ -2,12 +2,7 @@
"compilerOptions": {
"target": "es5",
"lib": ["es5", "dom"],
"types": ["cypress", "node"],
"paths": {
"#pages/*": [
"../pages/*.ts"
]
},
"types": ["cypress", "node"]
},
"include": ["./**/*.ts"]
}

876
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -33,7 +33,7 @@
},
"devDependencies": {
"@badeball/cypress-cucumber-preprocessor": "^20.0.1",
"@cypress/webpack-preprocessor": "^6.0.1",
"@bahmutov/cypress-esbuild-preprocessor": "^2.2.0",
"@eslint-community/eslint-plugin-eslint-comments": "^4.1.0",
"@typescript-eslint/eslint-plugin": "^7.0.1",
"@typescript-eslint/parser": "^7.0.1",
@ -55,6 +55,7 @@
"ts-loader": "^9.5.1",
"typescript": "^5.3.3",
"vuepress": "^2.0.0-rc.0",
"vuepress-plugin-search-pro": "^2.0.0-rc.25",
"vuepress-theme-hope": "^2.0.0-rc.25"
},
"cypress-cucumber-preprocessor": {
@ -68,9 +69,5 @@
"enabled": true,
"output": "cypress/reports/messages/cucumber-messages.ndjson"
}
},
"dependencies": {
"@vuepress/theme-default": "^2.0.0-rc.15",
"vuepress-plugin-search-pro": "^2.0.0-rc.25"
}
}

View File

@ -1,7 +1,7 @@
{
"compilerOptions": {
"module": "ES2020",
"target": "ES2020",
"esModuleInterop": true,
"module": "nodenext",
"lib": ["ES2022", "dom"],
"strict": true,
"types": ["cypress", "node"]