Skip to content

Commit

Permalink
refactor: minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Rel1cx committed Feb 19, 2025
1 parent 66fc49c commit 2a6a82e
Show file tree
Hide file tree
Showing 32 changed files with 375 additions and 375 deletions.
2 changes: 1 addition & 1 deletion .pkgs/eslint-plugin-local/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"scripts": {
"build": "tsup",
"lint:publish": "publint",
"lint:type": "tsc --noEmit"
"lint:ts": "tsc --noEmit"
},
"dependencies": {
"@eslint-react/ast": "workspace:*",
Expand Down
10 changes: 5 additions & 5 deletions apps/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"scripts": {
"build": "next build",
"dev": "next dev",
"lint": "pnpm run lint:ts && pnpm run lint:type",
"lint": "pnpm run lint:es && pnpm run lint:ts",
"lint:es": "eslint .",
"lint:markup": "markuplint \"**/*.{jsx,tsx}\"",
"lint:ts": "eslint .",
"lint:type": "tsc --noEmit",
"lint:ts": "tsc --noEmit",
"prepare": "fumadocs-mdx && pnpm run build",
"start": "next start"
},
Expand Down Expand Up @@ -49,7 +49,7 @@
"autoprefixer": "^10.4.20",
"dedent": "^1.5.3",
"eslint": "^9.20.1",
"eslint-plugin-de-morgan": "^1.0.1",
"eslint-plugin-de-morgan": "^1.1.0",
"eslint-plugin-import-x": "^4.6.1",
"eslint-plugin-mdx": "^3.1.5",
"eslint-plugin-perfectionist": "^4.9.0",
Expand All @@ -58,7 +58,7 @@
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-unicorn": "^57.0.0",
"markuplint": "^4.11.6",
"postcss": "^8.5.2",
"postcss": "^8.5.3",
"tailwindcss": "4.0.7",
"typescript": "^5.7.3",
"typescript-eslint": "^8.24.1"
Expand Down
12 changes: 6 additions & 6 deletions examples/dual-react-dom-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,22 @@
"build": "tsup",
"lint": "eslint .",
"lint:publish": "publint",
"lint:type": "tsc --noEmit",
"lint:ts": "tsc --noEmit",
"prepare": "pnpm run build"
},
"devDependencies": {
"eslint-plugin-react-x": "workspace:*",
"eslint-plugin-react-dom": "workspace:*",
"eslint-plugin-react-web-api": "workspace:*",
"eslint-plugin-react-hooks-extra": "workspace:*",
"eslint-plugin-react-naming-convention": "workspace:*",
"@eslint/js": "^9.20.0",
"@tsconfig/node22": "^22.0.0",
"@tsconfig/strictest": "^2.0.5",
"@types/node": "^22.13.4",
"@types/react": "^19.0.10",
"eslint": "^9.20.1",
"eslint-plugin-react-dom": "workspace:*",
"eslint-plugin-react-hooks": "^5.1.0",
"eslint-plugin-react-hooks-extra": "workspace:*",
"eslint-plugin-react-naming-convention": "workspace:*",
"eslint-plugin-react-web-api": "workspace:*",
"eslint-plugin-react-x": "workspace:*",
"eslint-plugin-vitest": "^0.5.4",
"react": "^19.0.0",
"tsup": "^8.3.6",
Expand Down
2 changes: 1 addition & 1 deletion examples/next-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"eslint-config-flat-gitignore": "^2.1.0",
"eslint-plugin-react-hooks": "^5.1.0",
"eslint-plugin-react-refresh": "^0.4.19",
"postcss": "^8.5.2",
"postcss": "^8.5.3",
"tailwindcss": "4.0.7",
"typescript": "^5.7.3",
"typescript-eslint": "^8.24.1"
Expand Down
2 changes: 1 addition & 1 deletion examples/vite-react-dom-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"eslint-plugin-react-refresh": "^0.4.19",
"typescript": "^5.7.3",
"typescript-eslint": "^8.24.1",
"vite": "^6.1.0"
"vite": "^6.1.1"
},
"engines": {
"node": ">=18.18.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/vite-react-dom-js-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"eslint-plugin-react-hooks": "^5.1.0",
"eslint-plugin-react-refresh": "^0.4.19",
"globals": "^15.15.0",
"vite": "^6.1.0"
"vite": "^6.1.1"
},
"engines": {
"node": ">=18.18.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"eslint-plugin-react-hooks": "^5.1.0",
"eslint-plugin-react-refresh": "^0.4.19",
"globals": "^15.15.0",
"vite": "^6.1.0"
"vite": "^6.1.1"
},
"engines": {
"node": ">=18.18.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"ts-blank-space": "^0.6.0",
"typescript": "^5.7.3",
"typescript-eslint": "^8.24.1",
"vite": "^6.1.0"
"vite": "^6.1.1"
},
"engines": {
"node": ">=18.18.0"
Expand Down
2 changes: 1 addition & 1 deletion lefthook.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ run = "pnpm run format:check"
# run = "pnpm run lint"

[pre-commit.commands.lint]
run = "pnpm run lint:deps && pnpm run lint:type"
run = "pnpm run lint:deps && pnpm run lint:ts"

[pre-commit.commands.add]
run = "git add ."
Expand Down
2 changes: 1 addition & 1 deletion nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"lint": {
"cache": true
},
"lint:type": {
"lint:ts": {
"cache": true
}
},
Expand Down
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@
"format:write": "dprint fmt",
"inspect:deps": "skott -e .ts",
"inspect:eslint-config": "eslint-config-inspector",
"lint": "pnpm run lint:deps && pnpm run lint:publish && pnpm run lint:type && concurrently \"pnpm run lint:ts\" \"pnpm run lint:examples\" \"pnpm run lint:website\"",
"lint": "pnpm run lint:deps && pnpm run lint:publish && pnpm run lint:ts && concurrently \"pnpm run lint:es\" \"pnpm run lint:examples\" \"pnpm run lint:website\"",
"lint:deps": "skott -m file-tree -e .ts -s",
"lint:examples": "pnpm m -F \"./examples/*\" run lint",
"lint:monorepo": "sherif",
"lint:publish": "pnpm m run lint:publish",
"lint:spell": "cspell lint --relative --no-progress \"**\"",
"lint:ts": "eslint . --max-warnings 100",
"lint:type": "pnpm m run lint:type",
"lint:es": "eslint . --max-warnings 100",
"lint:ts": "pnpm m run lint:ts",
"lint:website": "pnpm -F \"./apps/website\" run lint",
"prepare": "lefthook install && pnpm run build && pnpm run update:website",
"test": "vitest run --logHeapUsage",
Expand All @@ -60,8 +60,8 @@
"@local/configs": "workspace:*",
"@local/eslint-plugin-local": "workspace:*",
"@napi-rs/canvas": "^0.1.67",
"@stylistic/eslint-plugin": "^4.0.0",
"@swc/core": "^1.10.17",
"@stylistic/eslint-plugin": "^4.0.1",
"@swc/core": "^1.10.18",
"@tsconfig/node22": "^22.0.0",
"@tsconfig/strictest": "^2.0.5",
"@types/node": "^22.13.4",
Expand All @@ -78,7 +78,7 @@
"esbuild": "^0.25.0",
"eslint": "^9.20.1",
"eslint-config-flat-gitignore": "^2.1.0",
"eslint-plugin-de-morgan": "^1.0.1",
"eslint-plugin-de-morgan": "^1.1.0",
"eslint-plugin-jsdoc": "^50.6.3",
"eslint-plugin-perfectionist": "^4.9.0",
"eslint-plugin-regexp": "^2.7.0",
Expand All @@ -100,7 +100,7 @@
"tinyglobby": "^0.2.11",
"ts-pattern": "^5.6.2",
"tsup": "^8.3.6",
"tsx": "^4.19.2",
"tsx": "^4.19.3",
"type-fest": "^4.35.0",
"typedoc": "^0.27.7",
"typedoc-plugin-markdown": "^4.4.2",
Expand All @@ -115,19 +115,19 @@
},
"pnpm": {
"overrides": {
"is-core-module": "npm:@socketregistry/is-core-module@^1.0.7",
"safe-buffer": "npm:@socketregistry/safe-buffer@^1.0.6",
"safer-buffer": "npm:@socketregistry/safer-buffer@^1.0.6",
"typedarray": "npm:@socketregistry/typedarray@^1.0.5",
"@types/react": "^19.0.10",
"@types/react-dom": "^19.0.4",
"cross-spawn": "^7.0.6",
"esbuild": "^0.25.0",
"is-core-module": "npm:@socketregistry/is-core-module@^1.0.7",
"next": "^15.1.7",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"safe-buffer": "npm:@socketregistry/safe-buffer@^1.0.6",
"safer-buffer": "npm:@socketregistry/safer-buffer@^1.0.6",
"ts-api-utils": "^2.0.1",
"typedarray": "npm:@socketregistry/typedarray@^1.0.5",
"typescript": "^5.7.3"
"typescript": "5.8.1-rc"
}
}
}
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"build": "tsup",
"build:docs": "typedoc",
"lint:publish": "publint",
"lint:type": "tsc --noEmit",
"lint:ts": "tsc --noEmit",
"publish": "pnpm run build && pnpm run lint:publish"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/eslint-plugin-react-debug/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"scripts": {
"build": "tsup --dts-resolve",
"lint:publish": "publint",
"lint:type": "tsc --noEmit",
"lint:ts": "tsc --noEmit",
"publish": "pnpm run build && pnpm run lint:publish"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/eslint-plugin-react-debug/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ function makeConfig(config: { name: string; rules: RulePreset }) {
};
}

