@bigbinary/neeto-audit-frontend 2.0.1 → 2.0.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.
package/README.md CHANGED
@@ -1,3 +1,54 @@
1
1
  # neeto-audit-frontend
2
2
 
3
- Audits neeto frontend codebase for issues and suggests a fix.
3
+ A package that audits neeto frontend packages for neeto-specific configuration and guidelines and suggests a fix.
4
+
5
+ ## Getting Started
6
+
7
+ `neeto-audit-frontend` has 5 checks to ensure neeto guidelines are being followed:
8
+
9
+ - Checks whether the package uses the common ESlint configuration from `neeto-commons-frontend`.
10
+ - Checks whether the package uses the common prettier and tailwind configurations.
11
+ - Checks whether the package uses the same set of husky pre-commit and pre-push hooks.
12
+ - Checks whether the package uses the specified node version in `.node-version` and `.nvmrc` files.
13
+ - Checks whether the package uses the recommended versions of common npm packages including other neeto packages.
14
+
15
+ There are different types of frontend packages in neeto: nanos, widgets, extensions and frontend packages.`neeto-audit-frontend` maintains a local copy of the common configuration and a different local copy if any type of package follows a different configuration. For example, ESlint configuration is different for nanos, widgets and extensions. A local copy is maintained for each of these. The files in a package are tested against these versions to see if they match. If any check fails, it will provide the command that the user can run to fix that specific check before committing.
16
+
17
+ ### Installation
18
+
19
+ ```bash
20
+ yarn add -D "@bigbinary/neeto-audit-frontend@latest"
21
+ ```
22
+
23
+ ### Run the audit
24
+
25
+ ```bash
26
+ yarn neeto-audit-frontend
27
+ ```
28
+
29
+ ### Add CI check
30
+
31
+ Add the following lines to the neetoCI YAML file.
32
+
33
+ ```yaml
34
+ setup:
35
+ - yarn install
36
+ jobs:
37
+ - name: CiChecks
38
+ commands:
39
+ - yarn neeto-audit-frontend
40
+ ```
41
+
42
+ ## Making changes to the configuration
43
+
44
+ If any changes are made to the configuration files being checked by `neeto-audit-frontend`, the audit check will fail. If this change is necessary, we should make the same changes in the local copy maintained in `neeto-audit-frontend` to ensure the checks will pass.
45
+
46
+ ## Development instructions
47
+
48
+ `neeto-audit-frontend` uses `pnpm` as the package manager. To setup the development environment run `pnpm install` after cloning the repository. After making changes to the verifiers, we can test the changes locally by using `yalc`. Follow the steps mentioned in [Testing frontend packages](https://neeto-engineering.neetokb.com/articles/testing-packages-locally-using-yalc) to test the changes.
49
+
50
+ If, for any reason, `yarn neeto-audit-frontend` command fails after pushing the changes using `yalc`, run `yarn install --check-files`.
51
+
52
+ ## Building and Releasing
53
+
54
+ The `@bigbinary/neeto-audit-frontend` gets published to NPM when we merge a PR with `patch`, `minor` or `major` label to the main branch. The `patch` label is used for bug fixes, `minor` label is used for new features and `major` label is used for breaking changes. You can checkout the `Create and publish releases` workflow in GitHub Actions to get a live update. Please note that before publishing the package, you need to verify the functionality in some of the neeto web-apps locally using `yalc` package manager.
@@ -0,0 +1,7 @@
1
+ #!/bin/sh
2
+ . "$(dirname "$0")/_/husky.sh"
3
+ . "$(dirname "$0")/helpers/prevent_pushing_to_main.sh"
4
+ . "$(dirname "$0")/helpers/neeto_audit_frontend.sh"
5
+
6
+ prevent_pushing_to_main
7
+ neeto_audit_frontend
@@ -0,0 +1,9 @@
1
+ const defaultConfigurations = require("@bigbinary/neeto-commons-frontend/configs/nanos/eslint/index.js");
2
+ const { mergeDeepLeft } = require("ramda");
3
+
4
+ module.exports = mergeDeepLeft(
5
+ {
6
+ rules: { "@bigbinary/neeto/file-name-and-export-name-standards": "off" },
7
+ },
8
+ defaultConfigurations
9
+ );
@@ -0,0 +1,16 @@
1
+ module.exports = {
2
+ tailwindConfig: "./tailwind.config.js",
3
+ trailingComma: "es5",
4
+ arrowParens: "avoid",
5
+ printWidth: 80,
6
+ tabWidth: 2,
7
+ useTabs: false,
8
+ semi: true,
9
+ quoteProps: "as-needed",
10
+ jsxSingleQuote: false,
11
+ singleQuote: false,
12
+ bracketSpacing: true,
13
+ bracketSameLine: false,
14
+ proseWrap: "always",
15
+ endOfLine: "lf",
16
+ };
@@ -10,7 +10,11 @@ const DEV_DEPENDENCIES = {
10
10
  "@babel/runtime": "7.22.6",
11
11
  "@bigbinary/babel-preset-neeto": "1.0.3",
12
12
  "@bigbinary/eslint-plugin-neeto": "1.1.2",
13
- "@bigbinary/neeto-audit-frontend": "1.0.7",
13
+ "@bigbinary/neeto-audit-frontend": "2.0.2",
14
+ "@bigbinary/neeto-cist": "1.0.0",
15
+ "@bigbinary/neeto-commons-frontend": "2.0.99",
16
+ "@bigbinary/neeto-icons": "1.13.0",
17
+ "@bigbinary/neetoui": "5.0.15",
14
18
  autoprefixer: "10.4.14",
15
19
  "babel-loader": "9.1.3",
16
20
  "babel-plugin-istanbul": "6.1.1",
@@ -1,8 +1,6 @@
1
1
  const DEPENDENCIES = {
2
- "@bigbinary/neeto-commons-frontend": "2.0.99",
3
- "@bigbinary/neeto-icons": "1.13.0",
4
- "@bigbinary/neetoui": "5.0.15",
5
- "@honeybadger-io/react": "2.0.1",
2
+ "@honeybadger-io/js": "6.5.3",
3
+ "@honeybadger-io/react": "6.1.9",
6
4
  antd: "4.24.10",
7
5
  axios: "1.4.0",
8
6
  i18next: "23.2.11",
@@ -1,13 +1,11 @@
1
1
  const DEPENDENCIES = {};
2
2
 
3
3
  const DEV_DEPENDENCIES = {
4
- "@bigbinary/neeto-commons-frontend": "2.0.99",
5
4
  "@bigbinary/neeto-filters-frontend": "2.12.1",
6
5
  "@bigbinary/neeto-molecules": "1.0.34",
7
- "@bigbinary/neeto-icons": "1.13.0",
8
- "@bigbinary/neetoui": "5.0.15",
9
6
  "@faker-js/faker": "8.0.2",
10
- "@honeybadger-io/react": "2.0.1",
7
+ "@honeybadger-io/js": "6.5.3",
8
+ "@honeybadger-io/react": "6.1.9",
11
9
  "@rollup/plugin-alias": "5.0.0",
12
10
  "@rollup/plugin-babel": "6.0.3",
13
11
  "@rollup/plugin-commonjs": "25.0.3",
@@ -48,7 +46,8 @@ const PEER_DEPENDENCIES = {
48
46
  "@bigbinary/neeto-icons": "^1.9.22",
49
47
  "@bigbinary/neeto-molecules": "^1.0.9",
50
48
  "@bigbinary/neetoui": "^5.0.4",
51
- "@honeybadger-io/react": "^2.0.1",
49
+ "@honeybadger-io/js": "^6.5.3",
50
+ "@honeybadger-io/react": "^6.1.9",
52
51
  axios: "^0.27.2",
53
52
  classnames: "^2.3.2",
54
53
  formik: "^2.2.9",
@@ -1,13 +1,11 @@
1
1
  const DEPENDENCIES = {};
2
2
 
3
3
  const DEV_DEPENDENCIES = {
4
- "@bigbinary/neeto-commons-frontend": "2.0.99",
5
4
  "@bigbinary/neeto-filters-frontend": "2.12.1",
6
5
  "@bigbinary/neeto-molecules": "1.0.34",
7
- "@bigbinary/neeto-icons": "1.13.0",
8
- "@bigbinary/neetoui": "5.0.15",
9
6
  "@faker-js/faker": "8.0.2",
10
- "@honeybadger-io/react": "2.0.1",
7
+ "@honeybadger-io/js": "6.5.3",
8
+ "@honeybadger-io/react": "6.1.9",
11
9
  "@rollup/plugin-alias": "5.0.0",
12
10
  "@rollup/plugin-babel": "6.0.3",
13
11
  "@rollup/plugin-commonjs": "25.0.3",
@@ -48,7 +46,8 @@ const PEER_DEPENDENCIES = {
48
46
  "@bigbinary/neeto-icons": "^1.9.22",
49
47
  "@bigbinary/neeto-molecules": "^1.0.9",
50
48
  "@bigbinary/neetoui": "^5.0.4",
51
- "@honeybadger-io/react": "^2.0.1",
49
+ "@honeybadger-io/js": "^6.5.3",
50
+ "@honeybadger-io/react": "^6.1.9",
52
51
  axios: "^0.27.2",
53
52
  classnames: "^2.3.2",
54
53
  formik: "^2.2.9",