@eslint-react/shared 1.8.3-next.4 → 1.8.3-next.5

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
@@ -931,10 +931,16 @@ function defineSettings(settings) {
931
931
  return parse(ESLintSettingsSchema, settings)["react-x"] ?? {};
932
932
  }
933
933
  function decodeSettings(data) {
934
- return parse(ESLintSettingsSchema, data)["react-x"] ?? INITIAL_ESLINT_REACT_SETTINGS;
934
+ return {
935
+ ...INITIAL_ESLINT_REACT_SETTINGS,
936
+ ...parse(ESLintSettingsSchema, data)["react-x"] ?? {}
937
+ };
935
938
  }
936
939
  function unsafeCastSettings(data) {
937
- return data?.["react-x"] ?? INITIAL_ESLINT_REACT_SETTINGS;
940
+ return {
941
+ ...INITIAL_ESLINT_REACT_SETTINGS,
942
+ ...data["react-x"] ?? {}
943
+ };
938
944
  }
939
945
  var expandSettings = createMemoizedFunction(
940
946
  (settings) => {
@@ -943,12 +949,12 @@ var expandSettings = createMemoizedFunction(
943
949
  ...settings,
944
950
  additionalComponents: additionalComponents.map((component) => ({
945
951
  ...component,
946
- attributes: component.attributes?.map((attr) => ({
952
+ attributes: component.attributes.map((attr) => ({
947
953
  ...attr,
948
954
  as: attr.as ?? attr.name
949
- })) ?? [],
955
+ })),
950
956
  re: pm__default.default.makeRe(component.name, { fastpaths: true })
951
- })) ?? [],
957
+ })),
952
958
  components: additionalComponents.reduce((acc, component) => {
953
959
  const { name, as, attributes, selector } = component;
954
960
  if (!name || !as || selector || attributes.length > 0) return acc;
package/dist/index.mjs CHANGED
@@ -925,10 +925,16 @@ function defineSettings(settings) {
925
925
  return parse(ESLintSettingsSchema, settings)["react-x"] ?? {};
926
926
  }
927
927
  function decodeSettings(data) {
928
- return parse(ESLintSettingsSchema, data)["react-x"] ?? INITIAL_ESLINT_REACT_SETTINGS;
928
+ return {
929
+ ...INITIAL_ESLINT_REACT_SETTINGS,
930
+ ...parse(ESLintSettingsSchema, data)["react-x"] ?? {}
931
+ };
929
932
  }
930
933
  function unsafeCastSettings(data) {
931
- return data?.["react-x"] ?? INITIAL_ESLINT_REACT_SETTINGS;
934
+ return {
935
+ ...INITIAL_ESLINT_REACT_SETTINGS,
936
+ ...data["react-x"] ?? {}
937
+ };
932
938
  }
933
939
  var expandSettings = createMemoizedFunction(
934
940
  (settings) => {
@@ -937,12 +943,12 @@ var expandSettings = createMemoizedFunction(
937
943
  ...settings,
938
944
  additionalComponents: additionalComponents.map((component) => ({
939
945
  ...component,
940
- attributes: component.attributes?.map((attr) => ({
946
+ attributes: component.attributes.map((attr) => ({
941
947
  ...attr,
942
948
  as: attr.as ?? attr.name
943
- })) ?? [],
949
+ })),
944
950
  re: pm.makeRe(component.name, { fastpaths: true })
945
- })) ?? [],
951
+ })),
946
952
  components: additionalComponents.reduce((acc, component) => {
947
953
  const { name, as, attributes, selector } = component;
948
954
  if (!name || !as || selector || attributes.length > 0) return acc;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-react/shared",
3
- "version": "1.8.3-next.4",
3
+ "version": "1.8.3-next.5",
4
4
  "description": "ESLint React's Shared constants and functions.",
5
5
  "homepage": "https://github.com/rel1cx/eslint-react",
6
6
  "bugs": {