diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 00000000000..298aa758576 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,2 @@ +.eslintrc.js +jest.config.ts diff --git a/.eslintrc.js b/.eslintrc.js index d8a5b12f00f..e9434574a73 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -54,6 +54,7 @@ module.exports = { 'compat', 'posthog', 'simple-import-sort', + 'import', ], rules: { 'no-console': ['error', { allow: ['warn', 'error'] }], @@ -261,6 +262,19 @@ module.exports = { 'no-constant-condition': 'off', 'no-prototype-builtins': 'off', 'no-irregular-whitespace': 'off', + 'import/no-restricted-paths': [ + 'error', + { + zones: [ + { + target: './frontend/**', + from: './ee/frontend/**', + message: + "EE licensed TypeScript should only be accessed via the posthogEE objects. Use `import posthogEE from '@posthog/ee/exports'`", + }, + ], + }, + ], }, overrides: [ { diff --git a/.github/workflows/ci-frontend.yml b/.github/workflows/ci-frontend.yml index c586598152f..7d49cd5c23c 100644 --- a/.github/workflows/ci-frontend.yml +++ b/.github/workflows/ci-frontend.yml @@ -107,6 +107,10 @@ jobs: if: needs.changes.outputs.frontend == 'true' run: pnpm schema:build:json && git diff --exit-code + - name: Check if mobile replay "schema.json" is up to date + if: needs.changes.outputs.frontend == 'true' + run: pnpm mobile-replay:schema:build:json && git diff --exit-code + - name: Check toolbar bundle size if: needs.changes.outputs.frontend == 'true' uses: preactjs/compressed-size-action@v2 diff --git a/.run/PostHog.run.xml b/.run/PostHog.run.xml index df41d468add..b36e0c48a93 100644 --- a/.run/PostHog.run.xml +++ b/.run/PostHog.run.xml @@ -17,7 +17,7 @@ - + @@ -48,4 +48,4 @@