- pnpm --filter '!*typescript*' build
- pnpm --filter '*typescript*' build
- pnpm --filter '*vitest*' test:unit
- - pnpm --filter '*eslint*' lint --no-fix --max-warnings=0
+ - pnpm --filter '*eslint*' --filter '!*nightwatch*' lint --no-fix --max-warnings=0
- pnpm --filter '*prettier*' format --write --check
# FIXME: it's failing now
# - pnpm --filter '*with-tests*' test:unit
describe('renderEslint', () => {
it('should get additional dependencies and config with no test flags', () => {
const additionalConfigs = getAdditionalConfigs({
+ needsTypeScript: false,
needsVitest: false,
needsCypress: false,
needsCypressCT: false,
it('should get additional dependencies and config with for vitest', () => {
const additionalConfigs = getAdditionalConfigs({
+ needsTypeScript: false,
needsVitest: true,
needsCypress: false,
needsCypressCT: false,
it('should get additional dependencies and config with for cypress', () => {
const additionalConfigs = getAdditionalConfigs({
+ needsTypeScript: false,
needsVitest: false,
needsCypress: true,
needsCypressCT: false,
it('should get additional dependencies and config with for cypress with component testing', () => {
const additionalConfigs = getAdditionalConfigs({
+ needsTypeScript: false,
needsVitest: false,
needsCypress: true,
needsCypressCT: true,
it('should get additional dependencies and config with for playwright', () => {
const additionalConfigs = getAdditionalConfigs({
+ needsTypeScript: false,
needsVitest: false,
needsCypress: false,
needsCypressCT: false,
'cypress',
'playwright',
'nightwatch',
+ 'eslint',
]
const featureFlagsDenylist = [
['cypress', 'playwright'],
}
let flagCombinations = fullCombination(featureFlags)
-flagCombinations.push(['default'], ['bare', 'default'], ['eslint'], ['eslint-with-prettier'])
+flagCombinations.push(['default'], ['bare', 'default'], ['eslint-with-prettier'])
// `--with-tests` are equivalent of `--vitest --cypress`
// Previously it means `--cypress` without `--vitest`.
"vitest.config.*",
"cypress.config.*",
"nightwatch.conf.*",
- "playwright.config.*"
+ "playwright.config.*",
+ "eslint.config.*"
],
"compilerOptions": {
"noEmit": true,
},
) {
const additionalConfigs = getAdditionalConfigs({
+ needsTypeScript,
needsVitest,
needsCypress,
needsCypressCT,
// visible for testing
export function getAdditionalConfigs({
+ needsTypeScript,
needsVitest,
needsCypress,
needsCypressCT,
},
afterVuePlugin: [
{
- importer: "import pluginCypress from 'eslint-plugin-cypress/flat'",
+ importer:
+ (needsTypeScript
+ ? `// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n` +
+ `// @ts-ignore\n`
+ : '') + "import pluginCypress from 'eslint-plugin-cypress/flat'",
content: `
{
...pluginCypress.configs.recommended,
files: [
${[
- ...(needsCypressCT ? ["'**/__tests__/*.{cy,spec}.{js,ts,jsx,tsx}',"] : []),
+ ...(needsCypressCT ? ['**/__tests__/*.{cy,spec}.{js,ts,jsx,tsx}'] : []),
'cypress/e2e/**/*.{cy,spec}.{js,ts,jsx,tsx}',
'cypress/support/**/*.{js,ts,jsx,tsx}',
]