// Render ESLint config
if (needsEslint) {
- renderEslint(root, { needsTypeScript, needsCypress, needsCypressCT, needsPrettier })
+ renderEslint(root, {
+ needsTypeScript,
+ needsCypress,
+ needsCypressCT,
+ needsPrettier,
+ needsPlaywright
+ })
}
// Render code template.
export default function renderEslint(
rootDir,
- { needsTypeScript, needsCypress, needsCypressCT, needsPrettier }
+ { needsTypeScript, needsCypress, needsCypressCT, needsPrettier, needsPlaywright }
) {
const additionalConfig: Linter.Config = {}
const additionalDependencies = {}
additionalDependencies['eslint-plugin-cypress'] = eslintDeps['eslint-plugin-cypress']
}
+ if (needsPlaywright) {
+ additionalConfig.overrides = [
+ {
+ files: ['e2e/**/*.{test,spec}.{js,ts,jsx,tsx}'],
+ extends: ['plugin:playwright/recommended']
+ }
+ ]
+
+ additionalDependencies['eslint-plugin-playwright'] = eslintDeps['eslint-plugin-playwright']
+ }
+
const { pkg, files } = createESLintConfig({
vueVersion: '3.x',
// we currently don't support other style guides