Skip to content

Commit

Permalink
chore: 🤖 cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
TomTomB committed Jan 15, 2025
1 parent a6a74ec commit 3b40a23
Show file tree
Hide file tree
Showing 92 changed files with 952 additions and 1,027 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-${{ matrix.bun }}-bun-${{ hashFiles('**/bun.lockb') }}
key: ${{ runner.os }}-${{ matrix.bun }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.bun }}-bun-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-${{ matrix.bun }}-bun-${{ hashFiles('**/bun.lockb') }}
key: ${{ runner.os }}-${{ matrix.bun }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.bun }}-bun-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-${{ matrix.bun }}-bun-${{ hashFiles('**/bun.lockb') }}
key: ${{ runner.os }}-${{ matrix.bun }}-bun-${{ hashFiles('**/bun.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.bun }}-bun-
Expand Down
6 changes: 0 additions & 6 deletions apps/playground-e2e/cypress.config.ts

This file was deleted.

13 changes: 13 additions & 0 deletions apps/playground-e2e/eslint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const playwright = require('eslint-plugin-playwright');
const baseConfig = require('../../eslint.config.cjs');

module.exports = [
playwright.configs['flat/recommended'],

...baseConfig,
{
files: ['**/*.ts', '**/*.js'],
// Override or add rules here
rules: {},
},
];
18 changes: 0 additions & 18 deletions apps/playground-e2e/eslint.config.js

This file was deleted.

69 changes: 69 additions & 0 deletions apps/playground-e2e/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import { nxE2EPreset } from '@nx/playwright/preset';
import { defineConfig, devices } from '@playwright/test';

import { workspaceRoot } from '@nx/devkit';

// For CI, you may want to set BASE_URL to the deployed application.
const baseURL = process.env['BASE_URL'] || 'http://localhost:4200';

/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
// require('dotenv').config();

/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
...nxE2EPreset(__filename, { testDir: './src' }),
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
baseURL,
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
},
/* Run your local dev server before starting the tests */
webServer: {
command: 'bun nx run new-nx-2025:serve',
url: 'http://localhost:4200',
reuseExistingServer: !process.env['CI'],
cwd: workspaceRoot,
},
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},

{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
},

{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
},

// Uncomment for mobile browsers support
/* {
name: 'Mobile Chrome',
use: { ...devices['Pixel 5'] },
},
{
name: 'Mobile Safari',
use: { ...devices['iPhone 12'] },
}, */

// Uncomment for branded browsers
/* {
name: 'Microsoft Edge',
use: { ...devices['Desktop Edge'], channel: 'msedge' },
},
{
name: 'Google Chrome',
use: { ...devices['Desktop Chrome'], channel: 'chrome' },
} */
],
});
20 changes: 3 additions & 17 deletions apps/playground-e2e/project.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,13 @@
{
"name": "playground-e2e",
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/playground-e2e/src",
"projectType": "application",
"tags": [],
"sourceRoot": "apps/playground-e2e/src",
"implicitDependencies": ["playground"],
"// targets": "to see all targets run: nx show project playground-e2e --web",
"targets": {
"e2e": {
"executor": "@nx/cypress:cypress",
"options": {
"cypressConfig": "apps/playground-e2e/cypress.config.ts",
"devServerTarget": "playground:serve:development",
"testingType": "e2e"
},
"configurations": {
"production": {
"devServerTarget": "playground:serve:production"
}
}
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"]
"executor": "@nx/eslint:lint"
}
}
}
13 changes: 0 additions & 13 deletions apps/playground-e2e/src/e2e/app.cy.ts

This file was deleted.

8 changes: 8 additions & 0 deletions apps/playground-e2e/src/example.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { test, expect } from '@playwright/test';

test('has title', async ({ page }) => {
await page.goto('/');

// Expect h1 to contain a substring.
expect(await page.locator('h1').innerText()).toContain('Welcome');
});
4 changes: 0 additions & 4 deletions apps/playground-e2e/src/fixtures/example.json

This file was deleted.

1 change: 0 additions & 1 deletion apps/playground-e2e/src/support/app.po.ts

This file was deleted.

33 changes: 0 additions & 33 deletions apps/playground-e2e/src/support/commands.ts

This file was deleted.

17 changes: 0 additions & 17 deletions apps/playground-e2e/src/support/e2e.ts

This file was deleted.

23 changes: 13 additions & 10 deletions apps/playground-e2e/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"sourceMap": false,
"outDir": "../../dist/out-tsc",
"allowJs": true,
"types": ["cypress", "node"],
"outDir": "../../dist/out-tsc",
"sourceMap": false,
"module": "commonjs",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true
},
"include": ["src/**/*.ts", "src/**/*.js", "cypress.config.ts"],
"angularCompilerOptions": {
"enableI18nLegacyMessageIdFormat": false,
"strictInjectionParameters": true,
"strictInputAccessModifiers": true,
"strictTemplates": true
}
"include": [
"**/*.ts",
"**/*.js",
"playwright.config.ts",
"src/**/*.spec.ts",
"src/**/*.spec.js",
"src/**/*.test.ts",
"src/**/*.test.js",
"src/**/*.d.ts"
]
}
14 changes: 2 additions & 12 deletions apps/playground/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { StorybookConfig } from '@storybook/angular';
import { dirname, join } from 'path';

const config: StorybookConfig = {
stories: [
Expand All @@ -8,13 +7,9 @@ const config: StorybookConfig = {
'../../../libs/**/*-page.mdx',
'../../../libs/**/*.stories.@(js|jsx|ts|tsx)',
],
addons: [
getAbsolutePath('@storybook/addon-essentials'),
getAbsolutePath('@storybook/addon-a11y'),
getAbsolutePath('storybook-dark-mode'),
],
addons: ['@storybook/addon-essentials', '@storybook/addon-a11y', 'storybook-dark-mode'],
framework: {
name: getAbsolutePath('@storybook/angular'),
name: '@storybook/angular',
options: {},
},
docs: {
Expand All @@ -23,8 +18,3 @@ const config: StorybookConfig = {
};

export default config;

// eslint-disable-next-line @typescript-eslint/no-explicit-any
function getAbsolutePath(value: string): any {
return dirname(require.resolve(join(value, 'package.json')));
}
34 changes: 34 additions & 0 deletions apps/playground/eslint.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
const nx = require('@nx/eslint-plugin');
const baseConfig = require('../../eslint.config.cjs');

module.exports = [
...baseConfig,
...nx.configs['flat/angular'],
...nx.configs['flat/angular-template'],
{
files: ['**/*.ts'],
rules: {
'@angular-eslint/directive-selector': [
'error',
{
type: 'attribute',
prefix: 'ethlete',
style: 'camelCase',
},
],
'@angular-eslint/component-selector': [
'error',
{
type: 'element',
prefix: 'ethlete',
style: 'kebab-case',
},
],
},
},
{
files: ['**/*.html'],
// Override or add rules here
rules: {},
},
];
Loading

0 comments on commit 3b40a23

Please sign in to comment.