Skip to content

Commit

Permalink
chore: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Lehoczky committed Oct 31, 2024
1 parent 49bd6e4 commit 41569db
Show file tree
Hide file tree
Showing 35 changed files with 1,901 additions and 2,898 deletions.
3 changes: 0 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ insert_final_newline = true
trim_trailing_whitespace = true
indent_size = 2

[*.py]
indent_size = 4

[*.md]
max_line_length = off
trim_trailing_whitespace = false
4 changes: 0 additions & 4 deletions .eslintrc.cjs

This file was deleted.

4 changes: 3 additions & 1 deletion .prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import config from "@lehoczky/prettier-config"

/** @type {import("prettier").Options} */
/**
* @type {import("prettier").Options & import('prettier-plugin-tailwindcss').PluginOptions}
*/
export default {
...config,
plugins: ["prettier-plugin-astro", "prettier-plugin-tailwindcss"],
Expand Down
22 changes: 0 additions & 22 deletions .stylelintrc.json

This file was deleted.

1 change: 0 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"dbaeumer.vscode-eslint",
"davidanson.vscode-markdownlint",
"esbenp.prettier-vscode",
"stylelint.vscode-stylelint",
"streetsidesoftware.code-spell-checker",
"astro-build.astro-vscode",
"vitest.explorer"
Expand Down
3 changes: 0 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit",
"source.fixAll.stylelint": "explicit"
},
"css.validate": false,
"stylelint.validate": ["css", "vue"],
"tailwindCSS.experimental.classRegex": [
["cn\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
],
Expand Down
31 changes: 31 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// @ts-check
import { configLehoczkyVitest } from "@lehoczky/eslint-config-vitest"
import { configLehoczkyVue } from "@lehoczky/eslint-config-vue"
import eslintPluginAstro from "eslint-plugin-astro"

/** @type {import("eslint").Linter.Config[]} */
export default [
...configLehoczkyVue({
parserOptionsForTypeChecking: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
}),
...configLehoczkyVitest(),
{
rules: {
"vitest/expect-expect": [
"warn",
{
assertFunctionNames: [
"expect",
"run",
"runAndExpectToThrow",
"runAndExpectToThrowWithOptions",
],
},
],
},
},
...eslintPluginAstro.configs["flat/recommended"],
]
22 changes: 10 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,24 @@
"private": true,
"scripts": {
"lint": "npm run eslint:fix && npm run styles:check && npm run format:write",
"eslint:fix": "eslint . --ext .ts,js,vue --max-warnings=0 --fix",
"styles:check": "stylelint \"./**/*.{css,vue}\" --ignore-path=.gitignore",
"eslint:fix": "eslint --max-warnings=0 --fix",
"format:write": "prettier \"./**\" --write --ignore-unknown"
},
"devDependencies": {
"@lehoczky/eslint-config-vue": "^1.2.6",
"@lehoczky/prettier-config": "^1.1.7",
"@lehoczky/eslint-config-vitest": "^1.0.2",
"@lehoczky/eslint-config-vue": "^2.0.3",
"@lehoczky/prettier-config": "^2.0.0",
"@types/node": "catalog:",
"eslint": "^8.57.0",
"nx": "19.5.6",
"postcss": "^8.4.41",
"eslint": "^9.13.0",
"eslint-plugin-astro": "^1.3.0",
"nx": "20.0.6",
"postcss": "^8.4.47",
"postcss-html": "^1.7.0",
"prettier": "^3.3.3",
"prettier-plugin-astro": "^0.14.1",
"prettier-plugin-tailwindcss": "^0.6.6",
"stylelint": "^16.8.1",
"stylelint-config-recommended-vue": "^1.5.0",
"stylelint-config-standard": "^36.0.1",
"prettier-plugin-tailwindcss": "^0.6.8",
"typescript": "catalog:"
},
"nx": {},
"packageManager": "pnpm@9.7.0"
"packageManager": "pnpm@9.12.3"
}
10 changes: 5 additions & 5 deletions packages/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
"astro": "astro"
},
"dependencies": {
"@astrojs/check": "^0.9.2",
"@astrojs/tailwind": "^5.1.0",
"@astrojs/check": "^0.9.4",
"@astrojs/tailwind": "^5.1.2",
"@lehoczky/postcss-fluid": "workspace:*",
"@types/node": "catalog:",
"astro": "^4.13.3",
"astro": "^4.16.7",
"clsx": "^2.1.1",
"perfect-debounce": "^1.0.0",
"tailwind-merge": "^2.5.1",
"tailwindcss": "^3.4.9",
"tailwind-merge": "^2.5.4",
"tailwindcss": "^3.4.14",
"typescript": "catalog:"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/demo/src/components/DemoSection.astro
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
import type { HTMLAttributes } from "astro/types"
import { Code } from "astro:components"
import ResizableWindow from "./ResizableWindow.astro"
import { cn } from "../utils/cn"
import ResizableWindow from "./ResizableWindow.astro"
export interface Props extends HTMLAttributes<"section"> {
code: string
Expand Down
3 changes: 1 addition & 2 deletions packages/demo/src/components/GitHubBadge.astro
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
import GithubLink, { type Props as GithubLinkProps } from "./GitHubLink.astro"
import { cn } from "../utils/cn"
import GithubLink, { type Props as GithubLinkProps } from "./GitHubLink.astro"
export interface Props extends GithubLinkProps {}
Expand Down
4 changes: 2 additions & 2 deletions packages/demo/src/components/ResizableWindow.astro
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
import ResizableWindowDimensions from "./ResizableWindowDimensions.astro"
import ResizableWindowHeader from "./ResizableWindowHeader.astro"
import type { HTMLAttributes } from "astro/types"
import { cn } from "../utils/cn"
import ResizableWindowDimensions from "./ResizableWindowDimensions.astro"
import ResizableWindowHeader from "./ResizableWindowHeader.astro"
export interface Props extends HTMLAttributes<"div"> {}
Expand Down
4 changes: 2 additions & 2 deletions packages/demo/src/components/ResizableWindowHeader.astro
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
import IconHamburger from "./IconHamburger.astro"
import IconLockClosed from "./IconLockClosed.astro"
import type { HTMLAttributes } from "astro/types"
import { cn } from "../utils/cn"
import IconHamburger from "./IconHamburger.astro"
import IconLockClosed from "./IconLockClosed.astro"
export interface Props extends HTMLAttributes<"div"> {}
Expand Down
2 changes: 1 addition & 1 deletion packages/demo/src/components/ScreenWidthWarning.astro
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
import IconWarning from "./IconWarning.astro"
import type { HTMLAttributes } from "astro/types"
import { cn } from "../utils/cn"
import IconWarning from "./IconWarning.astro"
export interface Props extends HTMLAttributes<"div"> {}
Expand Down
4 changes: 2 additions & 2 deletions packages/demo/src/layouts/MainLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
<link
rel="icon"
type="image/svg+xml"
href={import.meta.env.BASE_URL + "/favicon.svg"}
href={`${import.meta.env.BASE_URL }/favicon.svg`}
/>
<meta name="generator" content={Astro.generator} />
<base href={import.meta.env.BASE_URL + "/"} />
<base href={`${import.meta.env.BASE_URL }/`} />
<title>PostCSS Fluid Demo</title>
</head>
<body class="bg-base-800 font-sans text-base-300">
Expand Down
1 change: 1 addition & 0 deletions packages/demo/src/pages/examples/box-to-circle.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
import "../../assets/box-to-circle.example.css"
import ExampleLayout from "../../layouts/ExampleLayout.astro"
---

Expand Down
1 change: 1 addition & 0 deletions packages/demo/src/pages/examples/fluid-border.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
import "../../assets/fluid-border.example.css"
import ExampleLayout from "../../layouts/ExampleLayout.astro"
---

Expand Down
1 change: 1 addition & 0 deletions packages/demo/src/pages/examples/fluid-grid-gap.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
import "../../assets/fluid-grid-gap.example.css"
import ExampleLayout from "../../layouts/ExampleLayout.astro"
---

Expand Down
1 change: 1 addition & 0 deletions packages/demo/src/pages/examples/growing-square.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
import "../../assets/growing-square.example.css"
import ExampleLayout from "../../layouts/ExampleLayout.astro"
---

Expand Down
1 change: 1 addition & 0 deletions packages/demo/src/pages/examples/padded-box.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
import "../../assets/padded-box.example.css"
import ExampleLayout from "../../layouts/ExampleLayout.astro"
---

Expand Down
1 change: 1 addition & 0 deletions packages/demo/src/pages/examples/positioned-box.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
import "../../assets/positioned-box.example.css"
import ExampleLayout from "../../layouts/ExampleLayout.astro"
---

Expand Down
1 change: 1 addition & 0 deletions packages/demo/src/pages/examples/shrinking-square.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
import "../../assets/shrinking-square.example.css"
import ExampleLayout from "../../layouts/ExampleLayout.astro"
---

Expand Down
1 change: 1 addition & 0 deletions packages/demo/src/pages/examples/typography.astro
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
import "../../assets/typography.example.css"
import ExampleLayout from "../../layouts/ExampleLayout.astro"
---

Expand Down
11 changes: 5 additions & 6 deletions packages/demo/src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
---
import MainLayout from "../layouts/MainLayout.astro"
import GitHubBadge from "../components/GitHubBadge.astro"
import GitHubLink from "../components/GitHubLink.astro"
import IconGitHub from "../components/IconGitHub.astro"
import ScreenWidthWarning from "../components/ScreenWidthWarning.astro"
import boxToCircleExample from "../assets/box-to-circle.example.css?raw"
import fluidBorderExample from "../assets/fluid-border.example.css?raw"
import fluidGridGapExample from "../assets/fluid-grid-gap.example.css?raw"
Expand All @@ -14,6 +8,11 @@ import positionedBoxExample from "../assets/positioned-box.example.css?raw"
import shrinkingSquareExample from "../assets/shrinking-square.example.css?raw"
import typographyExample from "../assets/typography.example.css?raw"
import DemoSection from "../components/DemoSection.astro"
import GitHubBadge from "../components/GitHubBadge.astro"
import GitHubLink from "../components/GitHubLink.astro"
import IconGitHub from "../components/IconGitHub.astro"
import ScreenWidthWarning from "../components/ScreenWidthWarning.astro"
import MainLayout from "../layouts/MainLayout.astro"
---

<MainLayout title="Welcome to Astro.">
Expand Down
3 changes: 2 additions & 1 deletion packages/demo/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import containerQueries from "@tailwindcss/container-queries"
import type { Config } from "tailwindcss"

export default {
Expand All @@ -20,5 +21,5 @@ export default {
},
},
},
plugins: [require("@tailwindcss/container-queries")],
plugins: [containerQueries],
} satisfies Config
2 changes: 1 addition & 1 deletion packages/playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"devDependencies": {
"@lehoczky/postcss-fluid": "workspace:*",
"@types/node": "catalog:",
"postcss": "^8.4.41",
"postcss": "^8.4.47",
"postcss-cli": "^11.0.0",
"typescript": "catalog:"
}
Expand Down
4 changes: 2 additions & 2 deletions packages/postcss-fluid/lib/function.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ function getParsedArguments(
if (args.length !== 4) {
throw new Error(`Function expects 4 arguments, but got: ${args.length}`)
}
args.forEach((argument, i) => {
for (const [i, argument] of args.entries()) {
if (isBoolean(argument)) {
const originalArg = rawArgs[i]
throw new Error(`Argument "${originalArg}"'s quantity cannot be parsed`)
}
})
}
return args as Dimension[]
}

Expand Down
1 change: 0 additions & 1 deletion packages/postcss-fluid/lib/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-throw-literal */
import type { Plugin } from "postcss"
import valueParser from "postcss-value-parser"

Expand Down
9 changes: 5 additions & 4 deletions packages/postcss-fluid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"private": false,
"description": "PostCSS plugin that makes it easier to work with fluid css values.",
"scripts": {
"build": "tsc",
"clean-dist": "node -e \"fs.rmSync('dist', { force: true, recursive: true })\"",
"build": "npm run clean-dist && tsc -p tsconfig.build.json",
"test": "vitest run",
"test:coverage": "vitest run --coverage"
},
Expand All @@ -26,10 +27,10 @@
},
"devDependencies": {
"@types/node": "catalog:",
"@vitest/coverage-v8": "^2.0.5",
"postcss": "^8.4.41",
"@vitest/coverage-v8": "^2.1.4",
"postcss": "^8.4.47",
"typescript": "catalog:",
"vitest": "^2.0.5"
"vitest": "^2.1.4"
},
"keywords": [
"postcss",
Expand Down
Loading

0 comments on commit 41569db

Please sign in to comment.