Skip to content

Commit 2a57155

Browse files
committed
Setup basic repository structure and build system
1 parent 6908751 commit 2a57155

21 files changed

+12398
-0
lines changed

.eslintrc.js

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
module.exports = {
2+
root: true,
3+
env: {
4+
browser: true,
5+
es2021: true,
6+
},
7+
extends: [
8+
'eslint:recommended',
9+
'plugin:react/recommended',
10+
'plugin:@typescript-eslint/recommended',
11+
],
12+
parser: '@typescript-eslint/parser',
13+
parserOptions: {
14+
ecmaFeatures: {
15+
jsx: true,
16+
},
17+
ecmaVersion: 'latest',
18+
sourceType: 'module',
19+
},
20+
plugins: ['react', '@typescript-eslint'],
21+
rules: {
22+
indent: [
23+
'error',
24+
'tab', // https://web.archive.org/web/20220616035943/https://www.reddit.com/r/javascript/comments/c8drjo/nobody_talks_about_the_real_reason_to_use_tabs/
25+
],
26+
'linebreak-style': ['error', 'unix'],
27+
quotes: ['error', 'double'],
28+
semi: ['error', 'always'],
29+
},
30+
};

.github/pull_request_template.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# What
2+
3+
# Why
4+
5+
# How (steps for QA)

.gitignore

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# macOS
2+
.DS_Store
3+
4+
# Logs
5+
logs
6+
*.log
7+
npm-debug.log*
8+
yarn-debug.log*
9+
yarn-error.log*
10+
lerna-debug.log*
11+
12+
# Coverage directory generated when running tests with coverage
13+
coverage
14+
15+
# Dependencies
16+
node_modules/
17+
18+
# Node version directives
19+
.nvmrc
20+
21+
# dotenv environment variables file
22+
.env
23+
.env.test
24+
25+
# Build output
26+
dist
27+
dist-types
28+
29+
# Temporary change files created by Vim
30+
*.swp

.prettierrc.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
...require('@spotify/prettier-config'),
3+
useTabs: true, // https://web.archive.org/web/20220616035943/https://www.reddit.com/r/javascript/comments/c8drjo/nobody_talks_about_the_real_reason_to_use_tabs/
4+
5+
};

index.ts

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
openSLO: require('./openslo'),
3+
openSLOBackend: require('./openslo-backend'),
4+
openSLOCommon: require('./openslo-common'),
5+
openSLODataSourcePrometheus: require('./openslo-datasource-prometheus'),
6+
};

lerna.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"packages": [
3+
"plugins/**"
4+
],
5+
"npmClient": "yarn",
6+
"useWorkspaces": true,
7+
"version": "0.0.0"
8+
}

package.json

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"name": "backstage-plugin-openslo",
3+
"main": "index.ts",
4+
"license": "Apache-2.0",
5+
"private": true,
6+
"scripts": {
7+
"build": "lerna run build",
8+
"tsc": "tsc",
9+
"tsc:full": "tsc --skipLibCheck false --incremental false",
10+
"clean": "lerna run clean",
11+
"diff": "lerna run diff --",
12+
"test:all": "lerna run test -- --coverage",
13+
"lint": "lerna run lint --since origin/main --",
14+
"lint:all": "lerna run lint --",
15+
"prettier": "prettier .",
16+
"prettier:write": "prettier --write .",
17+
"prettier:check": "prettier --check ."
18+
},
19+
"workspaces": {
20+
"packages": [
21+
"plugins/**"
22+
]
23+
},
24+
"devDependencies": {
25+
"@spotify/prettier-config": "^12.0.0",
26+
"@typescript-eslint/eslint-plugin": "^5.29.0",
27+
"@typescript-eslint/parser": "^5.29.0",
28+
"eslint": "^8.18.0",
29+
"eslint-plugin-react": "^7.30.1",
30+
"lerna": "^4.0.0",
31+
"prettier": "^2.3.2"
32+
},
33+
"dependencies": {
34+
"@backstage/cli": "^0.17.2",
35+
"typescript": "^4.7.4"
36+
}
37+
}

plugins/openslo-backend/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# @backstage-plugin-openslo/openslo-backend

plugins/openslo-backend/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export {};

plugins/openslo-backend/package.json

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "@backstage-plugin-openslo/openslo-backend",
3+
"description": "",
4+
"version": "0.0.0",
5+
"main": "index.ts",
6+
"types": "index.ts",
7+
"backstage": {
8+
"role": "backend"
9+
},
10+
"scripts": {
11+
"lint": "eslint --ext .js,.jsx,.ts,.tsx --color"
12+
},
13+
"repository": {
14+
"type": "git",
15+
"url": "https://github.com/OpenSLO/backstage-plugin-openslo",
16+
"directory": "openslo-backend"
17+
},
18+
"license": "Apache-2.0",
19+
"private": false,
20+
"homepage": "https://openslo.com",
21+
"keywords": [
22+
"openslo",
23+
"slo"
24+
],
25+
"bugs": {
26+
"url": "https://github.com/OpenSLO/backstage-plugin-openslo"
27+
},
28+
"dependencies": {},
29+
"devDependencies": {}
30+
}

plugins/openslo-common/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# @backstage-plugin-openslo/openslo-common

plugins/openslo-common/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export {};

plugins/openslo-common/package.json

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "@backstage-plugin-openslo/openslo-common",
3+
"description": "",
4+
"version": "0.0.0",
5+
"main": "index.ts",
6+
"types": "index.ts",
7+
"backstage": {
8+
"role": "common-library"
9+
},
10+
"scripts": {
11+
"lint": "eslint --ext .js,.jsx,.ts,.tsx --color"
12+
},
13+
"repository": {
14+
"type": "git",
15+
"url": "https://github.com/OpenSLO/backstage-plugin-openslo",
16+
"directory": "openslo-common"
17+
},
18+
"license": "Apache-2.0",
19+
"private": false,
20+
"homepage": "https://openslo.com",
21+
"keywords": [
22+
"openslo",
23+
"slo"
24+
],
25+
"bugs": {
26+
"url": "https://github.com/OpenSLO/backstage-plugin-openslo"
27+
},
28+
"dependencies": {},
29+
"devDependencies": {}
30+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# @backstage-plugin-openslo/openslo-datasource-prometheus
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export {};
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "@backstage-plugin-openslo/openslo-datasource-prometheus",
3+
"description": "",
4+
"version": "0.0.0",
5+
"main": "index.ts",
6+
"types": "index.ts",
7+
"backstage": {
8+
"role": "frontend-module"
9+
},
10+
"scripts": {
11+
"lint": "eslint --ext .js,.jsx,.ts,.tsx --color"
12+
},
13+
"repository": {
14+
"type": "git",
15+
"url": "https://github.com/OpenSLO/backstage-plugin-openslo",
16+
"directory": "openslo-datasource-prometheus"
17+
},
18+
"license": "Apache-2.0",
19+
"private": false,
20+
"homepage": "https://openslo.com",
21+
"keywords": [
22+
"openslo",
23+
"slo"
24+
],
25+
"bugs": {
26+
"url": "https://github.com/OpenSLO/backstage-plugin-openslo"
27+
},
28+
"dependencies": {},
29+
"devDependencies": {}
30+
}

plugins/openslo/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# @backstage-plugin-openslo/openslo

plugins/openslo/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export {};

plugins/openslo/package.json

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "@backstage-plugin-openslo/openslo",
3+
"description": "",
4+
"version": "0.0.0",
5+
"main": "index.ts",
6+
"types": "index.ts",
7+
"backstage": {
8+
"role": "frontend"
9+
},
10+
"scripts": {
11+
"lint": "eslint --ext .js,.jsx,.ts,.tsx --color"
12+
},
13+
"repository": {
14+
"type": "git",
15+
"url": "https://github.com/OpenSLO/backstage-plugin-openslo",
16+
"directory": "openslo"
17+
},
18+
"license": "Apache-2.0",
19+
"private": false,
20+
"homepage": "https://openslo.com",
21+
"keywords": [
22+
"openslo",
23+
"slo"
24+
],
25+
"bugs": {
26+
"url": "https://github.com/OpenSLO/backstage-plugin-openslo"
27+
},
28+
"dependencies": {},
29+
"devDependencies": {}
30+
}

tsconfig.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": "@backstage/cli/config/tsconfig.json",
3+
"include": ["plugins/**/*"],
4+
"exclude": ["node_modules"],
5+
"compilerOptions": {
6+
"outDir": "dist-types",
7+
"rootDir": ".",
8+
"skipLibCheck": true
9+
}
10+
}

0 commit comments

Comments
 (0)