@bigbinary/eslint-plugin-neeto 1.0.36 → 1.0.37

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.
Files changed (3) hide show
  1. package/README.md +1 -0
  2. package/dist/index.js +506 -152
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -58,6 +58,7 @@ module.exports = {
58
58
  - [no-axios-import-outside-apis](./docs/src/rules/no-axios-import-outside-apis.md)
59
59
  - [no-blacklisted-imports](./docs/src/rules/no-blacklisted-imports.md)
60
60
  - [no-conditional-overlays](./docs/src/rules/no-conditional-overlays.md)
61
+ - [no-deprecated-imports-from-zustand](./docs/src/rules/no-deprecated-imports-from-zustand.md)
61
62
  - [no-dangling-constants](./docs/src/rules/no-dangling-constants.md)
62
63
  - [no-excess-function-arguments](./docs/src/rules/no-excess-function-arguments.md)
63
64
  - [no-globalProps-destructure](./docs/src/rules/no-globalProps-destructure.md)
package/dist/index.js CHANGED
@@ -222,6 +222,7 @@
222
222
  "@bigbinary/neeto/no-axios-import-outside-apis": ["error", resolve.alias],
223
223
  "@bigbinary/neeto/no-blacklisted-imports": "warn",
224
224
  "@bigbinary/neeto/no-conditional-overlays": "error",
225
+ "@bigbinary/neeto/no-deprecated-imports-from-zustand": "error",
225
226
  "@bigbinary/neeto/no-dangling-constants": "error",
226
227
  "@bigbinary/neeto/no-excess-function-arguments": "warn",
227
228
  "@bigbinary/neeto/no-globalProps-destructure": "error",
@@ -3537,7 +3538,7 @@
3537
3538
 
3538
3539
  function cov_26237ygvis() {
3539
3540
  var path = "/home/runner/work/eslint-plugin-neeto/eslint-plugin-neeto/src/lib/utils/messages.js";
3540
- var hash = "c95043a7a8e27ef3776c13e82abb7b3d835e4fd9";
3541
+ var hash = "63f64d98ea236f4c737f987542a6bf761941f20e";
3541
3542
  var global = new Function("return this")();
3542
3543
  var gcv = "__coverage__";
3543
3544
  var coverageData = {
@@ -3744,462 +3745,482 @@
3744
3745
  }
3745
3746
  },
3746
3747
  "20": {
3748
+ start: {
3749
+ line: 34,
3750
+ column: 47
3751
+ },
3752
+ end: {
3753
+ line: 35,
3754
+ column: 98
3755
+ }
3756
+ },
3757
+ "21": {
3747
3758
  start: {
3748
3759
  line: 35,
3749
3760
  column: 2
3750
3761
  },
3751
3762
  end: {
3752
3763
  line: 35,
3753
- column: 68
3764
+ column: 98
3754
3765
  }
3755
3766
  },
3756
- "21": {
3767
+ "22": {
3757
3768
  start: {
3758
3769
  line: 38,
3759
3770
  column: 2
3760
3771
  },
3761
3772
  end: {
3762
3773
  line: 38,
3763
- column: 62
3774
+ column: 68
3764
3775
  }
3765
3776
  },
3766
- "22": {
3777
+ "23": {
3767
3778
  start: {
3768
3779
  line: 41,
3769
3780
  column: 2
3770
3781
  },
3771
3782
  end: {
3772
3783
  line: 41,
3773
- column: 46
3784
+ column: 62
3774
3785
  }
3775
3786
  },
3776
- "23": {
3787
+ "24": {
3777
3788
  start: {
3778
3789
  line: 44,
3779
3790
  column: 2
3780
3791
  },
3781
3792
  end: {
3782
3793
  line: 44,
3783
- column: 57
3794
+ column: 46
3784
3795
  }
3785
3796
  },
3786
- "24": {
3797
+ "25": {
3787
3798
  start: {
3788
3799
  line: 47,
3789
3800
  column: 2
3790
3801
  },
3791
3802
  end: {
3792
3803
  line: 47,
3793
- column: 78
3804
+ column: 57
3794
3805
  }
3795
3806
  },
3796
- "25": {
3807
+ "26": {
3797
3808
  start: {
3798
3809
  line: 50,
3799
3810
  column: 2
3800
3811
  },
3801
3812
  end: {
3802
3813
  line: 50,
3803
- column: 54
3814
+ column: 78
3804
3815
  }
3805
3816
  },
3806
- "26": {
3817
+ "27": {
3807
3818
  start: {
3808
3819
  line: 53,
3809
3820
  column: 2
3810
3821
  },
3811
3822
  end: {
3812
3823
  line: 53,
3813
- column: 92
3824
+ column: 54
3814
3825
  }
3815
3826
  },
3816
- "27": {
3827
+ "28": {
3817
3828
  start: {
3818
- line: 55,
3819
- column: 54
3829
+ line: 56,
3830
+ column: 2
3820
3831
  },
3821
3832
  end: {
3822
- line: 55,
3823
- column: 150
3833
+ line: 56,
3834
+ column: 92
3824
3835
  }
3825
3836
  },
3826
- "28": {
3837
+ "29": {
3827
3838
  start: {
3828
- line: 57,
3829
- column: 52
3839
+ line: 58,
3840
+ column: 54
3830
3841
  },
3831
3842
  end: {
3832
- line: 57,
3833
- column: 134
3843
+ line: 58,
3844
+ column: 150
3834
3845
  }
3835
3846
  },
3836
- "29": {
3847
+ "30": {
3837
3848
  start: {
3838
3849
  line: 60,
3839
- column: 2
3850
+ column: 52
3840
3851
  },
3841
3852
  end: {
3842
3853
  line: 60,
3843
- column: 67
3854
+ column: 134
3844
3855
  }
3845
3856
  },
3846
- "30": {
3857
+ "31": {
3847
3858
  start: {
3848
3859
  line: 63,
3849
3860
  column: 2
3850
3861
  },
3851
3862
  end: {
3852
3863
  line: 63,
3853
- column: 80
3864
+ column: 67
3854
3865
  }
3855
3866
  },
3856
- "31": {
3867
+ "32": {
3857
3868
  start: {
3858
3869
  line: 66,
3859
3870
  column: 2
3860
3871
  },
3861
3872
  end: {
3862
3873
  line: 66,
3863
- column: 64
3874
+ column: 80
3864
3875
  }
3865
3876
  },
3866
- "32": {
3877
+ "33": {
3867
3878
  start: {
3868
3879
  line: 69,
3869
3880
  column: 2
3870
3881
  },
3871
3882
  end: {
3872
3883
  line: 69,
3873
- column: 57
3884
+ column: 64
3874
3885
  }
3875
3886
  },
3876
- "33": {
3887
+ "34": {
3877
3888
  start: {
3878
3889
  line: 72,
3879
3890
  column: 2
3880
3891
  },
3881
3892
  end: {
3882
3893
  line: 72,
3883
- column: 88
3894
+ column: 57
3884
3895
  }
3885
3896
  },
3886
- "34": {
3897
+ "35": {
3887
3898
  start: {
3888
3899
  line: 75,
3889
3900
  column: 2
3890
3901
  },
3891
3902
  end: {
3892
3903
  line: 75,
3893
- column: 43
3904
+ column: 88
3894
3905
  }
3895
3906
  },
3896
- "35": {
3907
+ "36": {
3897
3908
  start: {
3898
3909
  line: 78,
3899
3910
  column: 2
3900
3911
  },
3901
3912
  end: {
3902
3913
  line: 78,
3903
- column: 51
3914
+ column: 43
3904
3915
  }
3905
3916
  },
3906
- "36": {
3917
+ "37": {
3907
3918
  start: {
3908
3919
  line: 81,
3909
3920
  column: 2
3910
3921
  },
3911
3922
  end: {
3912
3923
  line: 81,
3913
- column: 49
3924
+ column: 51
3914
3925
  }
3915
3926
  },
3916
- "37": {
3927
+ "38": {
3917
3928
  start: {
3918
3929
  line: 84,
3919
3930
  column: 2
3920
3931
  },
3921
3932
  end: {
3922
3933
  line: 84,
3923
- column: 72
3934
+ column: 49
3924
3935
  }
3925
3936
  },
3926
- "38": {
3937
+ "39": {
3927
3938
  start: {
3928
3939
  line: 87,
3929
3940
  column: 2
3930
3941
  },
3931
3942
  end: {
3932
3943
  line: 87,
3933
- column: 64
3944
+ column: 72
3934
3945
  }
3935
3946
  },
3936
- "39": {
3947
+ "40": {
3937
3948
  start: {
3938
3949
  line: 90,
3939
3950
  column: 2
3940
3951
  },
3941
3952
  end: {
3942
3953
  line: 90,
3943
- column: 158
3954
+ column: 64
3944
3955
  }
3945
3956
  },
3946
- "40": {
3957
+ "41": {
3947
3958
  start: {
3948
3959
  line: 93,
3949
3960
  column: 2
3950
3961
  },
3951
3962
  end: {
3952
3963
  line: 93,
3953
- column: 75
3964
+ column: 158
3954
3965
  }
3955
3966
  },
3956
- "41": {
3967
+ "42": {
3957
3968
  start: {
3958
3969
  line: 96,
3959
3970
  column: 2
3960
3971
  },
3961
3972
  end: {
3962
3973
  line: 96,
3963
- column: 56
3974
+ column: 75
3964
3975
  }
3965
3976
  },
3966
- "42": {
3977
+ "43": {
3967
3978
  start: {
3968
3979
  line: 99,
3969
3980
  column: 2
3970
3981
  },
3971
3982
  end: {
3972
3983
  line: 99,
3973
- column: 105
3984
+ column: 56
3974
3985
  }
3975
3986
  },
3976
- "43": {
3987
+ "44": {
3977
3988
  start: {
3978
3989
  line: 102,
3979
3990
  column: 2
3980
3991
  },
3981
3992
  end: {
3982
3993
  line: 102,
3983
- column: 76
3994
+ column: 105
3984
3995
  }
3985
3996
  },
3986
- "44": {
3997
+ "45": {
3987
3998
  start: {
3988
3999
  line: 105,
3989
4000
  column: 2
3990
4001
  },
3991
4002
  end: {
3992
4003
  line: 105,
3993
- column: 96
4004
+ column: 76
3994
4005
  }
3995
4006
  },
3996
- "45": {
4007
+ "46": {
3997
4008
  start: {
3998
4009
  line: 108,
3999
4010
  column: 2
4000
4011
  },
4001
4012
  end: {
4002
4013
  line: 108,
4003
- column: 100
4014
+ column: 96
4004
4015
  }
4005
4016
  },
4006
- "46": {
4017
+ "47": {
4007
4018
  start: {
4008
4019
  line: 111,
4009
4020
  column: 2
4010
4021
  },
4011
4022
  end: {
4012
4023
  line: 111,
4013
- column: 45
4024
+ column: 100
4014
4025
  }
4015
4026
  },
4016
- "47": {
4027
+ "48": {
4017
4028
  start: {
4018
4029
  line: 114,
4019
4030
  column: 2
4020
4031
  },
4021
4032
  end: {
4022
4033
  line: 114,
4023
- column: 91
4034
+ column: 45
4024
4035
  }
4025
4036
  },
4026
- "48": {
4037
+ "49": {
4027
4038
  start: {
4028
4039
  line: 117,
4029
4040
  column: 2
4030
4041
  },
4031
4042
  end: {
4032
4043
  line: 117,
4033
- column: 92
4044
+ column: 91
4034
4045
  }
4035
4046
  },
4036
- "49": {
4047
+ "50": {
4037
4048
  start: {
4038
4049
  line: 120,
4039
4050
  column: 2
4040
4051
  },
4041
4052
  end: {
4042
4053
  line: 120,
4043
- column: 90
4054
+ column: 92
4044
4055
  }
4045
4056
  },
4046
- "50": {
4057
+ "51": {
4047
4058
  start: {
4048
4059
  line: 123,
4049
4060
  column: 2
4050
4061
  },
4051
4062
  end: {
4052
4063
  line: 123,
4053
- column: 86
4064
+ column: 90
4054
4065
  }
4055
4066
  },
4056
- "51": {
4067
+ "52": {
4057
4068
  start: {
4058
4069
  line: 126,
4059
4070
  column: 2
4060
4071
  },
4061
4072
  end: {
4062
4073
  line: 126,
4063
- column: 92
4074
+ column: 86
4064
4075
  }
4065
4076
  },
4066
- "52": {
4077
+ "53": {
4067
4078
  start: {
4068
4079
  line: 129,
4069
4080
  column: 2
4070
4081
  },
4071
4082
  end: {
4072
4083
  line: 129,
4073
- column: 71
4084
+ column: 92
4074
4085
  }
4075
4086
  },
4076
- "53": {
4087
+ "54": {
4077
4088
  start: {
4078
4089
  line: 132,
4079
4090
  column: 2
4080
4091
  },
4081
4092
  end: {
4082
4093
  line: 132,
4083
- column: 53
4094
+ column: 71
4084
4095
  }
4085
4096
  },
4086
- "54": {
4097
+ "55": {
4087
4098
  start: {
4088
- line: 134,
4089
- column: 56
4099
+ line: 135,
4100
+ column: 2
4090
4101
  },
4091
4102
  end: {
4092
- line: 138,
4093
- column: 1
4103
+ line: 135,
4104
+ column: 53
4094
4105
  }
4095
4106
  },
4096
- "55": {
4107
+ "56": {
4097
4108
  start: {
4098
- line: 141,
4099
- column: 2
4109
+ line: 137,
4110
+ column: 56
4100
4111
  },
4101
4112
  end: {
4102
4113
  line: 141,
4103
- column: 49
4114
+ column: 1
4104
4115
  }
4105
4116
  },
4106
- "56": {
4117
+ "57": {
4107
4118
  start: {
4108
4119
  line: 144,
4109
4120
  column: 2
4110
4121
  },
4111
4122
  end: {
4112
4123
  line: 144,
4113
- column: 54
4124
+ column: 49
4114
4125
  }
4115
4126
  },
4116
- "57": {
4127
+ "58": {
4117
4128
  start: {
4118
4129
  line: 147,
4119
4130
  column: 2
4120
4131
  },
4121
4132
  end: {
4122
4133
  line: 147,
4123
- column: 43
4134
+ column: 54
4124
4135
  }
4125
4136
  },
4126
- "58": {
4137
+ "59": {
4127
4138
  start: {
4128
4139
  line: 150,
4129
4140
  column: 2
4130
4141
  },
4131
4142
  end: {
4132
4143
  line: 150,
4133
- column: 178
4144
+ column: 43
4134
4145
  }
4135
4146
  },
4136
- "59": {
4147
+ "60": {
4137
4148
  start: {
4138
4149
  line: 153,
4139
4150
  column: 2
4140
4151
  },
4141
4152
  end: {
4142
4153
  line: 153,
4143
- column: 184
4154
+ column: 178
4144
4155
  }
4145
4156
  },
4146
- "60": {
4157
+ "61": {
4147
4158
  start: {
4148
4159
  line: 156,
4149
4160
  column: 2
4150
4161
  },
4151
4162
  end: {
4152
4163
  line: 156,
4153
- column: 193
4164
+ column: 184
4154
4165
  }
4155
4166
  },
4156
- "61": {
4167
+ "62": {
4157
4168
  start: {
4158
4169
  line: 159,
4159
4170
  column: 2
4160
4171
  },
4161
4172
  end: {
4162
4173
  line: 159,
4163
- column: 72
4174
+ column: 193
4164
4175
  }
4165
4176
  },
4166
- "62": {
4177
+ "63": {
4167
4178
  start: {
4168
4179
  line: 162,
4169
4180
  column: 2
4170
4181
  },
4171
4182
  end: {
4172
4183
  line: 162,
4173
- column: 111
4184
+ column: 72
4174
4185
  }
4175
4186
  },
4176
- "63": {
4187
+ "64": {
4177
4188
  start: {
4178
4189
  line: 165,
4179
4190
  column: 2
4180
4191
  },
4181
4192
  end: {
4182
4193
  line: 165,
4183
- column: 115
4194
+ column: 111
4184
4195
  }
4185
4196
  },
4186
- "64": {
4197
+ "65": {
4187
4198
  start: {
4188
4199
  line: 168,
4189
4200
  column: 2
4190
4201
  },
4191
4202
  end: {
4192
4203
  line: 168,
4193
- column: 85
4204
+ column: 115
4194
4205
  }
4195
4206
  },
4196
- "65": {
4207
+ "66": {
4197
4208
  start: {
4198
4209
  line: 171,
4199
4210
  column: 2
4200
4211
  },
4201
4212
  end: {
4202
4213
  line: 171,
4214
+ column: 85
4215
+ }
4216
+ },
4217
+ "67": {
4218
+ start: {
4219
+ line: 174,
4220
+ column: 2
4221
+ },
4222
+ end: {
4223
+ line: 174,
4203
4224
  column: 132
4204
4225
  }
4205
4226
  }
@@ -4444,6 +4465,30 @@
4444
4465
  }
4445
4466
  },
4446
4467
  line: 32
4468
+ },
4469
+ "10": {
4470
+ name: "(anonymous_10)",
4471
+ decl: {
4472
+ start: {
4473
+ line: 34,
4474
+ column: 47
4475
+ },
4476
+ end: {
4477
+ line: 34,
4478
+ column: 48
4479
+ }
4480
+ },
4481
+ loc: {
4482
+ start: {
4483
+ line: 35,
4484
+ column: 2
4485
+ },
4486
+ end: {
4487
+ line: 35,
4488
+ column: 98
4489
+ }
4490
+ },
4491
+ line: 35
4447
4492
  }
4448
4493
  },
4449
4494
  branchMap: {},
@@ -4513,7 +4558,9 @@
4513
4558
  "62": 0,
4514
4559
  "63": 0,
4515
4560
  "64": 0,
4516
- "65": 0
4561
+ "65": 0,
4562
+ "66": 0,
4563
+ "67": 0
4517
4564
  },
4518
4565
  f: {
4519
4566
  "0": 0,
@@ -4525,11 +4572,12 @@
4525
4572
  "6": 0,
4526
4573
  "7": 0,
4527
4574
  "8": 0,
4528
- "9": 0
4575
+ "9": 0,
4576
+ "10": 0
4529
4577
  },
4530
4578
  b: {},
4531
4579
  _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
4532
- hash: "c95043a7a8e27ef3776c13e82abb7b3d835e4fd9"
4580
+ hash: "63f64d98ea236f4c737f987542a6bf761941f20e"
4533
4581
  };
4534
4582
  var coverage = global[gcv] || (global[gcv] = {});
4535
4583
  if (!coverage[path] || coverage[path].hash !== hash) {
@@ -4607,52 +4655,58 @@
4607
4655
  cov_26237ygvis().s[19]++;
4608
4656
  return "Use either camelCase or PascalCase for naming the function - ".concat(functionName, ".");
4609
4657
  };
4610
- var API_CONNECTOR_SHOULD_USE_DEFAULT_EXPORT_MESSAGE = (cov_26237ygvis().s[20]++, "API Connector should be exported using the default export method");
4611
- var COMBINE_MULTIPLE_INDEPENDENT_AWAITS_MESSAGE = (cov_26237ygvis().s[21]++, "Combine independent awaits to a single `Promise.all` call.");
4612
- var EXPORTED_OBJECT_AND_FILENAME_SHOULD_MATCH_MESSAGE = (cov_26237ygvis().s[22]++, "Exported object and filename should match.");
4613
- var GLOBALPROPS_NO_ASSIGNMENT_MESSAGE = (cov_26237ygvis().s[23]++, "globalProps should not be assigned to other variables");
4614
- var NESTED_GLOBALPROPS_NO_ASSIGNMENT_MESSAGE = (cov_26237ygvis().s[24]++, "Nested properties of globalProps should not be assigned to other variables");
4615
- var NO_AXIOS_IMPORT_OUTSIDE_APIS_MESSAGE = (cov_26237ygvis().s[25]++, "Do not use axios outside `app/javascript/src/apis`");
4616
- var NO_CONDITIONAL_RENDER_OF_OVERLAYS = (cov_26237ygvis().s[26]++, "Overlay components should not be rendered conditionally. Use `isOpen` attribute instead.");
4617
- var NO_EXCESS_API_ACTION_ARGUMENTS_MESSAGE = (cov_26237ygvis().s[27]++, "API actions should use named parameters for more than ".concat(API_ACTIONS_ARGUMENT_LIMIT, " parameters"));
4618
- var NO_EXCESS_FUNCTION_ARGUMENTS_MESSAGE = (cov_26237ygvis().s[28]++, "Functions should use named parameters for more than ".concat(ARGUMENT_LIMIT, " parameters"));
4619
- var NO_GLOBALPROPS_REASSIGNMENT_MESSAGE = (cov_26237ygvis().s[29]++, "globalProps or its nested properties should not be re-assigned.");
4620
- var NO_ROUTES_ASSIGNMENT = (cov_26237ygvis().s[30]++, "`routes` or its nested properties should not be assigned to other variables.");
4621
- var NO_ROUTES_REASSIGNMENT = (cov_26237ygvis().s[31]++, "`routes` or its nested properties should not be re-assigned.");
4622
- var NO_NAMESPACE_SPECIFIER_IMPORT_FOR_RAMDA_MESSAGE = (cov_26237ygvis().s[32]++, 'Use `import { methodsToImport } from "ramda"` instead');
4623
- var PREFIX_NEETO_UI_IMPORT_ALIAS_MESSAGE = (cov_26237ygvis().s[33]++, "Aliases for anything imported from neetoUI or neetoIcons should start with `NeetoUI`");
4624
- var ROUTE_SHOULD_BE_A_STRING = (cov_26237ygvis().s[34]++, "Route should be a plain string literal.");
4625
- var ROUTE_SHOULD_MATCH_OBJECT_PATH = (cov_26237ygvis().s[35]++, "Route string should match with its object path.");
4626
- var ROUTES_HAS_ALREADY_BEEN_DECLARED = (cov_26237ygvis().s[36]++, "Identifier `routes` has already been declared");
4627
- var ROUTES_CONSTANT_SHOULD_BE_DECLARED = (cov_26237ygvis().s[37]++, "A constant object named `routes` should be declared inside routes.js");
4628
- var ROUTES_SHOULD_USE_DEFAULT_EXPORT = (cov_26237ygvis().s[38]++, "`routes` should be exported using the default export method.");
4629
- var USE_ARRAY_METHODS = (cov_26237ygvis().s[39]++, "Use array methods (forEach, map, filter, reduce, etc) instead of 'for' loop. Refer 'Advanced Array Methods' section in https://bit.ly/array-methods-page-1");
4630
- var USE_AXIOS_CONFIG_FOR_PASSING_QUERY_PARAMETERS_MESSAGE = (cov_26237ygvis().s[40]++, "Use 'params attribute in axios configuration' to pass query parameters.");
4631
- var USE_INLINE_SVG_FOR_RENDER = (cov_26237ygvis().s[41]++, "Use inline SVG instead of img tag for rendering SVGs");
4632
- var USE_LINK_FOR_NAVIGATION = (cov_26237ygvis().s[42]++, "Use Link or NavLink component from 'react-router-dom' for click-navigation instead of onClick handler");
4633
- var USE_ANCHOR_FOR_NAVIGATION = (cov_26237ygvis().s[43]++, "Use Anchor element (<a>) for click-navigation instead of onClick handler");
4634
- var USE_BUTTON_TO_FOR_LINK_NAVIGATION = (cov_26237ygvis().s[44]++, "Use `to` prop of Button (<Button to='path'>) for click-navigation instead of onClick handler");
4635
- var USE_BUTTON_TO_FOR_ANCHOR_NAVIGATION = (cov_26237ygvis().s[45]++, "Use `href` prop of Button (<Button href='path'>) for click-navigation instead of onClick handler");
4636
- var USE_NEETO_SMALLER_CASE = (cov_26237ygvis().s[46]++, "Use 'neeto' instead of 'Neeto' in strings");
4637
- var USE_NEETOUI_BORDER_COLOR = (cov_26237ygvis().s[47]++, "Use neetoUI border color. Refer https://bit.ly/neeto-ui-border-colors for more details.");
4638
- var USE_NEETOUI_BORDER_RADIUS = (cov_26237ygvis().s[48]++, "Use neetoUI border radius. Refer https://bit.ly/neeto-ui-border-radius for more details.");
4639
- var USE_NEETOUI_BOX_SHADOW = (cov_26237ygvis().s[49]++, "Use neetoUI border shadow. Refer https://bit.ly/neeto-ui-box-shadows for more details.");
4640
- var USE_NEETOUI_TEXT_COLOR = (cov_26237ygvis().s[50]++, "Use neetoUI text color. Refer https://bit.ly/neeto-ui-text-color for more details.");
4641
- var DONT_USE_ZUSTAND_STORE_WITHOUT_SELECTOR = (cov_26237ygvis().s[51]++, "Don't use zustand store hook without a selector function. It will impact the performance");
4642
- var DONT_USE_ZUSTAND_STORE_WITHOUT_COMPARATOR_FUNCTION = (cov_26237ygvis().s[52]++, "Don't pick multiple zustand state items without comparator function");
4643
- var USE_PROP_FOR_PICKING_SINGLE_ITEM = (cov_26237ygvis().s[53]++, "Use prop instead of pick when picking single item");
4644
- var ENSURE_ZUSTAND_STORES_ARE_TYPE_ANNOTATED = (cov_26237ygvis().s[54]++, "\n Zustand stores should be type annotated like this:\n /** @type {import(\"neetocommons/react-utils\").ZustandStoreHook} */\n const useUserStore = create(...)\n");
4645
- var USE_REACT_QUERY_FOR_MANAGING_REMOTE_DATA = (cov_26237ygvis().s[55]++, "API calls should be managed using React Query");
4646
- var FILES_INSIDE_REACT_QUERY_FOLDER_SHOULD_END_WITH_API = (cov_26237ygvis().s[56]++, "Files inside reactQuery folder should end with Api");
4647
- var USE_ZUSTAND_FOR_GLOBAL_STATE_MANAGEMENT = (cov_26237ygvis().s[57]++, "Use zustand for global state management");
4648
- var AVOID_T_FUNCTIONS_IN_STRING_INTERPOLATION = (cov_26237ygvis().s[58]++, "Translation function should not be used in string interpolation. Instead use a single translation key for the entire string. Refer: https://bit.ly/localization-best-practices");
4649
- var AVOID_MULTIPLE_T_FUNCTIONS_UNDER_SAME_PARENT = (cov_26237ygvis().s[59]++, "Avoid using multiple translation functions under the same JSX parent. Instead use a single translation function with a single key. Refer: https://bit.ly/localization-best-practices");
4650
- var USE_TRANS_COMPONENTS_AND_VALUES_PROPS = (cov_26237ygvis().s[60]++, "Instead of using numbered tags in translation string use `components` and `values` props of `Trans` to use named tag in translation string. Refer: https://bit.ly/localization-best-practices");
4651
- var USE_TRANSLATION_HOOK_IN_COMPONENTS = (cov_26237ygvis().s[61]++, "Use translation function from `useTranslation()` hook in components.");
4652
- var USE_COMPONENTS_CHILDREN_PROP_IN_TRANS = (cov_26237ygvis().s[62]++, "Use components children prop instead of label prop in `Trans` component to avoid multiple translation keys.");
4653
- var USE_I18NEXT_PLURALS = (cov_26237ygvis().s[63]++, "Use plurals that comes with the `i18next` package for hard-coded strings. Refer: https://bit.ly/i18next-plurals");
4654
- var USE_PLURALIZE_PACKAGE = (cov_26237ygvis().s[64]++, "Use `pluralize` package for dynamic values. Refer: https://bit.ly/i18next-plurals");
4655
- var USE_COPY_TO_CLIPBOARD_FROM_NEETO_COMMONS = (cov_26237ygvis().s[65]++, "Use `copyToClipboard` from `@bigbinary/neeto-commons-frontend` package. Refer: https://bit.ly/copy-to-clipboard-utility-function");
4658
+ cov_26237ygvis().s[20]++;
4659
+ var replaceZustandDefaultExportWith = function replaceZustandDefaultExportWith(fix) {
4660
+ cov_26237ygvis().f[10]++;
4661
+ cov_26237ygvis().s[21]++;
4662
+ return "Zustand has deprecated the use of default exports for its functions. Replace this with: ".concat(fix);
4663
+ };
4664
+ var API_CONNECTOR_SHOULD_USE_DEFAULT_EXPORT_MESSAGE = (cov_26237ygvis().s[22]++, "API Connector should be exported using the default export method");
4665
+ var COMBINE_MULTIPLE_INDEPENDENT_AWAITS_MESSAGE = (cov_26237ygvis().s[23]++, "Combine independent awaits to a single `Promise.all` call.");
4666
+ var EXPORTED_OBJECT_AND_FILENAME_SHOULD_MATCH_MESSAGE = (cov_26237ygvis().s[24]++, "Exported object and filename should match.");
4667
+ var GLOBALPROPS_NO_ASSIGNMENT_MESSAGE = (cov_26237ygvis().s[25]++, "globalProps should not be assigned to other variables");
4668
+ var NESTED_GLOBALPROPS_NO_ASSIGNMENT_MESSAGE = (cov_26237ygvis().s[26]++, "Nested properties of globalProps should not be assigned to other variables");
4669
+ var NO_AXIOS_IMPORT_OUTSIDE_APIS_MESSAGE = (cov_26237ygvis().s[27]++, "Do not use axios outside `app/javascript/src/apis`");
4670
+ var NO_CONDITIONAL_RENDER_OF_OVERLAYS = (cov_26237ygvis().s[28]++, "Overlay components should not be rendered conditionally. Use `isOpen` attribute instead.");
4671
+ var NO_EXCESS_API_ACTION_ARGUMENTS_MESSAGE = (cov_26237ygvis().s[29]++, "API actions should use named parameters for more than ".concat(API_ACTIONS_ARGUMENT_LIMIT, " parameters"));
4672
+ var NO_EXCESS_FUNCTION_ARGUMENTS_MESSAGE = (cov_26237ygvis().s[30]++, "Functions should use named parameters for more than ".concat(ARGUMENT_LIMIT, " parameters"));
4673
+ var NO_GLOBALPROPS_REASSIGNMENT_MESSAGE = (cov_26237ygvis().s[31]++, "globalProps or its nested properties should not be re-assigned.");
4674
+ var NO_ROUTES_ASSIGNMENT = (cov_26237ygvis().s[32]++, "`routes` or its nested properties should not be assigned to other variables.");
4675
+ var NO_ROUTES_REASSIGNMENT = (cov_26237ygvis().s[33]++, "`routes` or its nested properties should not be re-assigned.");
4676
+ var NO_NAMESPACE_SPECIFIER_IMPORT_FOR_RAMDA_MESSAGE = (cov_26237ygvis().s[34]++, 'Use `import { methodsToImport } from "ramda"` instead');
4677
+ var PREFIX_NEETO_UI_IMPORT_ALIAS_MESSAGE = (cov_26237ygvis().s[35]++, "Aliases for anything imported from neetoUI or neetoIcons should start with `NeetoUI`");
4678
+ var ROUTE_SHOULD_BE_A_STRING = (cov_26237ygvis().s[36]++, "Route should be a plain string literal.");
4679
+ var ROUTE_SHOULD_MATCH_OBJECT_PATH = (cov_26237ygvis().s[37]++, "Route string should match with its object path.");
4680
+ var ROUTES_HAS_ALREADY_BEEN_DECLARED = (cov_26237ygvis().s[38]++, "Identifier `routes` has already been declared");
4681
+ var ROUTES_CONSTANT_SHOULD_BE_DECLARED = (cov_26237ygvis().s[39]++, "A constant object named `routes` should be declared inside routes.js");
4682
+ var ROUTES_SHOULD_USE_DEFAULT_EXPORT = (cov_26237ygvis().s[40]++, "`routes` should be exported using the default export method.");
4683
+ var USE_ARRAY_METHODS = (cov_26237ygvis().s[41]++, "Use array methods (forEach, map, filter, reduce, etc) instead of 'for' loop. Refer 'Advanced Array Methods' section in https://bit.ly/array-methods-page-1");
4684
+ var USE_AXIOS_CONFIG_FOR_PASSING_QUERY_PARAMETERS_MESSAGE = (cov_26237ygvis().s[42]++, "Use 'params attribute in axios configuration' to pass query parameters.");
4685
+ var USE_INLINE_SVG_FOR_RENDER = (cov_26237ygvis().s[43]++, "Use inline SVG instead of img tag for rendering SVGs");
4686
+ var USE_LINK_FOR_NAVIGATION = (cov_26237ygvis().s[44]++, "Use Link or NavLink component from 'react-router-dom' for click-navigation instead of onClick handler");
4687
+ var USE_ANCHOR_FOR_NAVIGATION = (cov_26237ygvis().s[45]++, "Use Anchor element (<a>) for click-navigation instead of onClick handler");
4688
+ var USE_BUTTON_TO_FOR_LINK_NAVIGATION = (cov_26237ygvis().s[46]++, "Use `to` prop of Button (<Button to='path'>) for click-navigation instead of onClick handler");
4689
+ var USE_BUTTON_TO_FOR_ANCHOR_NAVIGATION = (cov_26237ygvis().s[47]++, "Use `href` prop of Button (<Button href='path'>) for click-navigation instead of onClick handler");
4690
+ var USE_NEETO_SMALLER_CASE = (cov_26237ygvis().s[48]++, "Use 'neeto' instead of 'Neeto' in strings");
4691
+ var USE_NEETOUI_BORDER_COLOR = (cov_26237ygvis().s[49]++, "Use neetoUI border color. Refer https://bit.ly/neeto-ui-border-colors for more details.");
4692
+ var USE_NEETOUI_BORDER_RADIUS = (cov_26237ygvis().s[50]++, "Use neetoUI border radius. Refer https://bit.ly/neeto-ui-border-radius for more details.");
4693
+ var USE_NEETOUI_BOX_SHADOW = (cov_26237ygvis().s[51]++, "Use neetoUI border shadow. Refer https://bit.ly/neeto-ui-box-shadows for more details.");
4694
+ var USE_NEETOUI_TEXT_COLOR = (cov_26237ygvis().s[52]++, "Use neetoUI text color. Refer https://bit.ly/neeto-ui-text-color for more details.");
4695
+ var DONT_USE_ZUSTAND_STORE_WITHOUT_SELECTOR = (cov_26237ygvis().s[53]++, "Don't use zustand store hook without a selector function. It will impact the performance");
4696
+ var DONT_USE_ZUSTAND_STORE_WITHOUT_COMPARATOR_FUNCTION = (cov_26237ygvis().s[54]++, "Don't pick multiple zustand state items without comparator function");
4697
+ var USE_PROP_FOR_PICKING_SINGLE_ITEM = (cov_26237ygvis().s[55]++, "Use prop instead of pick when picking single item");
4698
+ var ENSURE_ZUSTAND_STORES_ARE_TYPE_ANNOTATED = (cov_26237ygvis().s[56]++, "\n Zustand stores should be type annotated like this:\n /** @type {import(\"neetocommons/react-utils\").ZustandStoreHook} */\n const useUserStore = create(...)\n");
4699
+ var USE_REACT_QUERY_FOR_MANAGING_REMOTE_DATA = (cov_26237ygvis().s[57]++, "API calls should be managed using React Query");
4700
+ var FILES_INSIDE_REACT_QUERY_FOLDER_SHOULD_END_WITH_API = (cov_26237ygvis().s[58]++, "Files inside reactQuery folder should end with Api");
4701
+ var USE_ZUSTAND_FOR_GLOBAL_STATE_MANAGEMENT = (cov_26237ygvis().s[59]++, "Use zustand for global state management");
4702
+ var AVOID_T_FUNCTIONS_IN_STRING_INTERPOLATION = (cov_26237ygvis().s[60]++, "Translation function should not be used in string interpolation. Instead use a single translation key for the entire string. Refer: https://bit.ly/localization-best-practices");
4703
+ var AVOID_MULTIPLE_T_FUNCTIONS_UNDER_SAME_PARENT = (cov_26237ygvis().s[61]++, "Avoid using multiple translation functions under the same JSX parent. Instead use a single translation function with a single key. Refer: https://bit.ly/localization-best-practices");
4704
+ var USE_TRANS_COMPONENTS_AND_VALUES_PROPS = (cov_26237ygvis().s[62]++, "Instead of using numbered tags in translation string use `components` and `values` props of `Trans` to use named tag in translation string. Refer: https://bit.ly/localization-best-practices");
4705
+ var USE_TRANSLATION_HOOK_IN_COMPONENTS = (cov_26237ygvis().s[63]++, "Use translation function from `useTranslation()` hook in components.");
4706
+ var USE_COMPONENTS_CHILDREN_PROP_IN_TRANS = (cov_26237ygvis().s[64]++, "Use components children prop instead of label prop in `Trans` component to avoid multiple translation keys.");
4707
+ var USE_I18NEXT_PLURALS = (cov_26237ygvis().s[65]++, "Use plurals that comes with the `i18next` package for hard-coded strings. Refer: https://bit.ly/i18next-plurals");
4708
+ var USE_PLURALIZE_PACKAGE = (cov_26237ygvis().s[66]++, "Use `pluralize` package for dynamic values. Refer: https://bit.ly/i18next-plurals");
4709
+ var USE_COPY_TO_CLIPBOARD_FROM_NEETO_COMMONS = (cov_26237ygvis().s[67]++, "Use `copyToClipboard` from `@bigbinary/neeto-commons-frontend` package. Refer: https://bit.ly/copy-to-clipboard-utility-function");
4656
4710
 
4657
4711
  function cov_22o2x8aeul() {
4658
4712
  var path = "/home/runner/work/eslint-plugin-neeto/eslint-plugin-neeto/src/lib/rules/api-connector-name-should-match-filename.js";
@@ -33670,6 +33724,305 @@
33670
33724
  }
33671
33725
  };
33672
33726
 
33727
+ function cov_ser262mz2() {
33728
+ var path = "/home/runner/work/eslint-plugin-neeto/eslint-plugin-neeto/src/lib/rules/no-deprecated-imports-from-zustand/constants.js";
33729
+ var hash = "d4cfe8a805225421f48624eef7e1bc82b4070e4f";
33730
+ var global = new Function("return this")();
33731
+ var gcv = "__coverage__";
33732
+ var coverageData = {
33733
+ path: "/home/runner/work/eslint-plugin-neeto/eslint-plugin-neeto/src/lib/rules/no-deprecated-imports-from-zustand/constants.js",
33734
+ statementMap: {
33735
+ "0": {
33736
+ start: {
33737
+ line: 5,
33738
+ column: 38
33739
+ },
33740
+ end: {
33741
+ line: 10,
33742
+ column: 1
33743
+ }
33744
+ }
33745
+ },
33746
+ fnMap: {},
33747
+ branchMap: {},
33748
+ s: {
33749
+ "0": 0
33750
+ },
33751
+ f: {},
33752
+ b: {},
33753
+ _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
33754
+ hash: "d4cfe8a805225421f48624eef7e1bc82b4070e4f"
33755
+ };
33756
+ var coverage = global[gcv] || (global[gcv] = {});
33757
+ if (!coverage[path] || coverage[path].hash !== hash) {
33758
+ coverage[path] = coverageData;
33759
+ }
33760
+ var actualCoverage = coverage[path];
33761
+ {
33762
+ // @ts-ignore
33763
+ cov_ser262mz2 = function () {
33764
+ return actualCoverage;
33765
+ };
33766
+ }
33767
+ return actualCoverage;
33768
+ }
33769
+ cov_ser262mz2();
33770
+ var ZUSTAND_IMPORT_PATTERN = (cov_ser262mz2().s[0]++, {
33771
+ type: TYPES.IMPORT_DECLARATION,
33772
+ source: {
33773
+ value: ramda.test(/^zustand.*/)
33774
+ }
33775
+ });
33776
+
33777
+ function cov_1vlj6uvrin() {
33778
+ var path = "/home/runner/work/eslint-plugin-neeto/eslint-plugin-neeto/src/lib/rules/no-deprecated-imports-from-zustand/index.js";
33779
+ var hash = "0c135c6ed9a9946ba2c9da1731782a2be6827df4";
33780
+ var global = new Function("return this")();
33781
+ var gcv = "__coverage__";
33782
+ var coverageData = {
33783
+ path: "/home/runner/work/eslint-plugin-neeto/eslint-plugin-neeto/src/lib/rules/no-deprecated-imports-from-zustand/index.js",
33784
+ statementMap: {
33785
+ "0": {
33786
+ start: {
33787
+ line: 15,
33788
+ column: 22
33789
+ },
33790
+ end: {
33791
+ line: 27,
33792
+ column: 3
33793
+ }
33794
+ },
33795
+ "1": {
33796
+ start: {
33797
+ line: 17,
33798
+ column: 6
33799
+ },
33800
+ end: {
33801
+ line: 17,
33802
+ column: 64
33803
+ }
33804
+ },
33805
+ "2": {
33806
+ start: {
33807
+ line: 17,
33808
+ column: 57
33809
+ },
33810
+ end: {
33811
+ line: 17,
33812
+ column: 64
33813
+ }
33814
+ },
33815
+ "3": {
33816
+ start: {
33817
+ line: 19,
33818
+ column: 18
33819
+ },
33820
+ end: {
33821
+ line: 19,
33822
+ column: 42
33823
+ }
33824
+ },
33825
+ "4": {
33826
+ start: {
33827
+ line: 21,
33828
+ column: 6
33829
+ },
33830
+ end: {
33831
+ line: 25,
33832
+ column: 9
33833
+ }
33834
+ },
33835
+ "5": {
33836
+ start: {
33837
+ line: 24,
33838
+ column: 22
33839
+ },
33840
+ end: {
33841
+ line: 24,
33842
+ column: 50
33843
+ }
33844
+ }
33845
+ },
33846
+ fnMap: {
33847
+ "0": {
33848
+ name: "(anonymous_0)",
33849
+ decl: {
33850
+ start: {
33851
+ line: 15,
33852
+ column: 10
33853
+ },
33854
+ end: {
33855
+ line: 15,
33856
+ column: 11
33857
+ }
33858
+ },
33859
+ loc: {
33860
+ start: {
33861
+ line: 15,
33862
+ column: 22
33863
+ },
33864
+ end: {
33865
+ line: 27,
33866
+ column: 3
33867
+ }
33868
+ },
33869
+ line: 15
33870
+ },
33871
+ "1": {
33872
+ name: "(anonymous_1)",
33873
+ decl: {
33874
+ start: {
33875
+ line: 16,
33876
+ column: 4
33877
+ },
33878
+ end: {
33879
+ line: 16,
33880
+ column: 5
33881
+ }
33882
+ },
33883
+ loc: {
33884
+ start: {
33885
+ line: 16,
33886
+ column: 33
33887
+ },
33888
+ end: {
33889
+ line: 26,
33890
+ column: 5
33891
+ }
33892
+ },
33893
+ line: 16
33894
+ },
33895
+ "2": {
33896
+ name: "(anonymous_2)",
33897
+ decl: {
33898
+ start: {
33899
+ line: 24,
33900
+ column: 13
33901
+ },
33902
+ end: {
33903
+ line: 24,
33904
+ column: 14
33905
+ }
33906
+ },
33907
+ loc: {
33908
+ start: {
33909
+ line: 24,
33910
+ column: 22
33911
+ },
33912
+ end: {
33913
+ line: 24,
33914
+ column: 50
33915
+ }
33916
+ },
33917
+ line: 24
33918
+ }
33919
+ },
33920
+ branchMap: {
33921
+ "0": {
33922
+ loc: {
33923
+ start: {
33924
+ line: 17,
33925
+ column: 6
33926
+ },
33927
+ end: {
33928
+ line: 17,
33929
+ column: 64
33930
+ }
33931
+ },
33932
+ type: "if",
33933
+ locations: [{
33934
+ start: {
33935
+ line: 17,
33936
+ column: 6
33937
+ },
33938
+ end: {
33939
+ line: 17,
33940
+ column: 64
33941
+ }
33942
+ }, {
33943
+ start: {
33944
+ line: undefined,
33945
+ column: undefined
33946
+ },
33947
+ end: {
33948
+ line: undefined,
33949
+ column: undefined
33950
+ }
33951
+ }],
33952
+ line: 17
33953
+ }
33954
+ },
33955
+ s: {
33956
+ "0": 0,
33957
+ "1": 0,
33958
+ "2": 0,
33959
+ "3": 0,
33960
+ "4": 0,
33961
+ "5": 0
33962
+ },
33963
+ f: {
33964
+ "0": 0,
33965
+ "1": 0,
33966
+ "2": 0
33967
+ },
33968
+ b: {
33969
+ "0": [0, 0]
33970
+ },
33971
+ _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
33972
+ hash: "0c135c6ed9a9946ba2c9da1731782a2be6827df4"
33973
+ };
33974
+ var coverage = global[gcv] || (global[gcv] = {});
33975
+ if (!coverage[path] || coverage[path].hash !== hash) {
33976
+ coverage[path] = coverageData;
33977
+ }
33978
+ var actualCoverage = coverage[path];
33979
+ {
33980
+ // @ts-ignore
33981
+ cov_1vlj6uvrin = function () {
33982
+ return actualCoverage;
33983
+ };
33984
+ }
33985
+ return actualCoverage;
33986
+ }
33987
+ cov_1vlj6uvrin();
33988
+ var noDeprecatedImportsFromZustand = {
33989
+ meta: {
33990
+ type: "problem",
33991
+ docs: {
33992
+ description: "Prevents the usage of deprecated imports from zustand."
33993
+ },
33994
+ fixable: "code"
33995
+ },
33996
+ create: function create(context) {
33997
+ cov_1vlj6uvrin().f[0]++;
33998
+ cov_1vlj6uvrin().s[0]++;
33999
+ return {
34000
+ ImportDefaultSpecifier: function ImportDefaultSpecifier(node) {
34001
+ cov_1vlj6uvrin().f[1]++;
34002
+ cov_1vlj6uvrin().s[1]++;
34003
+ if (!matches(ZUSTAND_IMPORT_PATTERN, node.parent)) {
34004
+ cov_1vlj6uvrin().b[0][0]++;
34005
+ cov_1vlj6uvrin().s[2]++;
34006
+ return;
34007
+ } else {
34008
+ cov_1vlj6uvrin().b[0][1]++;
34009
+ }
34010
+ var _fix = (cov_1vlj6uvrin().s[3]++, "{ ".concat(node.local.name, " }"));
34011
+ cov_1vlj6uvrin().s[4]++;
34012
+ context.report({
34013
+ node: node,
34014
+ message: replaceZustandDefaultExportWith(_fix),
34015
+ fix: function fix(fixer) {
34016
+ cov_1vlj6uvrin().f[2]++;
34017
+ cov_1vlj6uvrin().s[5]++;
34018
+ return fixer.replaceText(node, _fix);
34019
+ }
34020
+ });
34021
+ }
34022
+ };
34023
+ }
34024
+ };
34025
+
33673
34026
  function cov_kosjht30j() {
33674
34027
  var path = "/home/runner/work/eslint-plugin-neeto/eslint-plugin-neeto/src/lib/rules/no-excess-function-arguments/index.js";
33675
34028
  var hash = "344b8fd732a17735362e01d4ccb6a3e436995f6f";
@@ -53727,6 +54080,7 @@
53727
54080
  "no-blacklisted-imports": noBlacklistedImports,
53728
54081
  "no-axios-import-outside-apis": noAxiosImportOutsideApis,
53729
54082
  "no-conditional-overlays": noConditionalOverlays,
54083
+ "no-deprecated-imports-from-zustand": noDeprecatedImportsFromZustand,
53730
54084
  "no-excess-function-arguments": noExcessFunctionArguments,
53731
54085
  "no-dangling-constants": noDanglingConstants,
53732
54086
  "no-globalProps-destructure": noGlobalPropsDestructure,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/eslint-plugin-neeto",
3
- "version": "1.0.36",
3
+ "version": "1.0.37",
4
4
  "main": "dist/index.js",
5
5
  "license": "UNLICENSED",
6
6
  "scripts": {