@bigbinary/eslint-plugin-neeto 1.6.2 → 1.6.3

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 (2) hide show
  1. package/dist/index.js +26 -25
  2. package/package.json +9 -8
package/dist/index.js CHANGED
@@ -210,7 +210,7 @@
210
210
  const FIXABLE_PARAMETER_TYPES = [TYPES.IDENTIFIER, TYPES.ASSIGNMENT_PATTERN];
211
211
 
212
212
  /* eslint-disable @bigbinary/neeto/no-dangling-constants */
213
- const addInJsconfig = aliasName => `Add path for "${aliasName}" in jsconfig.json. Refer https://bit.ly/sync-webpack-alias-and-jsconfig-paths for more details.`;
213
+ const addInJsconfig = aliasName => `Add path for "${aliasName}" in jsconfig.json. Refer https://github.com/bigbinary/eslint-plugin-neeto/blob/main/docs/src/rules/webpack-aliases-and-jsconfig-paths-should-be-in-sync.md for more details.`;
214
214
  const canBeReplacedWith = fix => `Can be replaced with: ${fix}`;
215
215
  const disallowUse = packageName => `Do not use the package ${packageName}`;
216
216
  const exportedObjectShouldBe = caseStyle => `Exported object should be in ${caseStyle}. Refer https://youtu.be/uZtRIvo8-ww`;
@@ -233,7 +233,7 @@
233
233
  const suggestCommonConstants = (constantName, repository) => `Use "${constantName}" from "@bigbinary/${repository}"`;
234
234
  const addRequiredPeerDependencies$1 = packageName => `${packageName} should be added to peerDependencies`;
235
235
  const API_CONNECTOR_SHOULD_USE_DEFAULT_EXPORT_MESSAGE = "API Connector should be exported using the default export method";
236
- const CAN_BE_REPLACED_WITH_HANDLE_META_CLICK = "Can be replaced with handleMetaClick function. Refer https://bit.ly/handleMetaClick";
236
+ const CAN_BE_REPLACED_WITH_HANDLE_META_CLICK = "Can be replaced with handleMetaClick function. Refer https://github.com/bigbinary/neeto-commons-frontend/blob/main/docs/react/utils/handleMetaClick.md";
237
237
  const COMBINE_MULTIPLE_INDEPENDENT_AWAITS_MESSAGE = "Combine independent awaits to a single `Promise.all` call.";
238
238
  const EXPORTED_OBJECT_AND_FILENAME_SHOULD_MATCH_MESSAGE = "Exported object and filename should match.";
239
239
  const GLOBALPROPS_NO_ASSIGNMENT_MESSAGE = "globalProps should not be assigned to other variables";
@@ -247,7 +247,7 @@
247
247
  const NO_ROUTES_ASSIGNMENT = "`routes` or its nested properties should not be assigned to other variables.";
248
248
  const NO_ROUTES_REASSIGNMENT = "`routes` or its nested properties should not be re-assigned.";
249
249
  const NO_NAMESPACE_SPECIFIER_IMPORT_FOR_RAMDA_MESSAGE = 'Use `import { methodsToImport } from "ramda"` instead';
250
- const PREFER_EAGER_VALIDATION_MESSAGE = "Prefer to use Formik defaults for `validateOnBlur` and `validateOnChange` to ensure eager validation. Refer https://bit.ly/formik-eager-validation";
250
+ const PREFER_EAGER_VALIDATION_MESSAGE = "Prefer to use Formik defaults for `validateOnBlur` and `validateOnChange` to ensure eager validation. Refer https://courses.bigbinaryacademy.com/learn-react/#validation-in-formik";
251
251
  const PREFIX_NEETO_UI_IMPORT_ALIAS_MESSAGE = "Aliases for anything imported from neetoUI or neetoIcons should start with `NeetoUI`";
252
252
  const REPLACE_WITH_HANDLE_META_CLICK = "Replace with handleMetaClick function";
253
253
  const ROUTE_SHOULD_BE_A_STRING = "Route should be a plain string literal.";
@@ -256,19 +256,19 @@
256
256
  const ROUTES_CONSTANT_SHOULD_BE_DECLARED = "A constant object named `routes` should be declared inside routes.js";
257
257
  const ROUTES_SHOULD_USE_DEFAULT_EXPORT = "`routes` should be exported using the default export method.";
258
258
  const UNNECESSARY_CREATE_CONSUMER = "`createSubscription` function from `neetocommon/utils` invalidates the need of `createConsumer`";
259
- const USE_ARRAY_METHODS = "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";
259
+ const USE_ARRAY_METHODS = "Use array methods (forEach, map, filter, reduce, etc) instead of 'for' loop. Refer 'Advanced Array Methods' section in https://courses.bigbinaryacademy.com/learn-javascript/array-methods-3/indexof-and-lastindexof/";
260
260
  const USE_AXIOS_CONFIG_FOR_PASSING_QUERY_PARAMETERS_MESSAGE = "Use 'params attribute in axios configuration' to pass query parameters.";
261
- const USE_CREATE_SUBSCRIPTION_FROM_NEETO_COMMONS = "Use `createSubscription` from @bigbinary/neeto-commons-frontend/utils instead. Refer: https://github.com/bigbinary/neeto-commons-frontend/blob/main/docs/utils/README.md#createsubscription";
261
+ const USE_CREATE_SUBSCRIPTION_FROM_NEETO_COMMONS = "Use `createSubscription` from @bigbinary/neeto-commons-frontend/utils instead. Refer: https://github.com/bigbinary/neeto-commons-frontend/blob/main/docs/utils/createSubscription.md";
262
262
  const USE_INLINE_SVG_FOR_RENDER = "Use inline SVG instead of img tag for rendering SVGs";
263
263
  const USE_LINK_FOR_NAVIGATION = "Use Link or NavLink component from 'react-router-dom' for click-navigation instead of onClick handler";
264
264
  const USE_ANCHOR_FOR_NAVIGATION = "Use Anchor element (<a>) for click-navigation instead of onClick handler";
265
265
  const USE_BUTTON_TO_FOR_LINK_NAVIGATION = "Use `to` prop of Button (<Button to='path'>) for click-navigation instead of onClick handler";
266
266
  const USE_BUTTON_TO_FOR_ANCHOR_NAVIGATION = "Use `href` prop of Button (<Button href='path'>) for click-navigation instead of onClick handler";
267
267
  const USE_TITLE_CASE_NEETO = "Use 'Neeto' instead of 'neeto' in strings";
268
- const USE_NEETOUI_BORDER_COLOR = "Use neetoUI border color. Refer https://bit.ly/neeto-ui-border-colors for more details.";
269
- const USE_NEETOUI_BORDER_RADIUS = "Use neetoUI border radius. Refer https://bit.ly/neeto-ui-border-radius for more details.";
270
- const USE_NEETOUI_BOX_SHADOW = "Use neetoUI border shadow. Refer https://bit.ly/neeto-ui-box-shadows for more details.";
271
- const USE_NEETOUI_TEXT_COLOR = "Use neetoUI text color. Refer https://bit.ly/neeto-ui-text-color for more details.";
268
+ const USE_NEETOUI_BORDER_COLOR = "Use neetoUI border color. Refer https://neeto-ui.neeto.com/?path=/docs/foundation-helpers-border-color--docs for more details.";
269
+ const USE_NEETOUI_BORDER_RADIUS = "Use neetoUI border radius. Refer https://neeto-ui.neeto.com/?path=/docs/foundation-helpers-border-radius--docs for more details.";
270
+ const USE_NEETOUI_BOX_SHADOW = "Use neetoUI border shadow. Refer https://neeto-ui.neeto.com/?path=/docs/foundation-helpers-box-shadows--docs for more details.";
271
+ const USE_NEETOUI_TEXT_COLOR = "Use neetoUI text color. Refer https://neeto-ui.neeto.com/?path=/docs/foundation-helpers-color--docs for more details.";
272
272
  const DONT_USE_ZUSTAND_STORE_WITHOUT_SELECTOR = "Don't use zustand store hook without a selector function. It will impact the performance";
