mirror of
https://github.com/appium/appium.git
synced 2025-12-19 08:59:48 -06:00
31 lines
937 B
JavaScript
31 lines
937 B
JavaScript
import appiumConfig from '@appium/eslint-config-appium-ts';
|
|
import {defineConfig, globalIgnores} from 'eslint/config';
|
|
|
|
// Create a modified config subset for test support files:
|
|
// Extract the test file related configs (Mocha plugin and custom rules),
|
|
// then override their 'files' property
|
|
const testFileConfigItems = [appiumConfig[8], appiumConfig[9]];
|
|
const testSupportFiles = [
|
|
'packages/test-support/lib/**',
|
|
'packages/driver-test-support/lib/**',
|
|
'packages/plugin-test-support/lib/**',
|
|
];
|
|
const testSupportConfig = testFileConfigItems.map((item) => ({...item, files: testSupportFiles}));
|
|
|
|
export default defineConfig([
|
|
{
|
|
name: 'Base Config',
|
|
extends: [appiumConfig],
|
|
},
|
|
{
|
|
name: 'Test Support',
|
|
extends: [testSupportConfig],
|
|
},
|
|
globalIgnores([
|
|
'**/build-fixtures/**',
|
|
'packages/appium/docs/**/assets/**',
|
|
'packages/appium/docs/**/js/**',
|
|
'packages/appium/sample-code/**',
|
|
]),
|
|
]);
|