Move ESLint configuration to project root (#28639)
Signed-off-by: Jon Koops <jonkoops@gmail.com>
This commit is contained in:
parent
3da58c34fa
commit
13aabf4022
14 changed files with 19 additions and 47 deletions
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
"eslint.workingDirectories": ["js"]
|
|
||||||
}
|
|
|
@ -37,11 +37,6 @@ export default tseslint.config(
|
||||||
tsconfigRootDir: import.meta.dirname,
|
tsconfigRootDir: import.meta.dirname,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
settings: {
|
|
||||||
react: {
|
|
||||||
version: "detect",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
rules: {
|
rules: {
|
||||||
// ## Rules overwriting config, disabled for now, but will have to be evaluated. ##
|
// ## Rules overwriting config, disabled for now, but will have to be evaluated. ##
|
||||||
"no-undef": "off",
|
"no-undef": "off",
|
|
@ -7,4 +7,4 @@ if [ ! -f "$FILE" ]; then
|
||||||
exit 0;
|
exit 0;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ESLINT_USE_FLAT_CONFIG=true pnpm exec lint-staged
|
pnpm exec lint-staged
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
"singleQuote": false
|
|
||||||
}
|
|
|
@ -1,8 +1,5 @@
|
||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../../tsconfig.json",
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"exclude": [
|
"exclude": ["**/*.test.ts", "**/*.test.tsx"]
|
||||||
"**/*.test.ts",
|
|
||||||
"**/*.test.tsx"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 { RoleMappingPayload } from "@keycloak/keycloak-admin-client/lib/defs/roleRepresentation";
|
||||||
import type { UserProfileConfig } from "@keycloak/keycloak-admin-client/lib/defs/userProfileMetadata";
|
import type { UserProfileConfig } from "@keycloak/keycloak-admin-client/lib/defs/userProfileMetadata";
|
||||||
import type UserRepresentation from "@keycloak/keycloak-admin-client/lib/defs/userRepresentation";
|
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";
|
import { merge } from "lodash-es";
|
||||||
|
|
||||||
class AdminClient {
|
class AdminClient {
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../../tsconfig.json",
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"exclude": [
|
"exclude": ["**/*.test.ts", "**/*.test.tsx"],
|
||||||
"**/*.test.ts",
|
|
||||||
"**/*.test.tsx"
|
|
||||||
],
|
|
||||||
"references": [{ "path": "./tsconfig.node.json" }]
|
"references": [{ "path": "./tsconfig.node.json" }]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../../tsconfig.json",
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"module": "Node16",
|
"module": "Node16",
|
||||||
|
|
|
@ -1,8 +1,5 @@
|
||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../../tsconfig.json",
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"exclude": [
|
"exclude": ["**/*.test.ts", "**/*.test.tsx"]
|
||||||
"**/*.test.ts",
|
|
||||||
"**/*.test.tsx"
|
|
||||||
]
|
|
||||||
}
|
}
|
|
@ -1,8 +1,5 @@
|
||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../../tsconfig.json",
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"exclude": [
|
"exclude": ["**/*.test.ts", "**/*.test.tsx"]
|
||||||
"**/*.test.ts",
|
|
||||||
"**/*.test.tsx"
|
|
||||||
]
|
|
||||||
}
|
}
|
|
@ -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(" ")}`,
|
|
||||||
};
|
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "root",
|
"name": "root",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
"packageManager": "pnpm@8.15.5",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"prepare": "husky js/.husky"
|
"prepare": "husky js/.husky"
|
||||||
},
|
},
|
||||||
|
@ -24,5 +25,7 @@
|
||||||
"typescript-eslint": "^7.6.0",
|
"typescript-eslint": "^7.6.0",
|
||||||
"wireit": "^0.14.4"
|
"wireit": "^0.14.4"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@8.15.5"
|
"lint-staged": {
|
||||||
|
"*.{js,jsx,mjs,ts,tsx}": "eslint --cache --fix"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,6 @@
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
"jsx": "react-jsx",
|
"jsx": "react-jsx",
|
||||||
"baseUrl": "./",
|
"baseUrl": "./"
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue