Move ESLint configuration to project root (#28639)

Signed-off-by: Jon Koops <jonkoops@gmail.com>
This commit is contained in:
Jon Koops 2024-04-12 10:34:18 +02:00 committed by GitHub
parent 3da58c34fa
commit 13aabf4022
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 19 additions and 47 deletions

View file

@ -1,3 +0,0 @@
{
"eslint.workingDirectories": ["js"]
}

View file

@ -37,11 +37,6 @@ export default tseslint.config(
tsconfigRootDir: import.meta.dirname,
},
},
settings: {
react: {
version: "detect",
},
},
rules: {
// ## Rules overwriting config, disabled for now, but will have to be evaluated. ##
"no-undef": "off",

View file

@ -7,4 +7,4 @@ if [ ! -f "$FILE" ]; then
exit 0;
fi
ESLINT_USE_FLAT_CONFIG=true pnpm exec lint-staged
pnpm exec lint-staged

View file

@ -1,3 +0,0 @@
{
"singleQuote": false
}

View file

@ -1,8 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "../../../tsconfig.json",
"include": ["src"],
"exclude": [
"**/*.test.ts",
"**/*.test.tsx"
]
"exclude": ["**/*.test.ts", "**/*.test.tsx"]
}

View file

@ -6,7 +6,7 @@ import type RoleRepresentation from "@keycloak/keycloak-admin-client/lib/defs/ro
import type { RoleMappingPayload } from "@keycloak/keycloak-admin-client/lib/defs/roleRepresentation";
import type { UserProfileConfig } from "@keycloak/keycloak-admin-client/lib/defs/userProfileMetadata";
import type UserRepresentation from "@keycloak/keycloak-admin-client/lib/defs/userRepresentation";
import { Credentials } from "libs/keycloak-admin-client/lib/utils/auth";
import { Credentials } from "@keycloak/keycloak-admin-client/lib/utils/auth";
import { merge } from "lodash-es";
class AdminClient {

View file

@ -1,9 +1,6 @@
{
"extends": "../../tsconfig.json",
"extends": "../../../tsconfig.json",
"include": ["src"],
"exclude": [
"**/*.test.ts",
"**/*.test.tsx"
],
"exclude": ["**/*.test.ts", "**/*.test.tsx"],
"references": [{ "path": "./tsconfig.node.json" }]
}

View file

@ -1,5 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "../../../tsconfig.json",
"include": ["src"],
"compilerOptions": {
"module": "Node16",

View file

@ -1,8 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "../../../tsconfig.json",
"include": ["src"],
"exclude": [
"**/*.test.ts",
"**/*.test.tsx"
]
"exclude": ["**/*.test.ts", "**/*.test.tsx"]
}

View file

@ -1,8 +1,5 @@
{
"extends": "../../tsconfig.json",
"extends": "../../../tsconfig.json",
"include": ["src"],
"exclude": [
"**/*.test.ts",
"**/*.test.tsx"
]
"exclude": ["**/*.test.ts", "**/*.test.tsx"]
}

View file

@ -1,8 +0,0 @@
import path from "node:path";
const CONFIG_PATH = path.resolve(import.meta.dirname, "eslint.config.js");
export default {
"*.{js,jsx,mjs,ts,tsx}": (filenames) =>
`eslint --config ${CONFIG_PATH} --cache --fix ${filenames.join(" ")}`,
};

View file

@ -1,6 +1,7 @@
{
"name": "root",
"type": "module",
"packageManager": "pnpm@8.15.5",
"scripts": {
"prepare": "husky js/.husky"
},
@ -24,5 +25,7 @@
"typescript-eslint": "^7.6.0",
"wireit": "^0.14.4"
},
"packageManager": "pnpm@8.15.5"
"lint-staged": {
"*.{js,jsx,mjs,ts,tsx}": "eslint --cache --fix"
}
}

View file

@ -15,6 +15,6 @@
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
"baseUrl": "./",
"baseUrl": "./"
}
}