function makeLegacyConfig(config: { rules: RulePreset }) {
function makeLegacyConfig({ rules }: { rules: RulePreset }) {
return {
plugins: ["react-debug"],
rules: config.rules,
rules,
};
}

Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/eslint-plugin-react-dom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"scripts": {
"build": "tsup --dts-resolve",
"lint:publish": "publint",
"lint:type": "tsc --noEmit",
"lint:ts": "tsc --noEmit",
"publish": "pnpm run build && pnpm run lint:publish"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/eslint-plugin-react-dom/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ function makeConfig(config: { name: string; rules: RulePreset }) {
};
}

function makeLegacyConfig(config: { rules: RulePreset }) {
function makeLegacyConfig({ rules }: { rules: RulePreset }) {
return {
plugins: ["react-dom"],
rules: config.rules,
rules,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"scripts": {
"build": "tsup --dts-resolve",
"lint:publish": "publint",
"lint:type": "tsc --noEmit",
"lint:ts": "tsc --noEmit",
"publish": "pnpm run build && pnpm run lint:publish"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/eslint-plugin-react-hooks-extra/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ function makeConfig(config: { name: string; rules: RulePreset }) {
};
}

function makeLegacyConfig(config: { rules: RulePreset }) {
function makeLegacyConfig({ rules }: { rules: RulePreset }) {
return {
plugins: ["react-hooks-extra"],
rules: config.rules,
rules,
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"scripts": {
"build": "tsup --dts-resolve",
"lint:publish": "publint",
"lint:type": "tsc --noEmit",
"lint:ts": "tsc --noEmit",
"publish": "pnpm run build && pnpm run lint:publish"
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ function makeConfig(config: { name: string; rules: RulePreset }) {
};
}

function makeLegacyConfig(config: { rules: RulePreset }) {
function makeLegacyConfig({ rules }: { rules: RulePreset }) {
return {
plugins: ["react-naming-convention"],
rules: config.rules,
rules,
};
}

Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/eslint-plugin-react-web-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"scripts": {
"build": "tsup --dts-resolve",
"lint:publish": "publint",
"lint:type": "tsc --noEmit",
"lint:ts": "tsc --noEmit",
"publish": "pnpm run build && pnpm run lint:publish"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/eslint-plugin-react-web-api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ function makeConfig(config: { name: string; rules: RulePreset }) {
};
}

function makeLegacyConfig(config: { rules: RulePreset }) {
function makeLegacyConfig({ rules }: { rules: RulePreset }) {
return {
plugins: ["react-web-api"],
rules: config.rules,
rules,
};
}

Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/eslint-plugin-react-x/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"scripts": {
"build": "tsup --dts-resolve",
"lint:publish": "publint",
"lint:type": "tsc --noEmit",
"lint:ts": "tsc --noEmit",
"publish": "pnpm run build && pnpm run lint:publish"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/eslint-plugin-react-x/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ function makeConfig(config: { name: string; rules: RulePreset }) {
};
}

function makeLegacyConfig(config: { rules: RulePreset }) {
function makeLegacyConfig({ rules }: { rules: RulePreset }) {
return {
plugins: ["react-x"],
rules: config.rules,
rules,
};
}

Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/eslint-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"scripts": {
"build": "tsup --dts-resolve",
"lint:publish": "pnpm publint",
"lint:type": "tsc --noEmit",
"lint:ts": "tsc --noEmit",
"publish": "pnpm run build && pnpm run lint:publish"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/eslint-plugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import * as recommendedTypeCheckedConfig from "./configs/recommended-type-checke
import * as recommendedTypeScriptConfig from "./configs/recommended-typescript";
import { padKeysLeft } from "./utils";

function toLegacyConfig(config: { rules: RulePreset }) {
function toLegacyConfig({ rules }: { rules: RulePreset }) {
return {
plugins: ["@eslint-react"],
rules: config.rules,
rules,
};
}

Expand Down
2 changes: 1 addition & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"build": "tsup --dts-resolve",
"build:docs": "typedoc",
"lint:publish": "publint",
"lint:type": "tsc --noEmit",
"lint:ts": "tsc --noEmit",
"publish": "pnpm run build && pnpm run lint:publish"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/utilities/ast/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"scripts": {
"build": "tsup",
"lint:publish": "publint",
"lint:type": "tsc --noEmit",
"lint:ts": "tsc --noEmit",
"publish": "pnpm run build && pnpm run lint:publish"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/utilities/eff/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"scripts": {
"build": "tsup",
"lint:publish": "publint",
"lint:type": "tsc --noEmit",
"lint:ts": "tsc --noEmit",
"publish": "pnpm run build && pnpm run lint:publish"
},
"devDependencies": {
Expand Down
Loading

0 comments on commit 2a6a82e

Please sign in to comment.