273
273
  const DONT_USE_ZUSTAND_STORE_WITHOUT_COMPARATOR_FUNCTION = "Don't pick multiple zustand state items without comparator function";
274
274
  const USE_PERMISSIONS_PROP_IN_PRIVATE_ROUTE = "Use `permissions` prop of PrivateRoute component for consistency in handling permission denied pages.";
@@ -281,21 +281,21 @@
281
281
  const USE_REACT_QUERY_FOR_MANAGING_REMOTE_DATA = "API calls should be managed using React Query";
282
282
  const FILES_INSIDE_REACT_QUERY_FOLDER_SHOULD_END_WITH_API = "Files inside reactQuery folder should end with Api";
283
283
  const USE_ZUSTAND_FOR_GLOBAL_STATE_MANAGEMENT = "Use zustand for global state management";
284
- const AVOID_T_FUNCTIONS_IN_STRING_INTERPOLATION = "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";
285
- const AVOID_MULTIPLE_T_FUNCTIONS_UNDER_SAME_PARENT = "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";
286
- const USE_TRANS_COMPONENTS_AND_VALUES_PROPS = "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";
284
+ const AVOID_T_FUNCTIONS_IN_STRING_INTERPOLATION = "Translation function should not be used in string interpolation. Instead use a single translation key for the entire string. Refer: https://courses.bigbinaryacademy.com/learn-react/#localization-best-practices";
285
+ const AVOID_MULTIPLE_T_FUNCTIONS_UNDER_SAME_PARENT = "Avoid using multiple translation functions under the same JSX parent. Instead use a single translation function with a single key. Refer: https://courses.bigbinaryacademy.com/learn-react/#localization-best-practices";
286
+ const USE_TRANS_COMPONENTS_AND_VALUES_PROPS = "Instead of using numbered tags in translation string use `components` and `values` props of `Trans` to use named tag in translation string. Refer: https://courses.bigbinaryacademy.com/learn-react/#localization-best-practices";
287
287
  const USE_TRANSLATION_HOOK_IN_COMPONENTS = "Use translation function from `useTranslation()` hook in components.";
288
288
  const USE_COMPONENTS_CHILDREN_PROP_IN_TRANS = "Use components children prop instead of label prop in `Trans` component to avoid multiple translation keys.";
289
- const USE_I18NEXT_PLURALS = "Use plurals that comes with the `i18next` package for hard-coded strings. Refer: https://bit.ly/i18next-plurals";
290
- const USE_PLURALIZE_PACKAGE = "Use `pluralize` package for dynamic values. Refer: https://bit.ly/i18next-plurals";
291
- const USE_COPY_TO_CLIPBOARD_FROM_NEETO_COMMONS = "Use `copyToClipboard` from `@bigbinary/neeto-commons-frontend` package. Refer: https://bit.ly/copy-to-clipboard-utility-function";
292
- const USE_ZUSTAND_PICK_TRANSFORMER = "Replace the boilerplate with zustand-pick syntax offered by babel-preset-neeto. Refer: https://bit.ly/zustand-pick-transform-doc";
289
+ const USE_I18NEXT_PLURALS = "Use plurals that comes with the `i18next` package for hard-coded strings. Refer: https://courses.bigbinaryacademy.com/learn-react/";
290
+ const USE_PLURALIZE_PACKAGE = "Use `pluralize` package for dynamic values. Refer: https://courses.bigbinaryacademy.com/learn-react/";
291
+ const USE_COPY_TO_CLIPBOARD_FROM_NEETO_COMMONS = "Use `copyToClipboard` from `@bigbinary/neeto-commons-frontend` package. Refer: https://github.com/bigbinary/neeto-commons-frontend/blob/main/docs/utils/copyToClipboard.md";
292
+ const USE_ZUSTAND_PICK_TRANSFORMER = "Replace the boilerplate with zustand-pick syntax offered by babel-preset-neeto. Refer: https://github.com/bigbinary/babel-preset-neeto/blob/main/docs/zustand-pick.md";
293
293
  const HARD_CODED_STRING_SHOULD_BE_LOCALIZED = "Hard-coded string should be localized";
