zixulu 1.69.0 → 1.69.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1572,15 +1572,16 @@ function getEslintConfig({ isReact }) {
1572
1572
  import js from "@eslint/js"${isReact ? `
1573
1573
  import reactHooks from "eslint-plugin-react-hooks"
1574
1574
  import reactRefresh from "eslint-plugin-react-refresh"` : ""}
1575
- import { globalIgnores } from "eslint/config"
1575
+ import { defineConfig, globalIgnores } from "eslint/config"
1576
1576
  import globals from "globals"
1577
1577
  import tseslint from "typescript-eslint"
1578
1578
 
1579
- export default tseslint.config([
1580
- globalIgnores(["node_modules", "dist", "build", "public"]),
1579
+ export default defineConfig([
1580
+ globalIgnores(["node_modules", "dist", "build", "public"]),${isReact ? `
1581
+ reactHooks.configs.flat.recommended,` : ""}
1581
1582
  {
1582
1583
  files: ["**/*.{js,mjs,ts${isReact ? ",tsx" : ""}}"],
1583
- extends: [js.configs.recommended, tseslint.configs.recommended${isReact ? ', reactHooks.configs["recommended-latest"], reactRefresh.configs.vite' : ""}],
1584
+ extends: [js.configs.recommended, tseslint.configs.recommended${isReact ? ", reactRefresh.configs.vite" : ""}],
1584
1585
  languageOptions: {
1585
1586
  ecmaVersion: "latest",
1586
1587
  globals: globals.browser,
@@ -1619,12 +1620,12 @@ async function addEslint() {
1619
1620
  await promises_writeFile("eslint.config.mjs", config);
1620
1621
  const packages = [
1621
1622
  "@eslint/js",
1623
+ "eslint",
1622
1624
  "typescript-eslint",
1623
1625
  "globals"
1624
1626
  ];
1625
1627
  if (isReact) packages.push({
1626
- packageName: "eslint-plugin-react-hooks",
1627
- versionRange: "@rc"
1628
+ packageName: "eslint-plugin-react-hooks"
1628
1629
  }, "eslint-plugin-react-refresh");
1629
1630
  await addDependency({
1630
1631
  package: packages,