diff --git a/cfg/_cnst.js b/cfg/_cnst.js index 9962ff4..6340530 100644 --- a/cfg/_cnst.js +++ b/cfg/_cnst.js @@ -1,6 +1,6 @@ module.exports = { prettierDirs: [ - 'src,scripts,e2e,playwright,docs,cfg,resources,.github,public,static,components,content,layouts,pages,plugins,middleware,store,blocks', + 'src,scripts,e2e,docs,cfg,resources,.github,public,static,components,content,layouts,pages,plugins,middleware,store,blocks', ], // ts,tsx,css,scss excluded, cause they need to run in special order (overlap between >1 tool): prettierExtensionsExclusive: 'js,jsx,json,md,graphql,yml,yaml,html', diff --git a/cfg/lint-staged.config.js b/cfg/lint-staged.config.js index 751788c..5fdf3b0 100644 --- a/cfg/lint-staged.config.js +++ b/cfg/lint-staged.config.js @@ -179,29 +179,6 @@ if (fs.existsSync(`./e2e`)) { }) } -// /playwright -if (fs.existsSync(`./playwright`)) { - const eslintConfigPathE2e = ['./playwright/eslint.config.js', './eslint.config.js'].find(p => - fs.existsSync(p), - ) - - Object.assign(linters, { - // biome, eslint, Prettier - './playwright/**/*.{ts,tsx}': match => { - const filesList = getFilesList(match) - if (!filesList) return [] - return [ - biomeCmd, - eslintConfigPathE2e && - `${eslintCmd} --config ${eslintConfigPathE2e} --parser-options=project:./playwright/tsconfig.json`, - prettierCmd, - ] - .filter(Boolean) - .map(s => `${s} ${filesList}`) - }, - }) -} - function getFilesList(match) { return micromatch.not(match, lintExclude).join(' ') } diff --git a/src/bin/dev-lib.ts b/src/bin/dev-lib.ts index ee5d532..6dfdd0b 100755 --- a/src/bin/dev-lib.ts +++ b/src/bin/dev-lib.ts @@ -30,7 +30,7 @@ const commands: (Command | Separator)[] = [ { name: 'tsc', fn: tscAll, - desc: 'Run tsc in folders (src, scripts, e2e, playwright) if there is tsconfig.json present', + desc: 'Run tsc in folders (src, scripts, e2e) if there is tsconfig.json present', }, { name: 'bt', fn: bt, desc: 'Build & Test: run "tsc" and then "test".' }, { name: 'lbt', fn: lbt, desc: 'Lint/Build/Test: run "lint", then "tsc", then "test".' }, @@ -163,8 +163,7 @@ async function bt(): Promise { } async function tscAll(): Promise { - // todo: remove playwright after it fully moves to e2e - await runTSCInFolders(['.', 'scripts', 'e2e', 'playwright'], ['--noEmit']) + await runTSCInFolders(['.', 'scripts', 'e2e'], ['--noEmit']) } function logEnvironment(): void { diff --git a/src/lint.util.ts b/src/lint.util.ts index ef720be..87dc1b6 100644 --- a/src/lint.util.ts +++ b/src/lint.util.ts @@ -123,14 +123,10 @@ export async function eslintAll(opt?: EslintAllOptions): Promise { './eslint.config.js', './eslint.config.cjs', ].find(p => fs.existsSync(p)) - const eslintConfigPathPlaywright = ['./playwright/eslint.config.js', './eslint.config.js'].find( - p => fs.existsSync(p), - ) const tsconfigPathScripts = [`./scripts/tsconfig.json`].find(p => fs.existsSync(p)) || `${scriptsDir}/tsconfig.json` const tsconfigPathE2e = `./e2e/tsconfig.json` - const tsconfigPathPlaywright = `./playwright/tsconfig.json` // todo: run on other dirs too, e.g pages, components, layouts @@ -142,14 +138,6 @@ export async function eslintAll(opt?: EslintAllOptions): Promise { runESLint(`./scripts`, eslintConfigPathScripts, tsconfigPathScripts, extensions, fix), // /e2e runESLint(`./e2e`, eslintConfigPathE2e, tsconfigPathE2e, extensions, fix), - // /playwright // todo: remove after migration to e2e folder is completed - runESLint( - `./playwright`, - eslintConfigPathPlaywright, - tsconfigPathPlaywright, - extensions, - fix, - ), ]) } else { // with no-fix - let's run serially @@ -159,14 +147,6 @@ export async function eslintAll(opt?: EslintAllOptions): Promise { await runESLint(`./scripts`, eslintConfigPathScripts, tsconfigPathScripts, extensions, fix) // /e2e await runESLint(`./e2e`, eslintConfigPathE2e, tsconfigPathE2e, extensions, fix) - // /e2e - await runESLint( - `./playwright`, - eslintConfigPathPlaywright, - tsconfigPathPlaywright, - extensions, - fix, - ) } console.log(`${boldGrey('eslint-all')} ${dimGrey(`took ` + _since(started))}`) @@ -325,7 +305,7 @@ export function runBiome(fix = true): void { return } - const dirs = [`src`, `scripts`, `e2e`, `playwright`].filter(d => fs.existsSync(d)) + const dirs = [`src`, `scripts`, `e2e`].filter(d => fs.existsSync(d)) exec2.spawn(`biome`, { args: [`lint`, fix && '--write', fix && '--unsafe', '--no-errors-on-unmatched', ...dirs].filter(