Skip to content

Commit

Permalink
Merge branch 'master' into revert-17036-revert-16937-hogvm-action-mat…
Browse files Browse the repository at this point in the history
…ching-final2-new-2
  • Loading branch information
mariusandra committed Nov 7, 2023
2 parents d43ca33 + 06e9938 commit 41d0b07
Show file tree
Hide file tree
Showing 3,049 changed files with 170,239 additions and 67,574 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
10 changes: 0 additions & 10 deletions .coveragerc

This file was deleted.

26 changes: 0 additions & 26 deletions .deepsource.toml

This file was deleted.

3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@
!plugin-server/.prettierrc
!share/GeoLite2-City.mmdb
!hogvm/python
!unit.json
!plugin-transpiler/src
!plugin-transpiler/*.*
1 change: 0 additions & 1 deletion .environment

This file was deleted.

110 changes: 82 additions & 28 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,40 @@
/* global module */

const env = {
browser: true,
es6: true,
'cypress/globals': true,
}

const globals = {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
}

module.exports = {
ignorePatterns: ['node_modules', 'plugin-server'],
env: {
browser: true,
es6: true,
'cypress/globals': true,
},
env,
settings: {
react: {
version: 'detect',
},
'import/resolver': {
node: {
paths: ['eslint-rules'], // Add the directory containing your custom rules
extensions: ['.js', '.jsx', '.ts', '.tsx'], // Ensure ESLint resolves both JS and TS files
},
},
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:eslint-comments/recommended',
'plugin:storybook/recommended',
'prettier',
'plugin:compat/recommended',
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly',
},
globals,
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
Expand All @@ -30,7 +43,7 @@ module.exports = {
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: ['prettier', 'react', 'cypress', '@typescript-eslint', 'no-only-tests'],
plugins: ['prettier', 'react', 'cypress', '@typescript-eslint', 'no-only-tests', 'jest', 'compat', 'posthog'],
rules: {
'no-console': ['error', { allow: ['warn', 'error'] }],
'no-debugger': 'error',
Expand Down Expand Up @@ -73,7 +86,7 @@ module.exports = {
},
],
'react/forbid-dom-props': [
1,
'warn',
{
forbid: [
{
Expand All @@ -84,8 +97,8 @@ module.exports = {
],
},
],
'react/forbid-elements': [
1,
'posthog/warn-elements': [
'warn',
{
forbid: [
{
Expand All @@ -97,18 +110,10 @@ module.exports = {
element: 'Col',
message: 'use flex utility classes instead - most of the time can simply be a plain <div>',
},
{
element: 'Space',
message: 'use flex or space utility classes instead',
},
{
element: 'Divider',
message: 'use <LemonDivider> instead',
},
{
element: 'Typography',
message: 'use utility classes instead',
},
{
element: 'Card',
message: 'use utility classes instead',
Expand All @@ -117,10 +122,6 @@ module.exports = {
element: 'Button',
message: 'use <LemonButton> instead',
},
{
element: 'Input.TextArea',
message: 'use <LemonTextArea> instead',
},
{
element: 'Input',
message: 'use <LemonInput> instead',
Expand All @@ -138,14 +139,14 @@ module.exports = {
message: 'use <LemonSelect> instead',
},
{
element: 'a',
message: 'use <Link> instead',
element: 'LemonButtonWithDropdown',
message: 'use <LemonMenu> with a <LemonButton> child instead',
},
],
},
],
'react/forbid-elements': [
2,
'error',
{
forbid: [
{
Expand All @@ -156,6 +157,10 @@ module.exports = {
element: 'Tabs',
message: 'use <LemonTabs> instead',
},
{
element: 'Space',
message: 'use flex or space utility classes instead',
},
{
element: 'Spin',
message: 'use Spinner instead',
Expand All @@ -168,11 +173,50 @@ module.exports = {
element: 'Collapse',
message: 'use <LemonCollapse> instead',
},
{
element: 'Checkbox',
message: 'use <LemonCheckbox> instead',
},
{
element: 'MonacoEditor',
message: 'use <CodeEditor> instead',
},
{
element: 'Typography',
message: 'use utility classes instead',
},
{
element: 'Input.TextArea',
message: 'use <LemonTextArea> instead',
},
{
element: 'ReactMarkdown',
message: 'use <LemonMarkdown> instead',
},
{
element: 'a',
message: 'use <Link> instead',
},
],
},
],
'no-constant-condition': 'off',
'no-prototype-builtins': 'off',
'no-irregular-whitespace': 'off',
},
overrides: [
{
files: ['**/test/**/*', '**/*.test.*'],
env: {
...env,
node: true,
'jest/globals': true,
},
globals: {
...globals,
given: 'readonly',
},
},
{
// disable these rules for files generated by kea-typegen
files: ['*Type.ts', '*Type.tsx'],
Expand Down Expand Up @@ -206,6 +250,16 @@ module.exports = {
'@typescript-eslint/no-var-requires': 'off',
},
},
{
files: 'eslint-rules/**/*',
extends: ['eslint:recommended'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
},
env: {
node: true,
},
},
],
reportUnusedDisableDirectives: true,
}
8 changes: 0 additions & 8 deletions .github/ISSUE_TEMPLATE/sprint_planning_retro.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,6 @@ title: Sprint 1.n.0 m/2 - Jan 1 to Jan 12
2.
3.

## Retro: What can we do better next sprint?

1.
2.
3.
4.
5.


# Team sprint planning

Expand Down
26 changes: 23 additions & 3 deletions .github/actions/build-n-cache-image/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,21 @@ inputs:
actions-id-token-request-url:
required: true
description: "ACTIONS_ID_TOKEN_REQUEST_URL, issued by GitHub when permission 'id-token' is set to 'write'"
load:
save:
required: false
default: 'false'
description: Whether to load the image into local Docker after building it
description: Whether to save the image in the Depot ephemeral registry after building it

outputs:
tag:
description: The tag of the image that was built
value: ${{ steps.emit.outputs.tag }}
build-id:
description: The ID of the build
value: ${{ steps.build.outputs.build-id }}
unit-build-id:
description: The ID of the unit build
value: ${{ steps.build-unit.outputs.build-id }}

runs:
using: 'composite'
Expand All @@ -30,8 +36,22 @@ runs:
uses: depot/build-push-action@v1
with:
buildx-fallback: false # buildx is so slow it's better to just fail
load: ${{ inputs.load }}
tags: ${{ steps.emit.outputs.tag }}
platforms: linux/amd64,linux/arm64
build-args: COMMIT_HASH=${{ github.sha }}
save: ${{ inputs.save }}
env:
ACTIONS_ID_TOKEN_REQUEST_URL: ${{ inputs.actions-id-token-request-url }}

- name: Build unit image
id: build-unit
uses: depot/build-push-action@v1
with:
buildx-fallback: false # buildx is so slow it's better to just fail
file: production-unit.Dockerfile
tags: ${{ steps.emit.outputs.tag }}
platforms: linux/amd64
build-args: COMMIT_HASH=${{ github.sha }}
save: ${{ inputs.save }}
env:
ACTIONS_ID_TOKEN_REQUEST_URL: ${{ inputs.actions-id-token-request-url }}
Loading

0 comments on commit 41d0b07

Please sign in to comment.