Skip to content

Commit

Permalink
feat: Initial version
Browse files Browse the repository at this point in the history
JIRA: CPOUI5FOUNDATION-784
  • Loading branch information
RandomByte committed Mar 11, 2024
0 parents commit 5466be5
Show file tree
Hide file tree
Showing 241 changed files with 33,723 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"extends": [
"@commitlint/config-conventional"
],
"rules": {
"type-enum": [
2,
"always",
[
"build",
"ci",
"deps",
"docs",
"feat",
"fix",
"perf",
"refactor",
"release",
"revert",
"style",
"test"
]
],
"body-max-line-length": [2, "always", 160],
"subject-case": [
2, "always",
["sentence-case", "start-case", "pascal-case"]
]
}
}
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# see http://editorconfig.org

root = true

[*]
charset = utf-8
indent_style = tab

[*.{css,html,js,cjs,mjs,jsx,ts,tsx,less,txt,json,yml,md}]
trim_trailing_whitespace = true
end_of_line = lf
indent_size = 4
insert_final_newline = true

[*.{yml,yaml}]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false
12 changes: 12 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# /node_modules/* and /bower_components/* ignored by default

# Exclude coverage folder
coverage/

# Exclude test files
test/tmp/
test/projects/
test/fixtures/

# Exclude generated code
/lib/
54 changes: 54 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/* eslint-env node */
module.exports = {
env: {
node: true,
es2022: true
},
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:ava/recommended"],
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint", "ava"],
rules: {
"indent": [
"error",
"tab"
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"double",
{"allowTemplateLiterals": true}
],
"semi": [
"error",
"always"
],
"max-len": [
"error",
{
"code": 120,
"ignoreUrls": true,
"ignoreRegExpLiterals": true
}
],
"no-implicit-coercion": [
2,
{"allow": ["!!"]}
],
"no-console": "error",
// ava/assertion-arguments reports concatenated strings in a assertion message as an issue
// See: https://github.com/avajs/eslint-plugin-ava/issues/332
"ava/assertion-arguments": 0,
"no-unused-vars": "off", // Turn off default rule to customize typescript variant
"@typescript-eslint/no-unused-vars": [
"error", {
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_",
"caughtErrorsIgnorePattern": "^_"
}
]
},
root: true,
};
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
54 changes: 54 additions & 0 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
name: Bug Report
about: Report an issue with a package part of UI5 linter
title: ''
labels: bug, needs triage
assignees: ''

---

<!--
Hey there 👋 Please have a look at our guidelines on reporting issues:
https://github.com/SAP/ui5-linter/blob/main/CONTRIBUTING.md#-reporting-issues
Please use this template and replace as many "{...}" and "unknown" as possible.
Thank you 🧡
-->

## Expected Behavior

{...}

## Current Behavior

{...}

## Steps to Reproduce the Issue

<!--
Please provide detailed steps on how we can reproduce your issue.
Depending on your issue, consider forking our sample app to reproduce it here: https://github.com/SAP/openui5-sample-app
-->
1. {...}
2. {...}
3. {...}

## Context

- UI5 linter package and version
- Node.js Version: **`unknown`**
- npm Version: `unknown`
- OS/Platform: `unknown`
- Browser *(if relevant)*: `unknown`
- Other information regarding your environment *(optional)*: `nothing`

## Log Output / Stack Trace

<!--
Try adding the "--verbose" flag to get extended logging.
Please remove or obfuscate any sensitive information shown in the log.
-->

```
{...}
```
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: true
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Feature Request
about: Request a new feature to be added to a package part of UI5 linter
title: ''
labels: enhancement
assignees: ''

---

<!--
Hey there 👋 Please also have a look at our guidelines on feature requests:
https://github.com/SAP/ui5-linter/blob/main/CONTRIBUTING.md#-feature-requests
-->

## Is your feature request related to a problem? Please describe.

A clear and concise description of the problem, e.g. "I'm always frustrated when {...}"

## Describe the solution you'd like

A clear and concise description of what you want to happen.

## Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

## Additional context

Add any other context or screenshots about the feature request here.
9 changes: 9 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
**Thank you for your contribution!** 🙌

To get it merged faster, kindly review the checklist below:

## Pull Request Checklist
- [ ] Reviewed the [Contributing Guidelines](https://github.com/SAP/ui5-linter/blob/main/CONTRIBUTING.md#-contributing-code)
+ Especially the [How to Contribute](https://github.com/SAP/ui5-linter/blob/main/CONTRIBUTING.md#how-to-contribute) section
- [ ] [No merge commits](https://github.com/SAP/ui5-linter/blob/main/docs/Guidelines.md#no-merge-commits)
- [ ] [Correct commit message style](https://github.com/SAP/ui5-linter/blob/main/docs/Guidelines.md#commit-message-style)
21 changes: 21 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
commit-message:
prefix: "ci(github-actions)"
- package-ecosystem: npm
directory: "/"
schedule:
interval: weekly
day: sunday
time: "10:00"
timezone: Etc/UCT
reviewers:
- "SAP/ui5-foundation"
versioning-strategy: increase
commit-message:
prefix: "deps"
prefix-development: "build(deps-dev)"
1 change: 1 addition & 0 deletions .github/in-solidarity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_extends: ietf/terminology
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
name: General checks, tests and coverage reporting
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Use Node.js 21.4.0
uses: actions/[email protected]
with:
node-version: 21.4.0

- name: Install dependencies
run: npm ci

- name: Perfrom Licenses check
run: npm run check-licenses

- name: Perform dependency check
run: npm run depcheck

- name: Perform checks and tests
run: npm test
env:
NODE_OPTIONS: ""
18 changes: 18 additions & 0 deletions .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Commit Message Linting

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v5
26 changes: 26 additions & 0 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Dependabot auto-merge
on:
pull_request:
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v1
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Enable auto-merge for Dependabot PRs
if: ${{contains(fromJSON('["version-update:semver-minor", "version-update:semver-patch"]'), steps.metadata.outputs.update-type)}}
run: gh pr review --approve "$PR_URL" && gh pr merge --auto --rebase "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
18 changes: 18 additions & 0 deletions .github/workflows/issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Issue/Pull Request Handling
on:
schedule:
- cron: '00 20 * * *'

jobs:
stale:
name: Flag and close stale issues
runs-on: ubuntu-22.04
steps:
- uses: actions/stale@v9
with:
stale-issue-message: 'This issue has been automatically marked as stale because it has been open for 60 days with no activity. It will be closed in 10 days if no further activity occurs.'
stale-issue-label: 'stale'
stale-pr-label: 'stale'
days-before-stale: 60
days-before-close: 10
only-labels: 'information required'
18 changes: 18 additions & 0 deletions .github/workflows/reuse-compliance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: REUSE

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
compliance-check:
name: Compliance Check
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Execute REUSE Compliance Check
uses: fsfe/reuse-action@v3
Loading

0 comments on commit 5466be5

Please sign in to comment.