294
294
  const PROPS_NOT_SORTED = "Props inside spread attributes should be alphabetically sorted";
295
295
  const MERGE_ADJACENT_SPREAD_ATTRIBUTES = "Merge spread attributes";
296
296
  const DIFFERENT_PROPS_MUST_BE_OUTSIDE = "Props with different key and value should be outside the spread attribute";
297
297
  const PROP_KEY_VALUE_DUPLICATE = "Prop key and value names should not be repeated";
298
- const USE_WITH_IMMUTABLE_ACTIONS_WRAPPER = 'Use "withImmutableActions" wrapper from "neeto-commons-frontend" inside zustand create. Refer: https://bit.ly/withimmutableactions';
298
+ const USE_WITH_IMMUTABLE_ACTIONS_WRAPPER = 'Use "withImmutableActions" wrapper from "neeto-commons-frontend" inside zustand create. Refer: https://github.com/bigbinary/neeto-commons-frontend/blob/main/docs/react/utils/withImmutableActions.md';
299
299
  const USE_WITH_T_HOC_IN_DUMB_COMPONENTS = 'Use "withT" HOC from "neeto-commons-frontend" instead of useTranslation hook in Dumb components';
300
300
  const NO_WITH_T_IN_SMART_COMPONENTS = '"withT" HOC should only be used in dumb components. "useTranslation" hook should be used here.';
301
301
  const USE_STANDARD_DATE_TIME_FORMATS = 'Use "dateFormat/timeFormat" from "@bigbinary/neeto-commons-frontend/utils" instead. Refer: https://github.com/bigbinary/neeto-commons-frontend/blob/main/docs/utils/dateFormat.md';
@@ -596,7 +596,7 @@
596
596
  });
597
597
 
598
598
  var name = "@bigbinary/eslint-plugin-neeto";
599
- var version = "1.6.1";
599
+ var version = "1.6.2";
600
600
  var main = "dist/index.js";
601
601
  var license = "UNLICENSED";
602
602
  var scripts = {
@@ -618,16 +618,16 @@
618
618
  };
619
619
  var devDependencies = {
620
620
  "@babel/core": "^7.19.1",
621
- "@babel/eslint-parser": "7.17.0",
621
+ "@babel/eslint-parser": "^7.27.5",
622
622
  "@babel/plugin-transform-runtime": "^7.19.1",
623
623
  "@babel/preset-env": "7.17.10",
624
624
  "@babel/preset-react": "7.16.7",
625
625
  "@babel/preset-typescript": "^7.18.6",
626
626
  "@babel/runtime": "^7.19.0",
627
627
  "@bigbinary/babel-preset-neeto": "^1.0.3",
628
- "@bigbinary/eslint-plugin-neeto": "1.5.5",
628
+ "@bigbinary/eslint-plugin-neeto": "^1.6.2",
629
629
  "@bigbinary/neeto-cist": "^1.0.3",
630
- "@bigbinary/neeto-commons-frontend": "^4.13.35",
630
+ "@bigbinary/neeto-commons-frontend": "^4.13.42",
631
631
  "@rollup/plugin-alias": "^3.1.9",
632
632
  "@rollup/plugin-babel": "^6.0.4",
633
633
  "@rollup/plugin-commonjs": "^22.0.0",
@@ -648,7 +648,6 @@
648
648
  "command-line-args": "^5.2.1",
649
649
  eslint: "^9.25.1",
650
650
  "eslint-config-prettier": "^10.1.2",
651
- "eslint-plugin-cypress": "^4.3.0",
652
651
  "eslint-plugin-import": "^2.31.0",
653
652
  "eslint-plugin-jam3": "^0.2.3",
654
653
  "eslint-plugin-json": "^4.0.1",
@@ -677,7 +676,7 @@
677
676
  };
