projen 0.95.2__py3-none-any.whl → 0.95.4__py3-none-any.whl

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.

Potentially problematic release.


This version of projen might be problematic. Click here for more details.

@@ -1954,7 +1954,7 @@ class HtmlConfiguration:
1954
1954
  self,
1955
1955
  *,
1956
1956
  formatter: typing.Optional[typing.Union["HtmlFormatterConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
1957
- parser: typing.Any = None,
1957
+ parser: typing.Optional[typing.Union["HtmlParserConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
1958
1958
  ) -> None:
1959
1959
  '''(experimental) Options applied to HTML files.
1960
1960
 
@@ -1966,6 +1966,8 @@ class HtmlConfiguration:
1966
1966
  '''
1967
1967
  if isinstance(formatter, dict):
1968
1968
  formatter = HtmlFormatterConfiguration(**formatter)
1969
+ if isinstance(parser, dict):
1970
+ parser = HtmlParserConfiguration(**parser)
1969
1971
  if __debug__:
1970
1972
  type_hints = typing.get_type_hints(_typecheckingstub__048266f3b4e4769e6485570d4954197f51204fc6e607e2ffe5267f80089b5ded)
1971
1973
  check_type(argname="argument formatter", value=formatter, expected_type=type_hints["formatter"])
@@ -1987,14 +1989,14 @@ class HtmlConfiguration:
1987
1989
  return typing.cast(typing.Optional["HtmlFormatterConfiguration"], result)
1988
1990
 
1989
1991
  @builtins.property
1990
- def parser(self) -> typing.Any:
1992
+ def parser(self) -> typing.Optional["HtmlParserConfiguration"]:
1991
1993
  '''(experimental) HTML parsing options.
1992
1994
 
1993
1995
  :stability: experimental
1994
1996
  :schema: HtmlConfiguration#parser
1995
1997
  '''
1996
1998
  result = self._values.get("parser")
1997
- return typing.cast(typing.Any, result)
1999
+ return typing.cast(typing.Optional["HtmlParserConfiguration"], result)
1998
2000
 
1999
2001
  def __eq__(self, rhs: typing.Any) -> builtins.bool:
2000
2002
  return isinstance(rhs, self.__class__) and rhs._values == self._values
@@ -2229,6 +2231,49 @@ class HtmlFormatterConfiguration:
2229
2231
  )
2230
2232
 
2231
2233
 
2234
+ @jsii.data_type(
2235
+ jsii_type="projen.javascript.biome_config.HtmlParserConfiguration",
2236
+ jsii_struct_bases=[],
2237
+ name_mapping={"interpolation": "interpolation"},
2238
+ )
2239
+ class HtmlParserConfiguration:
2240
+ def __init__(self, *, interpolation: typing.Optional[builtins.bool] = None) -> None:
2241
+ '''(experimental) Options that changes how the HTML parser behaves.
2242
+
2243
+ :param interpolation: (experimental) Enables the parsing of double text expressions such as ``{{ expression }}`` inside ``.html`` files.
2244
+
2245
+ :stability: experimental
2246
+ :schema: HtmlParserConfiguration
2247
+ '''
2248
+ if __debug__:
2249
+ type_hints = typing.get_type_hints(_typecheckingstub__1b3cfca5c3ad8f608b86ade05d476530f16da0ba23410a7613236950da38ff37)
2250
+ check_type(argname="argument interpolation", value=interpolation, expected_type=type_hints["interpolation"])
2251
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
2252
+ if interpolation is not None:
2253
+ self._values["interpolation"] = interpolation
2254
+
2255
+ @builtins.property
2256
+ def interpolation(self) -> typing.Optional[builtins.bool]:
2257
+ '''(experimental) Enables the parsing of double text expressions such as ``{{ expression }}`` inside ``.html`` files.
2258
+
2259
+ :stability: experimental
2260
+ :schema: HtmlParserConfiguration#interpolation
2261
+ '''
2262
+ result = self._values.get("interpolation")
2263
+ return typing.cast(typing.Optional[builtins.bool], result)
2264
+
2265
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
2266
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
2267
+
2268
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
2269
+ return not (rhs == self)
2270
+
2271
+ def __repr__(self) -> str:
2272
+ return "HtmlParserConfiguration(%s)" % ", ".join(
2273
+ k + "=" + repr(v) for k, v in self._values.items()
2274
+ )
2275
+
2276
+
2232
2277
  @jsii.enum(jsii_type="projen.javascript.biome_config.IndentStyle")
2233
2278
  class IndentStyle(enum.Enum):
2234
2279
  '''
@@ -2445,6 +2490,7 @@ class JsConfiguration:
2445
2490
  "jsx_quote_style": "jsxQuoteStyle",
2446
2491
  "line_ending": "lineEnding",
2447
2492
  "line_width": "lineWidth",
2493
+ "operator_linebreak": "operatorLinebreak",
2448
2494
  "quote_properties": "quoteProperties",
2449
2495
  "quote_style": "quoteStyle",
2450
2496
  "semicolons": "semicolons",
@@ -2466,6 +2512,7 @@ class JsFormatterConfiguration:
2466
2512
  jsx_quote_style: typing.Optional["QuoteStyle"] = None,
2467
2513
  line_ending: typing.Optional["LineEnding"] = None,
2468
2514
  line_width: typing.Optional[jsii.Number] = None,
2515
+ operator_linebreak: typing.Optional["OperatorLinebreak"] = None,
2469
2516
  quote_properties: typing.Optional["QuoteProperties"] = None,
2470
2517
  quote_style: typing.Optional["QuoteStyle"] = None,
2471
2518
  semicolons: typing.Optional["Semicolons"] = None,
@@ -2484,6 +2531,7 @@ class JsFormatterConfiguration:
2484
2531
  :param jsx_quote_style: (experimental) The type of quotes used in JSX. Defaults to double. Default: double.
2485
2532
  :param line_ending: (experimental) The type of line ending applied to JavaScript (and its super languages) files.
2486
2533
  :param line_width: (experimental) What's the max width of a line applied to JavaScript (and its super languages) files. Defaults to 80. Default: 80.
2534
+ :param operator_linebreak: (experimental) When breaking binary expressions into multiple lines, whether to break them before or after the binary operator. Defaults to "after". Default: after".
2487
2535
  :param quote_properties: (experimental) When properties in objects are quoted. Defaults to asNeeded. Default: asNeeded.
2488
2536
  :param quote_style: (experimental) The type of quotes used in JavaScript code. Defaults to double. Default: double.
2489
2537
  :param semicolons: (experimental) Whether the formatter prints semicolons for all statements or only in for statements where it is necessary because of ASI.
@@ -2505,6 +2553,7 @@ class JsFormatterConfiguration:
2505
2553
  check_type(argname="argument jsx_quote_style", value=jsx_quote_style, expected_type=type_hints["jsx_quote_style"])
2506
2554
  check_type(argname="argument line_ending", value=line_ending, expected_type=type_hints["line_ending"])
2507
2555
  check_type(argname="argument line_width", value=line_width, expected_type=type_hints["line_width"])
2556
+ check_type(argname="argument operator_linebreak", value=operator_linebreak, expected_type=type_hints["operator_linebreak"])
2508
2557
  check_type(argname="argument quote_properties", value=quote_properties, expected_type=type_hints["quote_properties"])
2509
2558
  check_type(argname="argument quote_style", value=quote_style, expected_type=type_hints["quote_style"])
2510
2559
  check_type(argname="argument semicolons", value=semicolons, expected_type=type_hints["semicolons"])
@@ -2532,6 +2581,8 @@ class JsFormatterConfiguration:
2532
2581
  self._values["line_ending"] = line_ending
2533
2582
  if line_width is not None:
2534
2583
  self._values["line_width"] = line_width
2584
+ if operator_linebreak is not None:
2585
+ self._values["operator_linebreak"] = operator_linebreak
2535
2586
  if quote_properties is not None:
2536
2587
  self._values["quote_properties"] = quote_properties
2537
2588
  if quote_style is not None:
@@ -2683,6 +2734,20 @@ class JsFormatterConfiguration:
2683
2734
  result = self._values.get("line_width")
2684
2735
  return typing.cast(typing.Optional[jsii.Number], result)
2685
2736
 
2737
+ @builtins.property
2738
+ def operator_linebreak(self) -> typing.Optional["OperatorLinebreak"]:
2739
+ '''(experimental) When breaking binary expressions into multiple lines, whether to break them before or after the binary operator.
2740
+
2741
+ Defaults to "after".
2742
+
2743
+ :default: after".
2744
+
2745
+ :stability: experimental
2746
+ :schema: JsFormatterConfiguration#operatorLinebreak
2747
+ '''
2748
+ result = self._values.get("operator_linebreak")
2749
+ return typing.cast(typing.Optional["OperatorLinebreak"], result)
2750
+
2686
2751
  @builtins.property
2687
2752
  def quote_properties(self) -> typing.Optional["QuoteProperties"]:
2688
2753
  '''(experimental) When properties in objects are quoted.
@@ -3465,6 +3530,25 @@ class LinterConfiguration:
3465
3530
  )
3466
3531
 
3467
3532
 
3533
+ @jsii.enum(jsii_type="projen.javascript.biome_config.OperatorLinebreak")
3534
+ class OperatorLinebreak(enum.Enum):
3535
+ '''
3536
+ :stability: experimental
3537
+ :schema: OperatorLinebreak
3538
+ '''
3539
+
3540
+ AFTER = "AFTER"
3541
+ '''(experimental) after.
3542
+
3543
+ :stability: experimental
3544
+ '''
3545
+ BEFORE = "BEFORE"
3546
+ '''(experimental) before.
3547
+
3548
+ :stability: experimental
3549
+ '''
3550
+
3551
+
3468
3552
  @jsii.data_type(
3469
3553
  jsii_type="projen.javascript.biome_config.OverrideAssistConfiguration",
3470
3554
  jsii_struct_bases=[],
@@ -4740,6 +4824,7 @@ __all__ = [
4740
4824
  "GritLinterConfiguration",
4741
4825
  "HtmlConfiguration",
4742
4826
  "HtmlFormatterConfiguration",
4827
+ "HtmlParserConfiguration",
4743
4828
  "IndentStyle",
4744
4829
  "JsAssistConfiguration",
4745
4830
  "JsConfiguration",
@@ -4754,6 +4839,7 @@ __all__ = [
4754
4839
  "JsxRuntime",
4755
4840
  "LineEnding",
4756
4841
  "LinterConfiguration",
4842
+ "OperatorLinebreak",
4757
4843
  "OverrideAssistConfiguration",
4758
4844
  "OverrideFilesConfiguration",
4759
4845
  "OverrideFormatterConfiguration",
@@ -4960,7 +5046,7 @@ def _typecheckingstub__4f328d623f0baa93f52695005ba45f28881c95ae610fde354116a44bc
4960
5046
  def _typecheckingstub__048266f3b4e4769e6485570d4954197f51204fc6e607e2ffe5267f80089b5ded(
4961
5047
  *,
4962
5048
  formatter: typing.Optional[typing.Union[HtmlFormatterConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
4963
- parser: typing.Any = None,
5049
+ parser: typing.Optional[typing.Union[HtmlParserConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
4964
5050
  ) -> None:
4965
5051
  """Type checking stubs"""
4966
5052
  pass
@@ -4981,6 +5067,13 @@ def _typecheckingstub__bcbf243ebdc0f288a10a4e6b68dc5a1ff88f4d8abe5566f57f212bf10
4981
5067
  """Type checking stubs"""
4982
5068
  pass
4983
5069
 
5070
+ def _typecheckingstub__1b3cfca5c3ad8f608b86ade05d476530f16da0ba23410a7613236950da38ff37(
5071
+ *,
5072
+ interpolation: typing.Optional[builtins.bool] = None,
5073
+ ) -> None:
5074
+ """Type checking stubs"""
5075
+ pass
5076
+
4984
5077
  def _typecheckingstub__a425594ed8c46868c14fe924e8346d0d10c110ecabdc7f0d160d30bb06cf91ea(
4985
5078
  *,
4986
5079
  enabled: typing.Optional[builtins.bool] = None,
@@ -5013,6 +5106,7 @@ def _typecheckingstub__83d4960ad9dc84017b237fabc105d7837e8a3ec56d19b1de7e0118365
5013
5106
  jsx_quote_style: typing.Optional[QuoteStyle] = None,
5014
5107
  line_ending: typing.Optional[LineEnding] = None,
5015
5108
  line_width: typing.Optional[jsii.Number] = None,
5109
+ operator_linebreak: typing.Optional[OperatorLinebreak] = None,
5016
5110
  quote_properties: typing.Optional[QuoteProperties] = None,
5017
5111
  quote_style: typing.Optional[QuoteStyle] = None,
5018
5112
  semicolons: typing.Optional[Semicolons] = None,