@jimmy.codes/eslint-config 5.13.0 → 5.14.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.d.ts CHANGED
@@ -8,6 +8,7 @@ import * as estree from 'estree';
8
8
  import * as eslint_plugin_react_hooks from 'eslint-plugin-react-hooks';
9
9
  import * as eslint_plugin_react_compiler from 'eslint-plugin-react-compiler';
10
10
  import * as _eslint_react_kit from '@eslint-react/kit';
11
+ import * as _stylistic_eslint_plugin_jsx from '@stylistic/eslint-plugin-jsx';
11
12
  import * as _stylistic_eslint_plugin from '@stylistic/eslint-plugin';
12
13
  import * as eslint_plugin_regexp from 'eslint-plugin-regexp';
13
14
  import * as eslint_plugin_n from 'eslint-plugin-n';
@@ -3270,6 +3271,107 @@ interface RuleOptions {
3270
3271
  * @see https://eslint.style/rules/jsx/jsx-wrap-multilines
3271
3272
  */
3272
3273
  '@stylistic/jsx-wrap-multilines'?: Linter.RuleEntry<StylisticJsxWrapMultilines>
3274
+ /**
3275
+ * Enforce or disallow spaces inside of curly braces in JSX attributes and expressions
3276
+ * @see https://eslint.style/rules/jsx/jsx-child-element-spacing
3277
+ */
3278
+ '@stylistic/jsx/jsx-child-element-spacing'?: Linter.RuleEntry<[]>
3279
+ /**
3280
+ * Enforce closing bracket location in JSX
3281
+ * @see https://eslint.style/rules/jsx/jsx-closing-bracket-location
3282
+ */
3283
+ '@stylistic/jsx/jsx-closing-bracket-location'?: Linter.RuleEntry<StylisticJsxJsxClosingBracketLocation>
3284
+ /**
3285
+ * Enforce closing tag location for multiline JSX
3286
+ * @see https://eslint.style/rules/jsx/jsx-closing-tag-location
3287
+ */
3288
+ '@stylistic/jsx/jsx-closing-tag-location'?: Linter.RuleEntry<StylisticJsxJsxClosingTagLocation>
3289
+ /**
3290
+ * Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes
3291
+ * @see https://eslint.style/rules/jsx/jsx-curly-brace-presence
3292
+ */
3293
+ '@stylistic/jsx/jsx-curly-brace-presence'?: Linter.RuleEntry<StylisticJsxJsxCurlyBracePresence>
3294
+ /**
3295
+ * Enforce consistent linebreaks in curly braces in JSX attributes and expressions
3296
+ * @see https://eslint.style/rules/jsx/jsx-curly-newline
3297
+ */
3298
+ '@stylistic/jsx/jsx-curly-newline'?: Linter.RuleEntry<StylisticJsxJsxCurlyNewline>
3299
+ /**
3300
+ * Enforce or disallow spaces inside of curly braces in JSX attributes and expressions
3301
+ * @see https://eslint.style/rules/jsx/jsx-curly-spacing
3302
+ */
3303
+ '@stylistic/jsx/jsx-curly-spacing'?: Linter.RuleEntry<StylisticJsxJsxCurlySpacing>
3304
+ /**
3305
+ * Enforce or disallow spaces around equal signs in JSX attributes
3306
+ * @see https://eslint.style/rules/jsx/jsx-equals-spacing
3307
+ */
3308
+ '@stylistic/jsx/jsx-equals-spacing'?: Linter.RuleEntry<StylisticJsxJsxEqualsSpacing>
3309
+ /**
3310
+ * Enforce proper position of the first property in JSX
3311
+ * @see https://eslint.style/rules/jsx/jsx-first-prop-new-line
3312
+ */
3313
+ '@stylistic/jsx/jsx-first-prop-new-line'?: Linter.RuleEntry<StylisticJsxJsxFirstPropNewLine>
3314
+ /**
3315
+ * Enforce line breaks before and after JSX elements when they are used as arguments to a function.
3316
+ * @see https://eslint.style/rules/jsx/jsx-function-call-newline
3317
+ */
3318
+ '@stylistic/jsx/jsx-function-call-newline'?: Linter.RuleEntry<StylisticJsxJsxFunctionCallNewline>
3319
+ /**
3320
+ * Enforce JSX indentation. Deprecated, use `indent` rule instead.
3321
+ * @see https://eslint.style/rules/jsx/jsx-indent
3322
+ * @deprecated
3323
+ */
3324
+ '@stylistic/jsx/jsx-indent'?: Linter.RuleEntry<StylisticJsxJsxIndent>
3325
+ /**
3326
+ * Enforce props indentation in JSX
3327
+ * @see https://eslint.style/rules/jsx/jsx-indent-props
3328
+ */
3329
+ '@stylistic/jsx/jsx-indent-props'?: Linter.RuleEntry<StylisticJsxJsxIndentProps>
3330
+ /**
3331
+ * Enforce maximum of props on a single line in JSX
3332
+ * @see https://eslint.style/rules/jsx/jsx-max-props-per-line
3333
+ */
3334
+ '@stylistic/jsx/jsx-max-props-per-line'?: Linter.RuleEntry<StylisticJsxJsxMaxPropsPerLine>
3335
+ /**
3336
+ * Require or prevent a new line after jsx elements and expressions.
3337
+ * @see https://eslint.style/rules/jsx/jsx-newline
3338
+ */
3339
+ '@stylistic/jsx/jsx-newline'?: Linter.RuleEntry<StylisticJsxJsxNewline>
3340
+ /**
3341
+ * Require one JSX element per line
3342
+ * @see https://eslint.style/rules/jsx/jsx-one-expression-per-line
3343
+ */
3344
+ '@stylistic/jsx/jsx-one-expression-per-line'?: Linter.RuleEntry<StylisticJsxJsxOneExpressionPerLine>
3345
+ /**
3346
+ * Enforce PascalCase for user-defined JSX components
3347
+ * @see https://eslint.style/rules/jsx/jsx-pascal-case
3348
+ */
3349
+ '@stylistic/jsx/jsx-pascal-case'?: Linter.RuleEntry<StylisticJsxJsxPascalCase>
3350
+ /**
3351
+ * Disallow multiple spaces between inline JSX props
3352
+ * @see https://eslint.style/rules/jsx/jsx-props-no-multi-spaces
3353
+ */
3354
+ '@stylistic/jsx/jsx-props-no-multi-spaces'?: Linter.RuleEntry<[]>
3355
+ /**
3356
+ * Disallow extra closing tags for components without children
3357
+ * @see https://eslint.style/rules/jsx/jsx-self-closing-comp
3358
+ */
3359
+ '@stylistic/jsx/jsx-self-closing-comp'?: Linter.RuleEntry<StylisticJsxJsxSelfClosingComp>
3360
+ /**
3361
+ * Enforce props alphabetical sorting
3362
+ * @see https://eslint.style/rules/jsx/jsx-sort-props
3363
+ */
3364
+ '@stylistic/jsx/jsx-sort-props'?: Linter.RuleEntry<StylisticJsxJsxSortProps>
3365
+ /**
3366
+ * Enforce whitespace in and around the JSX opening and closing brackets
3367
+ * @see https://eslint.style/rules/jsx/jsx-tag-spacing
3368
+ */
3369
+ '@stylistic/jsx/jsx-tag-spacing'?: Linter.RuleEntry<StylisticJsxJsxTagSpacing>
3370
+ /**
3371
+ * Disallow missing parentheses around multiline JSX
3372
+ * @see https://eslint.style/rules/jsx/jsx-wrap-multilines
3373
+ */
3374
+ '@stylistic/jsx/jsx-wrap-multilines'?: Linter.RuleEntry<StylisticJsxJsxWrapMultilines>
3273
3375
  /**
3274
3376
  * Enforce consistent spacing between property names and type annotations in types and interfaces
3275
3377
  * @see https://eslint.style/rules/ts/key-spacing
@@ -9705,6 +9807,130 @@ type StylisticJsxWrapMultilines = []|[{
9705
9807
  prop?: ((true | false | "ignore" | "parens" | "parens-new-line") | (true | false | "ignore" | "parens" | "parens-new-line"))
9706
9808
  propertyValue?: ((true | false | "ignore" | "parens" | "parens-new-line") | (true | false | "ignore" | "parens" | "parens-new-line"))
9707
9809
  }]
9810
+ // ----- @stylistic/jsx/jsx-closing-bracket-location -----
9811
+ type StylisticJsxJsxClosingBracketLocation = []|[(("after-props" | "props-aligned" | "tag-aligned" | "line-aligned") | {
9812
+ location?: ("after-props" | "props-aligned" | "tag-aligned" | "line-aligned")
9813
+ } | {
9814
+ nonEmpty?: (("after-props" | "props-aligned" | "tag-aligned" | "line-aligned") | false)
9815
+ selfClosing?: (("after-props" | "props-aligned" | "tag-aligned" | "line-aligned") | false)
9816
+ })]
9817
+ // ----- @stylistic/jsx/jsx-closing-tag-location -----
9818
+ type StylisticJsxJsxClosingTagLocation = []|[("tag-aligned" | "line-aligned")]
9819
+ // ----- @stylistic/jsx/jsx-curly-brace-presence -----
9820
+ type StylisticJsxJsxCurlyBracePresence = []|[({
9821
+ props?: ("always" | "never" | "ignore")
9822
+ children?: ("always" | "never" | "ignore")
9823
+ propElementValues?: ("always" | "never" | "ignore")
9824
+ } | ("always" | "never" | "ignore"))]
9825
+ // ----- @stylistic/jsx/jsx-curly-newline -----
9826
+ type StylisticJsxJsxCurlyNewline = []|[(("consistent" | "never") | {
9827
+ singleline?: ("consistent" | "require" | "forbid")
9828
+ multiline?: ("consistent" | "require" | "forbid")
9829
+ })]
9830
+ // ----- @stylistic/jsx/jsx-curly-spacing -----
9831
+ type StylisticJsxJsxCurlySpacing = []|[((_StylisticJsxJsxCurlySpacing_BasicConfig & {
9832
+ attributes?: _StylisticJsxJsxCurlySpacingBasicConfigOrBoolean
9833
+ children?: _StylisticJsxJsxCurlySpacingBasicConfigOrBoolean
9834
+ [k: string]: unknown | undefined
9835
+ }) | ("always" | "never"))]|[((_StylisticJsxJsxCurlySpacing_BasicConfig & {
9836
+ attributes?: _StylisticJsxJsxCurlySpacingBasicConfigOrBoolean
9837
+ children?: _StylisticJsxJsxCurlySpacingBasicConfigOrBoolean
9838
+ [k: string]: unknown | undefined
9839
+ }) | ("always" | "never")), {
9840
+ allowMultiline?: boolean
9841
+ spacing?: {
9842
+ objectLiterals?: ("always" | "never")
9843
+ [k: string]: unknown | undefined
9844
+ }
9845
+ }]
9846
+ type _StylisticJsxJsxCurlySpacingBasicConfigOrBoolean = (_StylisticJsxJsxCurlySpacing_BasicConfig | boolean)
9847
+ interface _StylisticJsxJsxCurlySpacing_BasicConfig {
9848
+ when?: ("always" | "never")
9849
+ allowMultiline?: boolean
9850
+ spacing?: {
9851
+ objectLiterals?: ("always" | "never")
9852
+ [k: string]: unknown | undefined
9853
+ }
9854
+ [k: string]: unknown | undefined
9855
+ }
9856
+ // ----- @stylistic/jsx/jsx-equals-spacing -----
9857
+ type StylisticJsxJsxEqualsSpacing = []|[("always" | "never")]
9858
+ // ----- @stylistic/jsx/jsx-first-prop-new-line -----
9859
+ type StylisticJsxJsxFirstPropNewLine = []|[("always" | "never" | "multiline" | "multiline-multiprop" | "multiprop")]
9860
+ // ----- @stylistic/jsx/jsx-function-call-newline -----
9861
+ type StylisticJsxJsxFunctionCallNewline = []|[("always" | "multiline")]
9862
+ // ----- @stylistic/jsx/jsx-indent -----
9863
+ type StylisticJsxJsxIndent = []|[("tab" | number)]|[("tab" | number), {
9864
+ checkAttributes?: boolean
9865
+ indentLogicalExpressions?: boolean
9866
+ }]
9867
+ // ----- @stylistic/jsx/jsx-indent-props -----
9868
+ type StylisticJsxJsxIndentProps = []|[(("tab" | "first") | number | {
9869
+ indentMode?: (("tab" | "first") | number)
9870
+ ignoreTernaryOperator?: boolean
9871
+ [k: string]: unknown | undefined
9872
+ })]
9873
+ // ----- @stylistic/jsx/jsx-max-props-per-line -----
9874
+ type StylisticJsxJsxMaxPropsPerLine = []|[({
9875
+ maximum?: {
9876
+ single?: number
9877
+ multi?: number
9878
+ [k: string]: unknown | undefined
9879
+ }
9880
+ } | {
9881
+ maximum?: number
9882
+ when?: ("always" | "multiline")
9883
+ })]
9884
+ // ----- @stylistic/jsx/jsx-newline -----
9885
+ type StylisticJsxJsxNewline = []|[{
9886
+ prevent?: boolean
9887
+ allowMultilines?: boolean
9888
+ }]
9889
+ // ----- @stylistic/jsx/jsx-one-expression-per-line -----
9890
+ type StylisticJsxJsxOneExpressionPerLine = []|[{
9891
+ allow?: ("none" | "literal" | "single-child" | "single-line" | "non-jsx")
9892
+ }]
9893
+ // ----- @stylistic/jsx/jsx-pascal-case -----
9894
+ type StylisticJsxJsxPascalCase = []|[{
9895
+ allowAllCaps?: boolean
9896
+ allowLeadingUnderscore?: boolean
9897
+ allowNamespace?: boolean
9898
+ ignore?: string[]
9899
+ }]
9900
+ // ----- @stylistic/jsx/jsx-self-closing-comp -----
9901
+ type StylisticJsxJsxSelfClosingComp = []|[{
9902
+ component?: boolean
9903
+ html?: boolean
9904
+ }]
9905
+ // ----- @stylistic/jsx/jsx-sort-props -----
9906
+ type StylisticJsxJsxSortProps = []|[{
9907
+ callbacksLast?: boolean
9908
+ shorthandFirst?: boolean
9909
+ shorthandLast?: boolean
9910
+ multiline?: ("ignore" | "first" | "last")
9911
+ ignoreCase?: boolean
9912
+ noSortAlphabetically?: boolean
9913
+ reservedFirst?: (unknown[] | boolean)
9914
+ locale?: string
9915
+ }]
9916
+ // ----- @stylistic/jsx/jsx-tag-spacing -----
9917
+ type StylisticJsxJsxTagSpacing = []|[{
9918
+ closingSlash?: ("always" | "never" | "allow")
9919
+ beforeSelfClosing?: ("always" | "proportional-always" | "never" | "allow")
9920
+ afterOpening?: ("always" | "allow-multiline" | "never" | "allow")
9921
+ beforeClosing?: ("always" | "proportional-always" | "never" | "allow")
9922
+ }]
9923
+ // ----- @stylistic/jsx/jsx-wrap-multilines -----
9924
+ type StylisticJsxJsxWrapMultilines = []|[{
9925
+ declaration?: ((true | false | "ignore" | "parens" | "parens-new-line") | (true | false | "ignore" | "parens" | "parens-new-line"))
9926
+ assignment?: ((true | false | "ignore" | "parens" | "parens-new-line") | (true | false | "ignore" | "parens" | "parens-new-line"))
9927
+ return?: ((true | false | "ignore" | "parens" | "parens-new-line") | (true | false | "ignore" | "parens" | "parens-new-line"))
9928
+ arrow?: ((true | false | "ignore" | "parens" | "parens-new-line") | (true | false | "ignore" | "parens" | "parens-new-line"))
9929
+ condition?: ((true | false | "ignore" | "parens" | "parens-new-line") | (true | false | "ignore" | "parens" | "parens-new-line"))
9930
+ logical?: ((true | false | "ignore" | "parens" | "parens-new-line") | (true | false | "ignore" | "parens" | "parens-new-line"))
9931
+ prop?: ((true | false | "ignore" | "parens" | "parens-new-line") | (true | false | "ignore" | "parens" | "parens-new-line"))
9932
+ propertyValue?: ((true | false | "ignore" | "parens" | "parens-new-line") | (true | false | "ignore" | "parens" | "parens-new-line"))
9933
+ }]
9708
9934
  // ----- @stylistic/key-spacing -----
9709
9935
  type StylisticKeySpacing = []|[({
9710
9936
  align?: (("colon" | "value") | {
@@ -17705,8 +17931,17 @@ declare const defineConfig: ({ astro, autoDetect, ignores, jest, nextjs, overrid
17705
17931
  rules: _stylistic_eslint_plugin.Rules;
17706
17932
  configs: eslint.ESLint.Plugin["configs"] & _stylistic_eslint_plugin.Configs;
17707
17933
  };
17934
+ "@stylistic/jsx": {
17935
+ rules: _stylistic_eslint_plugin_jsx.Rules;
17936
+ configs: {
17937
+ "disable-legacy": Linter.Config;
17938
+ "all": Linter.Config;
17939
+ "all-flat": Linter.Config;
17940
+ };
17941
+ };
17708
17942
  };
17709
17943
  rules: {
17944
+ "@stylistic/jsx/jsx-curly-brace-presence": ["error", "never"];
17710
17945
  "@stylistic/object-curly-newline": ["error", {
17711
17946
  consistent: true;
17712
17947
  multiline: true;
package/dist/index.js CHANGED
@@ -434,9 +434,11 @@ var regexpConfig = () => {
434
434
 
435
435
  // src/configs/stylistic.ts
436
436
  import stylisticPlugin from "@stylistic/eslint-plugin";
437
+ import stylisticJsx from "@stylistic/eslint-plugin-jsx";
437
438
 
438
439
  // src/rules/stylistic.ts
439
440
  var stylisticRules = {
441
+ "@stylistic/jsx/jsx-curly-brace-presence": ["error", "never"],
440
442
  "@stylistic/object-curly-newline": [
441
443
  "error",
442
444
  {
@@ -489,7 +491,8 @@ function stylisticConfig() {
489
491
  {
490
492
  name: "jimmy.codes/stylistic",
491
493
  plugins: {
492
- "@stylistic": stylisticPlugin
494
+ "@stylistic": stylisticPlugin,
495
+ "@stylistic/jsx": stylisticJsx
493
496
  },
494
497
  rules: stylisticRules
495
498
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jimmy.codes/eslint-config",
3
- "version": "5.13.0",
3
+ "version": "5.14.0",
4
4
  "description": "A pragmatic and opinionated ESLint config for modern development.",
5
5
  "keywords": [
6
6
  "eslint",
@@ -30,6 +30,7 @@
30
30
  "@eslint/js": "^9.26.0",
31
31
  "@next/eslint-plugin-next": "^15.3.2",
32
32
  "@stylistic/eslint-plugin": "^4.2.0",
33
+ "@stylistic/eslint-plugin-jsx": "4.2.0",
33
34
  "@tanstack/eslint-plugin-query": "^5.74.7",
34
35
  "@types/eslint": "9.6.1",
35
36
  "@typescript-eslint/parser": "^8.32.0",