Skip to content

Commit

Permalink
fix: changes in configuration to fix some lingering eslint warnings (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
meinte authored Jul 13, 2024
1 parent 23cddbc commit bf3ef3c
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
turbo lint:fix
npx turbo lint:fix
2 changes: 1 addition & 1 deletion apps/historia/src/blocks/content.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Block, Field } from 'payload/types';
import type { Block } from 'payload/types';

import { richText } from '../fields/richText';

Expand Down
4 changes: 4 additions & 0 deletions apps/web/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@ module.exports = {
root: true,
extends: ['@eventuras/eslint-config/next.js'],
parser: '@typescript-eslint/parser',
globals: {
RequestInit: true,
ResponseInit: true
}
};
1 change: 1 addition & 0 deletions apps/web/src/app/user/events/[id]/EventFlow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import RegistrationView from './eventflow/RegistrationView';
export interface EventFlowProps {
eventInfo: EventDto;
user: UserDto;

availableProducts: ProductDto[];
siteInfo: SiteInfo;
registration?: RegistrationDto;
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/BaseLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const Link = React.forwardRef<HTMLAnchorElement, LinkProps & BoxProps>((p
let variantClasses = '';
if (variant?.startsWith('button-')) {
const buttonVariant = variant.replace('button-', '');
if (buttonStyles.hasOwnProperty(buttonVariant)) {
if (Object.hasOwnProperty.call(buttonStyles, buttonVariant)) {
variantClasses = buttonStyles[buttonVariant as keyof typeof buttonStyles];
}
}
Expand Down
8 changes: 5 additions & 3 deletions libs/eslint-config/library.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const project = resolve(process.cwd(), "tsconfig.json");
/** @type {import("eslint").Linter.Config} */
module.exports = {
extends: ["eslint:recommended", "prettier", "eslint-config-turbo"],
plugins: ["only-warn", "import"],
plugins: ["only-warn", "import","@typescript-eslint"],
globals: {
React: true,
JSX: true,
Expand All @@ -31,7 +31,9 @@ module.exports = {
files: ["*.js?(x)", "*.ts?(x)"],
},
],
rules: {
rules:{
"import/no-duplicates": "error",
},
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error"]
}
};
1 change: 1 addition & 0 deletions libs/eslint-config/next.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ module.exports = {
'@typescript-eslint/no-explicit-any': 'off',
'turbo/no-undeclared-env-vars': 'off',
"import/no-duplicates": "error",

},
settings: {
'import/resolver': {
Expand Down
8 changes: 6 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@
"@commitlint/config-conventional": "^19.2.2",
"@eventuras/eslint-config": "*",
"@eventuras/typescript-config": "*",
"@typescript-eslint/eslint-plugin": "^7.16.0",
"@typescript-eslint/parser": "^7.16.0",
"eslint": "^8.57.0",
"eslint-plugin-import": "^2.29.1",
"prettier": "^3.3.2",
"turbo": "^2.0.6"
"turbo": "^2.0.6",
"typescript": "^5.5.3",
"husky": "^9.0.11"
},
"workspaces": [
"apps/docsite",
Expand All @@ -37,7 +41,6 @@
"prepare": "husky"
},
"dependencies": {
"husky": "^9.0.11",
"next": "^14.2.4",
"nextra": "^2.13.4",
"nextra-theme-docs": "^2.13.4",
Expand Down
42 changes: 27 additions & 15 deletions turbo.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,40 @@
{
"$schema": "https://turbo.build/schema.json",
"globalDependencies": [
"**/.env.*local",
"**/.env"
"globalDependencies": ["**/.env.*local", "**/.env"],
"globalEnv": [
"CMS_SECRET",
"CMS_SERVER_URL",
"CMS_ALLOWED_ORIGINS",
"CMS_DATABASE_URL",
"CMS_MEDIA_S3_ACCESS_KEY_ID",
"CMS_MEDIA_S3_SECRET_ACCESS_KEY",
"CMS_MEDIA_S3_ENDPOINT",
"CMS_MEDIA_S3_REGION",
"CMS_MEDIA_S3_BUCKET",
"TEST_E2E_EMAIL_ADMIN",
"TEST_E2E_EMAIL_USER",
"TEST_EMAIL_APP_API_KEY",
"TEST_EMAIL_APP_API_URL",
"CI",
"TEST_BASE_URL"
],
"tasks": {
"build": {
"dependsOn": [
"^build"
],
"outputs": [
".next/**",
"!.next/cache/**"
"dependsOn": ["^build"],
"outputs": [".next/**", "!.next/cache/**"],
"inputs": [
"$TURBO_DEFAULT$",
".env.production.local",
".env.local",
".env.production",
".env"
]
},
"lint": {
"dependsOn": [
"^lint"
]
"dependsOn": ["^lint"]
},
"lint:fix": {
"dependsOn": [
"^lint:fix"
]
"dependsOn": ["^lint:fix"]
},
"dev": {
"cache": false,
Expand Down

0 comments on commit bf3ef3c

Please sign in to comment.