Skip to content

Commit

Permalink
chore: move prettier to project root
Browse files Browse the repository at this point in the history
  • Loading branch information
petermuessig committed Apr 27, 2022
1 parent 328ad71 commit 053b9f5
Show file tree
Hide file tree
Showing 24 changed files with 1,589 additions and 1,531 deletions.
70 changes: 35 additions & 35 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
name: build

on:
schedule:
- cron: "50 3 * * *" # runs every day at 03:50 UTC to avoid high loads
push:
branches: [main]
workflow_dispatch:
schedule:
- cron: "50 3 * * *" # runs every day at 03:50 UTC to avoid high loads
push:
branches: [main]
workflow_dispatch:

env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Use Node.js LTS (16.x)
uses: actions/setup-node@v2
with:
node-version: "16"
- name: install yarn
run: |
npm install yarn --global
- name: yarn
run: |
yarn
- name: crawl data
run: |
yarn workspace crawler build
- run: |
yarn workspace ui build
- name: Commit/Push build to docs branch
run: |
git config --global user.name 'marianfoo'
git config --global user.email '[email protected]'
git add docs -f
git add packages/ui/src/model/data.json
git add packages/ui/src/model/versions.json
git commit -m "chore: build"
git push origin HEAD:docs --force
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Use Node.js LTS (16.x)
uses: actions/setup-node@v2
with:
node-version: "16"
- name: install yarn
run: |
npm install yarn --global
- name: yarn
run: |
yarn
- name: crawl data
run: |
yarn workspace crawler build
- run: |
yarn workspace ui build
- name: Commit/Push build to docs branch
run: |
git config --global user.name 'marianfoo'
git config --global user.email '[email protected]'
git add docs -f
git add packages/ui/src/model/data.json
git add packages/ui/src/model/versions.json
git commit -m "chore: build"
git push origin HEAD:docs --force
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ node_modules/
webapp
dist
docs

# Logs
logs
*.log
Expand Down
11 changes: 11 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Ignore specific files
_config.yml

# Ignore files by extension
/**/*.md
/**/*.svg

# Ignore folders
/docs/**
/packages/ui/src/font-awesome/**
/packages/ui/webapp/**
17 changes: 0 additions & 17 deletions .prettierrc

This file was deleted.

25 changes: 25 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"singleQuote": false,
"printWidth": 200,
"endOfLine": "lf",
"tabWidth": 4,
"useTabs": true,
"overrides": [
{
"files": ["*.yaml", "*.yml", "*.md", "*.json", "*.xml"],
"options": {
"useTabs": false,
"tabWidth": 2,
"xmlWhitespaceSensitivity": "ignore"
}
},
{
"files": ["*.properties"],
"options": {
"useTabs": false,
"tabWidth": 2,
"keySeparator": "="
}
}
]
}
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,25 @@
"start": "yarn workspace ui start",
"start:dist": "yarn workspace ui start:dist",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
"prettier": "yarn workspaces run prettier",
"prettier:staged": "yarn workspaces run prettier:staged",
"lint:commit": "commitlint -e",
"lint": "yarn workspaces run lint",
"lint:staged": "yarn workspaces run lint:staged",
"prettier": "prettier --write .",
"prettier:staged": "pretty-quick --staged --verbose",
"hooks:pre-commit": "npm-run-all --sequential prettier:staged lint:staged",
"hooks:pre-push": "npm-run-all --sequential lint:commit"
},
"devDependencies": {
"@commitlint/cli": "^16.2.3",
"@commitlint/config-conventional": "^16.2.1",
"@prettier/plugin-xml": "^2.0.1",
"conventional-changelog-cli": "^2.2.2",
"cz-conventional-changelog": "^3.3.0",
"husky": "^7.0.4",
"npm-run-all": "^4.1.5"
"npm-run-all": "^4.1.5",
"prettier": "^2.6.2",
"prettier-plugin-properties": "^0.1.0",
"pretty-quick": "^3.1.3"
},
"config": {
"commitizen": {
Expand Down
Empty file removed packages/crawler/.prettierignore
Empty file.
4 changes: 1 addition & 3 deletions packages/crawler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
"watch": "tsc -w",
"compile": "tsc",
"lint": "eslint src",
"lint:staged": "lint-staged",
"prettier": "prettier --write src",
"prettier:staged": "pretty-quick --staged"
"lint:staged": "lint-staged"
},
"author": "Marian Zeis",
"license": "Apache-2.0",
Expand Down
2 changes: 2 additions & 0 deletions packages/crawler/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import GitHubRepositoriesProvider from "./gh-repos";
import NPMProvider from "./npm";
import { IPackage, Source, Tags, DataJson } from "./types";

// TEST

(async () => {
const dataJson: DataJson = {
packages: [],
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"project": ["./tsconfig.json", "./packages/ui/tsconfig.json"],
"sourceType": "module"
},
"ignorePatterns": ["src/font-awesome/*.js"],
"ignorePatterns": ["*.xml", "*.properties", "src/font-awesome/**"],
"plugins": ["@typescript-eslint"],
"rules": {
"@typescript-eslint/no-unsafe-assignment": "warn",
Expand Down
4 changes: 0 additions & 4 deletions packages/ui/.prettierignore

This file was deleted.

7 changes: 1 addition & 6 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,14 @@
"start:dist": "ui5 serve --port 8080 -o index.html --config ui5-dist.yaml",
"ts-typecheck": "tsc --noEmit",
"lint": "eslint src",
"lint:staged": "lint-staged",
"prettier": "prettier --write src",
"prettier:staged": "pretty-quick --staged"
"lint:staged": "lint-staged"
},
"devDependencies": {
"@babel/cli": "^7.17.6",
"@babel/core": "^7.17.9",
"@babel/preset-env": "^7.16.11",
"@babel/preset-typescript": "^7.16.7",
"@openui5/ts-types-esm": "1.101.0",
"@prettier/plugin-xml": "^2.0.1",
"@types/chart.js": "2.9.36",
"@types/jquery": "3.5.14",
"@typescript-eslint/eslint-plugin": "^5.20.0",
Expand All @@ -39,8 +36,6 @@
"eslint": "^8.13.0",
"lint-staged": "^12.4.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.6.2",
"pretty-quick": "^3.1.3",
"typescript": "^4.6.3",
"ui5-middleware-livereload": "^0.5.11"
},
Expand Down
2 changes: 2 additions & 0 deletions packages/ui/src/Component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import "sap/ui/core/ComponentSupport";
import "sap/ui/core/date/Gregorian";
import "sap/ui/model/type/Date";

// TEST

/**
* @namespace org.openui5.bestofui5
*/
Expand Down
36 changes: 18 additions & 18 deletions packages/ui/src/control/PackageListItemContent.control.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,17 @@
renderMode="Narrow"
colorScheme="6"
displayOnly="false"
text="{= ${i18n>listItemTagUpdated}.replace('{0}', ${
text="{= ${i18n>list_item_tag_updated}.replace('{0}', ${
path: '$this>updatedAt',
type: 'sap.ui.model.type.Date',
formatOptions: {
source : {
pattern: 'yyyy-MM-ddTHH:mm:ss.SSSZ'
type: 'sap.ui.model.type.Date',
formatOptions: {
source : {
pattern: 'yyyy-MM-ddTHH:mm:ss.SSSZ'
},
relative: true,
relativeScale: 'auto',
relativeStyle: 'wide'
}
}
}) }"
visible="{= !!${$this>updatedAt} }"
/>
Expand All @@ -93,17 +93,17 @@
renderMode="Narrow"
colorScheme="6"
displayOnly="false"
text="{= ${i18n>addedToBestOfUI5}.replace('{0}', ${
text="{= ${i18n>added_to_best_of_ui5}.replace('{0}', ${
path: '$this>addedToBoUI5',
type: 'sap.ui.model.type.Date',
formatOptions: {
source : {
pattern: 'yyyy-MM-ddTHH:mm:ss.SSSZ'
type: 'sap.ui.model.type.Date',
formatOptions: {
source : {
pattern: 'yyyy-MM-ddTHH:mm:ss.SSSZ'
},
relative: true,
relativeScale: 'auto',
relativeStyle: 'wide'
}
}
}) }"
visible="{= !!${$this>addedToBoUI5} }"
/>
Expand All @@ -114,17 +114,17 @@
renderMode="Narrow"
colorScheme="6"
displayOnly="false"
text="{= ${i18n>listItemTagCreated}.replace('{0}', ${
text="{= ${i18n>list_item_tag_created}.replace('{0}', ${
path: '$this>createdAt',
type:'sap.ui.model.type.Date',
formatOptions: {
source : {
pattern: 'yyyy-MM-ddTHH:mm:ss X'
type:'sap.ui.model.type.Date',
formatOptions: {
source : {
pattern: 'yyyy-MM-ddTHH:mm:ss X'
},
relative: true,
relativeScale: 'auto',
relativeStyle: 'wide'
}
}
}) }"
visible="{= !!${$this>createdAt} }"
/>
Expand Down
Loading

0 comments on commit 053b9f5

Please sign in to comment.