Skip to content
This repository has been archived by the owner on Aug 6, 2024. It is now read-only.

Commit

Permalink
chore: add prettier (#225)
Browse files Browse the repository at this point in the history
* chore: add prettier

* chore: add action

* chore: run prettier

* chore: only run prettier on ./src

* chore: change .yaml to 2 spaces

* chore: add prettier to devDependencies

* chore: remove karma.conf.js to update with main
  • Loading branch information
koen1711 authored Apr 15, 2024
1 parent 437bff9 commit df6ea72
Show file tree
Hide file tree
Showing 175 changed files with 5,462 additions and 4,082 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ trim_trailing_whitespace = true
[*.md]
max_line_length = off
trim_trailing_whitespace = false

[*.yaml]
indent_size = 2

103 changes: 44 additions & 59 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,61 +1,46 @@
{
"root": true,
"ignorePatterns": [
"projects/**/*"
],
"overrides": [
{
"files": [
"*.ts"
],
"parserOptions": {
"project": [
"tsconfig.json",
"e2e/tsconfig.json"
],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/component-selector": [
"error",
{
"prefix": "app",
"style": "kebab-case",
"type": "element"
}
],
"@angular-eslint/directive-selector": [
"error",
{
"prefix": "app",
"style": "camelCase",
"type": "attribute"
}
],
"@angular-eslint/component-class-suffix": [
"error",
{
"suffixes": [
"Page",
"Component",
"Dialog"
]
}
]
}
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": { }
}
]
"root": true,
"ignorePatterns": ["projects/**/*"],
"overrides": [
{
"files": ["*.ts"],
"parserOptions": {
"project": ["tsconfig.json", "e2e/tsconfig.json"],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/component-selector": [
"error",
{
"prefix": "app",
"style": "kebab-case",
"type": "element"
}
],
"@angular-eslint/directive-selector": [
"error",
{
"prefix": "app",
"style": "camelCase",
"type": "attribute"
}
],
"@angular-eslint/component-class-suffix": [
"error",
{
"suffixes": ["Page", "Component", "Dialog"]
}
]
}
},
{
"files": ["*.html"],
"extends": ["plugin:@angular-eslint/template/recommended"],
"rules": {}
}
]
}
6 changes: 3 additions & 3 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Clean up old images
uses: actions/delete-package-versions@v5
with:
package-name: 'leaphy-webbased/leaphy-webbased'
package-type: 'container'
package-name: "leaphy-webbased/leaphy-webbased"
package-type: "container"
min-versions-to-keep: 5
delete-only-untagged-versions: 'true'
delete-only-untagged-versions: "true"
56 changes: 30 additions & 26 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,33 @@
name: Playwright Tests
on:
pull_request:
branches: [ main, master ]
pull_request:
branches: [main, master]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.42.1-jammy
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
cache: yarn
- name: Install node modules
run: yarn --frozen-lockfile --prefer-offline
- name: Run linter
run: yarn lint
- name: Run Playwright tests
run: yarn playwright test
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
test:
timeout-minutes: 60
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/playwright:v1.42.1-jammy
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
cache: yarn
- name: Install node modules
run: yarn --frozen-lockfile --prefer-offline
- name: Run linter
run: yarn lint
- name: Run ESLint
run: npx eslint .
- name: Run prettier
run: npx prettier -c ./src
- name: Run Playwright tests
run: yarn playwright test
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
# Leaphy Easybloqs

## Introduction

Leaphy Easybloqs is software to program [Leaphy Robots](https://www.leaphy.nl) and Arduino microcontrollers using a block-based programming language and a user-friendly interface.
It also support programming RP2040 controllers that are able to run MicroPython.

## Contributing
We welcome PRs from anyone that wants to contribute!

We welcome PRs from anyone that wants to contribute!

### Prerequisites

The following should be installed:

- NodeJS (Version 20.X)
- NodeJS (Version 20.X)
On Windows: Be sure to install the build tools by checking the box during the NodeJS installation process
- Yarn v1
- Yarn v1

### Running locally

First install the dependencies by running `yarn intall`. This will take a while the first time.
Then run `yarn start` to start the application.

First install the dependencies by running `yarn intall`. This will take a while the first time.
Then run `yarn start` to start the application.

### Pull Requests

Expand All @@ -30,4 +31,3 @@ Once merged, it will show up on https://testleaphyeasybloqs.com for integration

All issues that involve webbased should be reported on the [Leaphy Easybloqs Webbased GitHub](https://github.com/leaphy-robotics/leaphy-webbased/issues) page.
Issues that involve the blocks should be reported on the [Leaphy Blocks GitHub](https://github.com/leaphy-robotics/leaphy-blocks/issues) page.

24 changes: 8 additions & 16 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,25 +143,25 @@
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"headers": {
"headers": {
"Cross-Origin-Embedder-Policy": "require-corp",
"Cross-Origin-Opener-Policy": "same-origin"
},
"buildTarget": "leaphy-client:build"
},
"configurations": {
"production": {
"buildTarget": "leaphy-client:build:production"
"buildTarget": "leaphy-client:build:production"
},
"dev": {
"buildTarget": "leaphy-client:build:dev"
"buildTarget": "leaphy-client:build:dev"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"buildTarget": "leaphy-client:build"
"buildTarget": "leaphy-client:build"
}
},
"test": {
Expand All @@ -170,10 +170,7 @@
"main": "src/test.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": [
"src/favicon.ico",
"src/assets"
],
"assets": ["src/favicon.ico", "src/assets"],
"styles": [
"src/styles.scss",
"src/theme.scss",
Expand All @@ -185,10 +182,7 @@
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
]
"lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
}
},
"e2e": {
Expand All @@ -210,9 +204,7 @@
}
},
"cli": {
"analytics": "6d8c3839-2848-4328-b7fb-a10f9273fdfc",
"schematicCollections": [
"@angular-eslint/schematics"
]
"analytics": "6d8c3839-2848-4328-b7fb-a10f9273fdfc",
"schematicCollections": ["@angular-eslint/schematics"]
}
}
Loading

0 comments on commit df6ea72

Please sign in to comment.