webdriverio/eslint.config.mjs
Christian Bromann a2ae35332f
chore: upgrade to Eslint v9 (#13867)
* chore: upgrade to Eslint v9

* fix remaining issues

* more type fixes

* resolve remaining issues

* use wdio eslint package

* PR feedback
2024-12-18 11:55:43 -08:00

72 lines
1.9 KiB
JavaScript

import wdioEslint, { globals } from '@wdio/eslint'
export default wdioEslint.config([
{
/**
* Eslint ignore patterns for the whole project
*/
ignores: [
'packages/**/build',
'packages/**/cjs',
'packages/**/node_modules',
'packages/node_modules',
'packages/**/coverage',
'tests/typings',
'**/*.d.ts',
'packages/wdio-protocols/src/protocols/webdriverBidi.ts',
'packages/webdriverio/third_party/fake-timers.js',
'packages/wdio-protocols/src/commands'
],
},
{
/**
* Eslint rules for /example directory and unit tests
*/
files: [
'examples/**/*.ts',
'examples/**/*.js',
'packages/**/*.test.ts',
'packages/**/tests/**/*.ts'
],
languageOptions: {
globals: {
...globals.mocha,
...globals.jasmine,
browser: true,
$: true
}
},
rules: {
'no-undef': 'off',
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'wdio/no-pause': 'off',
'wdio/no-debug': 'off',
}
},
{
/**
* Eslint rules for /tests folder
*/
files: [
'tests/**/*.ts',
'tests/**/*.js',
],
languageOptions: {
globals: {
...globals.mocha,
...globals.jasmine,
browser: true,
$: true
}
},
rules: {
'dot-notation': 'off',
'wdio/no-pause': 'off',
'wdio/no-debug': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-require-imports': 'off',
}
}
])