678
677
  var peerDependencies = {
679
678
  "@bigbinary/neeto-cist": "^1.0.3",
680
- "@bigbinary/neeto-commons-frontend": "4.12.3",
679
+ "@bigbinary/neeto-commons-frontend": "4.13.38",
681
680
  eslint: "^9.25.1",
682
681
  i18next: "21.7.0",
683
682
  ramda: "0.29.0"
@@ -690,10 +689,12 @@
690
689
  scripts: scripts,
691
690
  "lint-staged": {
692
691
  "{package.json}": [
693
- ".scripts/fix-lints.sh"
692
+ "prettier --write",
693
+ "eslint --fix --no-warn-ignored"
694
694
  ],
695
695
  "**/*.js": [
696
- ".scripts/fix-lints.sh"
696
+ "prettier --write",
697
+ "eslint --fix --no-warn-ignored"
697
698
  ]
698
699
  },
699
700
  files: files,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/eslint-plugin-neeto",
3
- "version": "1.6.2",
3
+ "version": "1.6.3",
4
4
  "main": "dist/index.js",
5
5
  "license": "UNLICENSED",
6
6
  "scripts": {
@@ -11,10 +11,12 @@
11
11
  },
12
12
  "lint-staged": {
13
13
  "{package.json}": [
14
- ".scripts/fix-lints.sh"
14
+ "prettier --write",
15
+ "eslint --fix --no-warn-ignored"
15
16
  ],
16
17
  "**/*.js": [
17
- ".scripts/fix-lints.sh"
18
+ "prettier --write",
19
+ "eslint --fix --no-warn-ignored"
18
20
  ]
19
21
  },
20
22
  "files": [
@@ -29,16 +31,16 @@
29
31
  "dependencies": {},
30
32
  "devDependencies": {
31
33
  "@babel/core": "^7.19.1",
32
- "@babel/eslint-parser": "7.17.0",
34
+ "@babel/eslint-parser": "^7.27.5",
33
35
  "@babel/plugin-transform-runtime": "^7.19.1",
34
36
  "@babel/preset-env": "7.17.10",
35
37
  "@babel/preset-react": "7.16.7",
36
38
  "@babel/preset-typescript": "^7.18.6",
37
39
  "@babel/runtime": "^7.19.0",
38
40
  "@bigbinary/babel-preset-neeto": "^1.0.3",
39
- "@bigbinary/eslint-plugin-neeto": "1.5.5",
41
+ "@bigbinary/eslint-plugin-neeto": "^1.6.2",
40
42
  "@bigbinary/neeto-cist": "^1.0.3",
41
- "@bigbinary/neeto-commons-frontend": "^4.13.35",
43
+ "@bigbinary/neeto-commons-frontend": "^4.13.42",
42
44
  "@rollup/plugin-alias": "^3.1.9",
43
45
  "@rollup/plugin-babel": "^6.0.4",
44
46
  "@rollup/plugin-commonjs": "^22.0.0",
@@ -59,7 +61,6 @@
59
61
  "command-line-args": "^5.2.1",
60
62
  "eslint": "^9.25.1",
61
63
  "eslint-config-prettier": "^10.1.2",
62
- "eslint-plugin-cypress": "^4.3.0",
63
64
  "eslint-plugin-import": "^2.31.0",
64
65
  "eslint-plugin-jam3": "^0.2.3",
65
66
  "eslint-plugin-json": "^4.0.1",
@@ -88,7 +89,7 @@
88
89
  },
89
90
  "peerDependencies": {
90
91
  "@bigbinary/neeto-cist": "^1.0.3",
91
- "@bigbinary/neeto-commons-frontend": "4.12.3",
92
+ "@bigbinary/neeto-commons-frontend": "4.13.38",
92
93
  "eslint": "^9.25.1",
93
94
  "i18next": "21.7.0",
94
95
  "ramda": "0.29.0"