Skip to content

Commit 3a845a2

Browse files
committed
feat: configured husky and lint-stage and fixed styles with prettier warning
1 parent 7be297b commit 3a845a2

File tree

23 files changed

+242
-229
lines changed

23 files changed

+242
-229
lines changed

.eslintrc.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module.exports = {
2-
extends: [require.resolve("@backstage/cli/config/eslint")],
3-
ignorePatterns: ["node_modules/", "dist/", "*.d.ts", ".eslintrc.js"]
4-
};
2+
extends: [require.resolve("@backstage/cli/config/eslint")],
3+
ignorePatterns: ["node_modules/", "dist/", "*.d.ts", ".eslintrc.js"],
4+
};

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
uses: actions/setup-node@v4
5151
with:
5252
node-version: 20
53-
registry-url: 'https://registry.npmjs.org/'
53+
registry-url: "https://registry.npmjs.org/"
5454

5555
- name: Publish to npm
5656
run: yarn publish-to-npm

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx lint-staged

.yarnrc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
npmRegistryServer: 'https://registry.npmjs.org/'
1+
npmRegistryServer: "https://registry.npmjs.org/"
22

33
enableGlobalCache: true
44

55
nodeLinker: node-modules
66

7-
yarnPath: .yarn/releases/yarn-4.7.0.cjs
7+
yarnPath: .yarn/releases/yarn-4.7.0.cjs

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ yarn --cwd packages/app add @hpatoio/plugin-language-info
1717
Open `packages/app/src/components/catalog/EntityPage.tsx` and add
1818

1919
```tsx
20-
import { EntityLanguageInfoCard } from '@internal/plugin-language-info';
20+
import { EntityLanguageInfoCard } from "@internal/plugin-language-info";
2121
```
2222

2323
then `EntityLanguageInfoCard` in `overviewContent`
2424

2525
```tsx
2626
<Grid item md={6}>
27-
<EntityLanguageInfoCard />
27+
<EntityLanguageInfoCard />
2828
</Grid>
2929
```
3030

@@ -46,4 +46,4 @@ metadata:
4646

4747
# Dependencies
4848

49-
This plugin requires `plugin-language-info-backend`.
49+
This plugin requires `plugin-language-info-backend`.

lerna.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
3-
"version": "1.0.0",
4-
"npmClient": "yarn"
5-
}
2+
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
3+
"version": "1.0.0",
4+
"npmClient": "yarn"
5+
}

package.json

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,15 @@
88
"license": "Apache-2.0",
99
"devDependencies": {
1010
"@backstage/cli": "^0.29.0",
11-
"@semantic-release/changelog": "^6.0.3",
12-
"@semantic-release/commit-analyzer": "^10.0.4",
13-
"@semantic-release/git": "^10.0.1",
14-
"@semantic-release/github": "^9.2.6",
15-
"@semantic-release/npm": "^11.0.3",
16-
"@semantic-release/release-notes-generator": "^12.1.0",
17-
"conventional-changelog-conventionalcommits": "^8.0.0",
18-
"husky": "^9.1.6",
11+
"husky": "^9.1.7",
1912
"lerna": "8.1.9",
20-
"semantic-release": "^24.2.0",
21-
"typescript": "^5.6.3"
13+
"typescript": "5.8.2"
2214
},
2315
"workspaces": [
2416
"packages/*"
2517
],
2618
"scripts": {
2719
"build": "lerna run build",
28-
"build:doc": "lerna run build:doc",
2920
"lint": "backstage-cli repo lint",
3021
"lint:all": "yarn lint && yarn prettier:check",
3122
"test": "CI=true lerna --scope '@hpatoio/*' run test",
@@ -40,5 +31,8 @@
4031
"dist-types/*/dist",
4132
"LICENSE"
4233
],
34+
"lint-staged": {
35+
"*": "yarn lint:all"
36+
},
4337
"packageManager": "yarn@4.7.0"
4438
}
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import { createDevApp } from '@backstage/dev-utils';
2-
import { languageInfoPlugin} from '../src/plugin';
1+
import { createDevApp } from "@backstage/dev-utils";
2+
import { languageInfoPlugin } from "../src/plugin";
33

4-
createDevApp()
5-
.registerPlugin(languageInfoPlugin)
6-
.render();
4+
createDevApp().registerPlugin(languageInfoPlugin).render();
Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,42 @@
1-
import {
2-
useEntity,
3-
} from '@backstage/plugin-catalog-react';
4-
import {
5-
AboutField
6-
} from '@backstage/plugin-catalog';
7-
8-
9-
import React from 'react';
1+
import { useEntity } from "@backstage/plugin-catalog-react";
2+
import { AboutField } from "@backstage/plugin-catalog";
103

11-
import { Card, CardHeader, CardContent, Divider, Grid } from '@material-ui/core';
4+
import React from "react";
125

6+
import {
7+
Card,
8+
CardHeader,
9+
CardContent,
10+
Divider,
11+
Grid,
12+
} from "@material-ui/core";
1313

1414
/**
1515
* Card for the catalog (entity page) that shows the language info
1616
*
1717
* @public
1818
*/
1919
export const EntityLanguageInfoCard = () => {
20-
2120
const { entity } = useEntity();
22-
21+
2322
return (
2423
<Card className="gridItemCard">
25-
<CardHeader
26-
title='Language Info'
27-
/>
24+
<CardHeader title="Language Info" />
2825
<Divider />
2926
<CardContent className="gridItemCardContent">
3027
<Grid container>
3128
<AboutField
32-
label='Language'
29+
label="Language"
3330
value={entity.metadata.annotations?.["language-info/name"]}
3431
gridSizes={{ xs: 12, sm: 6, lg: 4 }}
3532
/>
3633
<AboutField
37-
label='Version'
34+
label="Version"
3835
value={entity.metadata.annotations?.["language-info/version"]}
3936
gridSizes={{ xs: 12, sm: 6, lg: 4 }}
4037
/>
4138
</Grid>
4239
</CardContent>
4340
</Card>
4441
);
45-
};
42+
};
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export { EntityLanguageInfoCard } from './EntityLanguageInfoCard';
1+
export { EntityLanguageInfoCard } from "./EntityLanguageInfoCard";

0 commit comments

Comments
 (0)