chore(deps): update dependency eslint to v9 (#452)

* chore(deps): update dependency eslint to v9

* chore: migrate eslint to v9

* fix: dependency issues

* fix: unit tests not working

* chore: disable lint check for Image component that does not work in ci

* fix: lint issue

---------

Co-authored-by: homarr-renovate[bot] <158783068+homarr-renovate[bot]@users.noreply.github.com>
Co-authored-by: Meier Lukas <meierschlumpf@gmail.com>
This commit is contained in:
homarr-renovate[bot]
2024-06-08 20:49:57 +02:00
committed by GitHub
parent d7ecdf5567
commit 1bae7352dc
117 changed files with 686 additions and 604 deletions

View File

@@ -15,14 +15,12 @@ export default function generator(plop: PlopTypes.NodePlopAPI): void {
{
type: "input",
name: "name",
message:
"What is the name of the package? (You can skip the `@homarr/` prefix)",
message: "What is the name of the package? (You can skip the `@homarr/` prefix)",
},
{
type: "input",
name: "deps",
message:
"Enter a space separated list of dependencies you would like to install",
message: "Enter a space separated list of dependencies you would like to install",
},
],
actions: [
@@ -34,6 +32,11 @@ export default function generator(plop: PlopTypes.NodePlopAPI): void {
}
return "Config sanitized";
},
{
type: "add",
path: "packages/{{ name }}/eslint.config.js",
templateFile: "templates/eslint.config.js.hbs",
},
{
type: "add",
path: "packages/{{ name }}/package.json",
@@ -61,9 +64,7 @@ export default function generator(plop: PlopTypes.NodePlopAPI): void {
if ("deps" in answers && typeof answers.deps === "string") {
const pkg = JSON.parse(content) as PackageJson;
for (const dep of answers.deps.split(" ").filter(Boolean)) {
const version = await fetch(
`https://registry.npmjs.org/-/package/${dep}/dist-tags`,
)
const version = await fetch(`https://registry.npmjs.org/-/package/${dep}/dist-tags`)
.then((res) => res.json())
.then((json) => json.latest);
if (!pkg.dependencies) pkg.dependencies = {};
@@ -83,9 +84,7 @@ export default function generator(plop: PlopTypes.NodePlopAPI): void {
// stdio: "inherit",
// });
execSync("pnpm i", { stdio: "inherit" });
execSync(
`pnpm prettier --write packages/${answers.name}/** --list-different`,
);
execSync(`pnpm prettier --write packages/${answers.name}/** --list-different`);
return "Package scaffolded";
}
return "Package not scaffolded";

View File

@@ -0,0 +1,9 @@
import baseConfig from "@homarr/eslint-config/base";
/** @type {import('typescript-eslint').Config} */
export default [
{
ignores: [],
},
...baseConfig,
];

View File

@@ -2,6 +2,7 @@
"name": "@homarr/{{name}}",
"private": true,
"version": "0.1.0",
"type": "module",
"exports": {
".": "./index.ts"
},
@@ -15,7 +16,7 @@
"license": "MIT",
"scripts": {
"clean": "rm -rf .turbo node_modules",
"lint": "eslint .",
"lint": "eslint",
"format": "prettier --check . --ignore-path ../../.gitignore",
"typecheck": "tsc --noEmit"
},
@@ -23,13 +24,8 @@
"@homarr/eslint-config": "workspace:^0.2.0",
"@homarr/prettier-config": "workspace:^0.1.0",
"@homarr/tsconfig": "workspace:^0.1.0",
"eslint": "^8.57.0",
"eslint": "^9.4.0",
"typescript": "^5.4.5"
},
"eslintConfig": {
"extends": [
"@homarr/eslint-config/base"
]
},
"prettier": "@homarr/prettier-config"
}