@lincy/eslint-config 7.1.2 → 7.2.0

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.cjs CHANGED
@@ -334,6 +334,7 @@ function isInGitHooksOrLintStaged() {
334
334
  //#endregion
335
335
  //#region src/configs/stylistic.ts
336
336
  const StylisticConfigDefaults = {
337
+ braceStyle: "stroustrup",
337
338
  indent: 4,
338
339
  jsx: true,
339
340
  lessOpinionated: false,
@@ -343,12 +344,13 @@ const StylisticConfigDefaults = {
343
344
  };
344
345
  async function stylistic(options = {}) {
345
346
  const { overrides = {}, stylistic = StylisticConfigDefaults } = options;
346
- const { indent, jsx, lessOpinionated, quotes, semi } = typeof stylistic === "boolean" ? StylisticConfigDefaults : {
347
+ const { braceStyle, indent, jsx, lessOpinionated, quotes, semi } = typeof stylistic === "boolean" ? StylisticConfigDefaults : {
347
348
  ...StylisticConfigDefaults,
348
349
  ...stylistic
349
350
  };
350
351
  const pluginStylistic = await interopDefault(import("@stylistic/eslint-plugin"));
351
352
  const config = pluginStylistic.configs.customize({
353
+ braceStyle,
352
354
  indent,
353
355
  jsx,
354
356
  pluginName: "style",
@@ -1226,17 +1228,12 @@ async function react(options = {}) {
1226
1228
  const isUsingRemix = RemixPackages.some((i) => (0, local_pkg.isPackageExists)(i));
1227
1229
  const isUsingReactRouter = ReactRouterPackages.some((i) => (0, local_pkg.isPackageExists)(i));
1228
1230
  const isUsingNext = NextJsPackages.some((i) => (0, local_pkg.isPackageExists)(i));
1229
- const plugins = pluginReact.configs.all.plugins;
1230
1231
  return [
1231
1232
  {
1232
1233
  name: "eslint/react/setup",
1233
1234
  plugins: {
1234
- "react": plugins["@eslint-react"],
1235
- "react-dom": plugins["@eslint-react/dom"],
1236
- "react-naming-convention": plugins["@eslint-react/naming-convention"],
1237
- "react-refresh": pluginReactRefresh,
1238
- "react-rsc": plugins["@eslint-react/rsc"],
1239
- "react-web-api": plugins["@eslint-react/web-api"]
1235
+ "react": pluginReact.configs.all.plugins["@eslint-react"],
1236
+ "react-refresh": pluginReactRefresh
1240
1237
  }
1241
1238
  },
1242
1239
  {
@@ -1277,7 +1274,6 @@ async function react(options = {}) {
1277
1274
  "shouldRevalidate"
1278
1275
  ] : []]
1279
1276
  }],
1280
- "react/prefer-namespace-import": "error",
1281
1277
  ...overrides
1282
1278
  }
1283
1279
  },
@@ -1285,8 +1281,8 @@ async function react(options = {}) {
1285
1281
  files: filesTypeAware,
1286
1282
  name: "eslint/react/typescript",
1287
1283
  rules: {
1288
- "react-dom/no-string-style-prop": "off",
1289
- "react-dom/no-unknown-property": "off"
1284
+ "react/dom-no-string-style-prop": "off",
1285
+ "react/dom-no-unknown-property": "off"
1290
1286
  }
1291
1287
  },
1292
1288
  ...isTypeAware ? [{
@@ -1826,7 +1822,7 @@ vueVersion = Number.isNaN(vueVersion) ? "3" : vueVersion;
1826
1822
  async function vue(options = {}) {
1827
1823
  const { files = [GLOB_VUE], overrides = {}, stylistic = true } = options;
1828
1824
  const sfcBlocks = options.sfcBlocks === true ? {} : options.sfcBlocks ?? {};
1829
- const { indent = 4 } = typeof stylistic === "boolean" ? {} : stylistic;
1825
+ const { braceStyle = "stroustrup", indent = 4 } = typeof stylistic === "boolean" ? {} : stylistic;
1830
1826
  const [pluginVue, parserVue, processorVueBlocks] = await Promise.all([
1831
1827
  interopDefault(import("eslint-plugin-vue")),
1832
1828
  interopDefault(import("vue-eslint-parser")),
@@ -1992,7 +1988,7 @@ async function vue(options = {}) {
1992
1988
  }],
1993
1989
  "vue/brace-style": [
1994
1990
  "error",
1995
- "stroustrup",
1991
+ braceStyle,
1996
1992
  { allowSingleLine: false }
1997
1993
  ],
1998
1994
  "vue/comma-dangle": ["error", "always-multiline"],
@@ -2088,10 +2084,6 @@ const VuePackages = [
2088
2084
  ];
2089
2085
  const defaultPluginRenaming = {
2090
2086
  "@eslint-react": "react",
2091
- "@eslint-react/dom": "react-dom",
2092
- "@eslint-react/naming-convention": "react-naming-convention",
2093
- "@eslint-react/rsc": "react-rsc",
2094
- "@eslint-react/web-api": "react-web-api",
2095
2087
  "@next/next": "next",
2096
2088
  "@stylistic": "style",
2097
2089
  "@typescript-eslint": "ts",