@bigbinary/neeto-commons-frontend 2.1.29 → 2.1.31
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/configs/eslint/index.js +19 -0
- package/initializers.d.ts +1 -6
- package/package.json +5 -1
package/configs/eslint/index.js
CHANGED
|
@@ -49,6 +49,9 @@ module.exports = {
|
|
|
49
49
|
"promise",
|
|
50
50
|
"jam3",
|
|
51
51
|
"unused-imports",
|
|
52
|
+
"sonarjs",
|
|
53
|
+
"security",
|
|
54
|
+
"xss",
|
|
52
55
|
"@bigbinary/neeto",
|
|
53
56
|
],
|
|
54
57
|
rules: {
|
|
@@ -148,5 +151,21 @@ module.exports = {
|
|
|
148
151
|
"react/jsx-newline": ["error", { prevent: true }],
|
|
149
152
|
// not-auto-fixable: Disallow async functions which have no await expression
|
|
150
153
|
"require-await": "error",
|
|
154
|
+
// auto-fixable: This rule ensures immediate returns in functions where constants are declared and then directly returned.
|
|
155
|
+
"sonarjs/prefer-immediate-return": "error",
|
|
156
|
+
// not-auto-fixable: This rule enforces merging adjacent collapsible if statements.
|
|
157
|
+
"sonarjs/no-collapsible-if": "error",
|
|
158
|
+
// not-auto-fixable: This rule prevents identical conditions inside if-else statements.
|
|
159
|
+
"sonarjs/no-identical-conditions": "error",
|
|
160
|
+
// not-auto-fixable: This rule prevents using a function with no return as output, passing it to another function, or assigning its result to a variable.
|
|
161
|
+
"sonarjs/no-use-of-empty-return-value": "error",
|
|
162
|
+
// not-auto-fixable: This rule prevents using loops with at most one iteration.
|
|
163
|
+
"sonarjs/no-one-iteration-loop": "error",
|
|
164
|
+
// not-auto-fixable: This rule prevents using catch clause that only throws an error.
|
|
165
|
+
"sonarjs/no-useless-catch": "error",
|
|
166
|
+
// not-auto-fixable: This rule warns against "eval(variable)" which can allow an attacker to run arbitrary code inside your process.
|
|
167
|
+
"security/detect-eval-with-expression": "warn",
|
|
168
|
+
// not-auto-fixable: This rule ensures that you are calling escape function before location.href assignment.
|
|
169
|
+
"xss/no-location-href-assign": ["error", { escapeFunc: "sanitize" }],
|
|
151
170
|
},
|
|
152
171
|
};
|
package/initializers.d.ts
CHANGED
|
@@ -48,13 +48,8 @@ type GlobalPropsType = {
|
|
|
48
48
|
[key: string]: any;
|
|
49
49
|
};
|
|
50
50
|
authenticated: boolean;
|
|
51
|
-
neetoApps: {
|
|
52
|
-
name: string;
|
|
53
|
-
description: string;
|
|
54
|
-
url: string;
|
|
55
|
-
}[];
|
|
56
|
-
isOwner: boolean;
|
|
57
51
|
permissions: string[];
|
|
52
|
+
endUserUploadedFileSizeLimitInMb: number;
|
|
58
53
|
[key: string]: any;
|
|
59
54
|
};
|
|
60
55
|
export default function initializeApplication(configurations: Configurations): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-commons-frontend",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.31",
|
|
4
4
|
"description": "A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.",
|
|
5
5
|
"repository": "git@github.com:bigbinary/neeto-commons-frontend.git",
|
|
6
6
|
"author": "Amaljith K <amaljith.k@bigbinary.com>",
|
|
@@ -119,6 +119,7 @@
|
|
|
119
119
|
"babel-plugin-istanbul": "^6.1.1",
|
|
120
120
|
"babel-plugin-js-logger": "1.0.17",
|
|
121
121
|
"babel-plugin-macros": "3.1.0",
|
|
122
|
+
"babel-plugin-preval": "^5.1.0",
|
|
122
123
|
"babel-plugin-transform-react-remove-prop-types": "0.4.24",
|
|
123
124
|
"babel-preset-react": "6.24.1",
|
|
124
125
|
"babel-preset-typescript": "^7.0.0-alpha.19",
|
|
@@ -136,7 +137,10 @@
|
|
|
136
137
|
"eslint-plugin-promise": "6.0.0",
|
|
137
138
|
"eslint-plugin-react": "7.29.4",
|
|
138
139
|
"eslint-plugin-react-hooks": "4.5.0",
|
|
140
|
+
"eslint-plugin-security": "^1.7.1",
|
|
141
|
+
"eslint-plugin-sonarjs": "^0.21.0",
|
|
139
142
|
"eslint-plugin-unused-imports": "2.0.0",
|
|
143
|
+
"eslint-plugin-xss": "^0.1.12",
|
|
140
144
|
"formik": "^2.2.9",
|
|
141
145
|
"husky": "^7.0.4",
|
|
142
146
|
"i18next": "22.5.1",
|