Skip to content

Commit

Permalink
fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sitek94 committed Nov 26, 2023
1 parent b59cb86 commit 60b8694
Show file tree
Hide file tree
Showing 14 changed files with 81 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ lerna-debug.log*

# Misc
.cache

tsconfig.tsbuildinfo


16 changes: 15 additions & 1 deletion apps/docs/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
/** @type {import("eslint").Linter.Config} */
module.exports = {
// extends: ["@repo/eslint-config/storybook.js"],
extends: [
'@repo/eslint-config/base',
'@repo/eslint-config/react',
'plugin:storybook/recommended',
],
overrides: [
{
files: ['*.stories.tsx'],
rules: {
// For some reason it shows errors for imports from @repo/ui, even though they are resolved correctly.
// Both develop and build work fine, so I'm disabling it for now.
'import/no-unresolved': 'off',
},
},
],
}
1 change: 1 addition & 0 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"@storybook/theming": "^7.5.3",
"@vitejs/plugin-react": "^4.2.0",
"eslint": "^8.54.0",
"eslint-plugin-storybook": "^0.6.15",
"postcss": "^8.4.31",
"serve": "^14.2.1",
"storybook": "^7.5.3",
Expand Down
3 changes: 1 addition & 2 deletions apps/docs/stories/button.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Meta, StoryObj } from '@storybook/react'
import { Button } from '@repo/ui'

Check failure on line 1 in apps/docs/stories/button.stories.tsx

View workflow job for this annotation

GitHub Actions / ʦ TypeScript

Cannot find module '@repo/ui' or its corresponding type declarations.
import type { Meta, StoryObj } from '@storybook/react'

const meta: Meta<typeof Button> = {
component: Button,
Expand All @@ -9,7 +9,6 @@ const meta: Meta<typeof Button> = {
options: ['button', 'submit', 'reset'],
},
},

}

export default meta
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Config } from 'tailwindcss'
import sharedConfig from '@repo/tailwind-config/tailwind.config'
import type { Config } from 'tailwindcss'

const config: Pick<Config, 'presets'> = {
presets: [sharedConfig],
Expand Down
15 changes: 14 additions & 1 deletion apps/docs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
{
"extends": "@repo/tsconfig/react-app.json",
"extends": "../../tsconfig.json",
"compilerOptions": {
"allowJs": true,
"declaration": false,
"declarationMap": false,
"incremental": true,
"jsx": "preserve",
"lib": ["dom", "dom.iterable", "esnext"],
"module": "esnext",
"noEmit": true,
"resolveJsonModule": true,
"target": "es5",
"skipLibCheck": true
},
"include": ["."],
"exclude": ["dist", "build", "node_modules"]
}
4 changes: 4 additions & 0 deletions libs/tailwind-config/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/** @type {import('eslint').Linter.Config} */
module.exports = {
extends: ['@repo/eslint-config/base'],
}
1 change: 1 addition & 0 deletions libs/tailwind-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"main": "index.ts",
"types": "index.ts",
"devDependencies": {
"@repo/eslint-config": "workspace:^",
"@tailwindcss/forms": "^0.5.7",
"@tailwindcss/typography": "^0.5.10",
"tailwindcss": "^3.3.5"
Expand Down
3 changes: 1 addition & 2 deletions libs/tailwind-config/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import typographyPlugin from '@tailwindcss/typography'
import formsPlugin from '@tailwindcss/forms'
import typographyPlugin from '@tailwindcss/typography'
import type { Config } from 'tailwindcss'

import tailwindColors from 'tailwindcss/colors'

export default {
Expand Down
5 changes: 3 additions & 2 deletions libs/ui/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/** @type {import('eslint').Linter.Config} */
module.exports = {
extends: ["custom/react"],
};
extends: ['@repo/eslint-config/base', '@repo/eslint-config/react'],
}
7 changes: 4 additions & 3 deletions libs/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@
"develop": "tsup --watch",
"check-types": "tsc --noEmit"
},
"peerDependencies": {
"react": "^18.2.0"
},
"devDependencies": {
"@repo/eslint-config": "workspace:^",
"@repo/tailwind-config": "workspace:^",
"@repo/tsconfig": "workspace:^",
"@types/react": "^18.2.5",
Expand All @@ -36,5 +34,8 @@
"tailwindcss": "^3.3.5",
"tsup": "^6.0.1",
"typescript": "^5.3.2"
},
"peerDependencies": {
"react": "^18.2.0"
}
}
2 changes: 1 addition & 1 deletion libs/ui/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Config } from 'tailwindcss'
import sharedConfig from '@repo/tailwind-config/tailwind.config.ts'
import type { Config } from 'tailwindcss'

const config: Pick<Config, 'presets'> = {
presets: [sharedConfig],
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"develop:ui": "pnpm -F ui develop",
"develop": "pnpm -r develop",
"format": "prettier --write .",
"lint:fix": "pnpm lint -fix",
"lint:fix": "pnpm lint --fix",
"lint": "eslint --ext .ts,.tsx ./apps ./libs",
"start:docs": "pnpm -F docs start",
"start:nestjs": "pnpm -F nestjs start",
Expand Down Expand Up @@ -47,5 +47,6 @@
"engines": {
"node": ">=20",
"pnpm": "8"
}
},
"packageManager": "[email protected]"
}
31 changes: 31 additions & 0 deletions pnpm-lock.yaml

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

0 comments on commit 60b8694

Please sign in to comment.