Skip to content

Commit

Permalink
Make sure yarn lint and yarn start work
Browse files Browse the repository at this point in the history
Signed-off-by: Roohn <ronald.tol@ah.nl>
  • Loading branch information
Roohn committed Sep 27, 2024
1 parent ac3ec79 commit ca1f9aa
Show file tree
Hide file tree
Showing 11 changed files with 249 additions and 32 deletions.
15 changes: 11 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
module.exports = require("@backstage/cli/config/eslint-factory")(__dirname, {
rules: {
"deprecation/deprecation": "error",
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
extends: ["plugin:storybook/recommended", "plugin:deprecation/recommended"],

ignorePatterns: ["*.js", "*.d.ts"],

parserOptions: {
project: "./tsconfig.json",
tsconfigRootDir: __dirname,
},
});
};
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
**/.git
**/.svn
**/.hg
**/.eslintrc.js
**/node_modules

# Ignore generated files
Expand Down
28 changes: 28 additions & 0 deletions app-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
app:
title: Analytics module - Azure insights
baseUrl: http://localhost:3000

backend:
baseUrl: http://localhost:7007
listen:
port: 7007
csp:
connect-src: ["'self'", 'http:', 'https:']
cors:
origin: http://localhost:3000
methods: [GET, POST, PUT, DELETE]
credentials: true
database:
client: better-sqlite3
connection: ':memory:'
cache:
store: memory
reading:
allow:
- host: localhost

auth:
environment: development
providers:
guest:
userEntityRef: 'user:default/guest'
3 changes: 2 additions & 1 deletion dev/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@

import { createPlugin } from "@backstage/core-plugin-api";
import { createDevApp } from "@backstage/dev-utils";
import { Playground } from "./Playground";
import React from "react";
import { Playground } from "./Playground";

export const analyticsModuleAzureInsights = createPlugin({
id: "analytics-provider-azure-insights",
});

createDevApp()
.registerPlugin(analyticsModuleAzureInsights)
.addPage({
Expand Down
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"test": "backstage-cli package test",
"clean": "backstage-cli package clean",
"prepack": "backstage-cli package prepack",
"postpack": "backstage-cli package postpack"
"postpack": "backstage-cli package postpack",
"tsc": "tsc"
},
"dependencies": {
"@backstage/config": "^1.2.0",
Expand All @@ -54,9 +55,14 @@
"@testing-library/jest-dom": "^6.1.4",
"@testing-library/react": "^15.0.2",
"@types/node": "*",
"cross-fetch": "^4.0.0",
"@typescript-eslint/parser": "^7.7.0",
"eslint": "^8.57.0",
"eslint-plugin-deprecation": "^3.0.0"
"eslint-plugin-deprecation": "^3.0.0",
"eslint-plugin-storybook": "^0.8.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router": "^6.19.0",
"react-router-dom": "^6.19.0"
},
"files": [
"dist",
Expand Down
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@
*/

export { AzureInsights } from "./AnalyticsApi";
export { analyticsModuleAzurePlugin } from "./plugin";
7 changes: 0 additions & 7 deletions src/plugin.test.ts

This file was deleted.

5 changes: 0 additions & 5 deletions src/plugin.ts

This file was deleted.

8 changes: 6 additions & 2 deletions src/setupTests.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
import '@testing-library/jest-dom';
import 'cross-fetch/polyfill';
import "@testing-library/jest-dom";

// eslint-disable-next-line no-restricted-imports
import { TextDecoder, TextEncoder } from "util";

Object.assign(global, { TextDecoder, TextEncoder });
7 changes: 4 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"extends": "@backstage/cli/config/tsconfig.json",
"include": ["src", "dev"],
"include": ["src", "dev", "*/config.d.ts"],
"exclude": ["node_modules"],
"compilerOptions": {
"outDir": "dist-types",
"incremental": false
"incremental": false,
"rootDir": "."
}
}
}
Loading

0 comments on commit ca1f9aa

Please sign in to comment.