@unitedstatespowersquadrons/components 1.0.0 → 1.0.2
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/Colors.tsx +2 -2
- package/Toasts/Toast.tsx +2 -2
- package/eslint.config.mjs +43 -0
- package/package.json +3 -1
package/Colors.tsx
CHANGED
package/Toasts/Toast.tsx
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import classNames from "classnames";
|
|
3
3
|
import { createUseStyles } from "react-jss";
|
|
4
|
-
import FontAwesomeIcon from "../FontAwesomeIcon";
|
|
5
4
|
import { DismissFunc, ToastProps, ToastRemoveAppAction, Toast_Status } from "./types";
|
|
6
|
-
import { DispatchFunc } from "../types";
|
|
7
5
|
import createDismissToast from "./createDismissToast";
|
|
6
|
+
import FontAwesomeIcon from "../FontAwesomeIcon";
|
|
7
|
+
import { DispatchFunc } from "../types";
|
|
8
8
|
|
|
9
9
|
interface BaseProps {
|
|
10
10
|
toast: ToastProps;
|
package/eslint.config.mjs
CHANGED
|
@@ -3,6 +3,8 @@ import eslint from "@eslint/js";
|
|
|
3
3
|
import stylisticJs from "@stylistic/eslint-plugin";
|
|
4
4
|
import react from "eslint-plugin-react";
|
|
5
5
|
import reactHooks from "eslint-plugin-react-hooks";
|
|
6
|
+
import importPlugin from "eslint-plugin-import";
|
|
7
|
+
import importNewlines from "eslint-plugin-import-newlines";
|
|
6
8
|
import tseslint from "typescript-eslint";
|
|
7
9
|
|
|
8
10
|
export default tseslint.config(
|
|
@@ -143,6 +145,20 @@ export default tseslint.config(
|
|
|
143
145
|
"stylistic/no-extra-semi": "error",
|
|
144
146
|
"stylistic/semi": ["error", "always"],
|
|
145
147
|
"stylistic/no-multiple-empty-lines": "error",
|
|
148
|
+
"stylistic/array-element-newline": [
|
|
149
|
+
"error",
|
|
150
|
+
{
|
|
151
|
+
"ArrayExpression": "consistent",
|
|
152
|
+
"ArrayPattern": { "minItems": 3 },
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
"stylistic/object-property-newline": [
|
|
156
|
+
"error",
|
|
157
|
+
{
|
|
158
|
+
// "ArrayExpression": "consistent",
|
|
159
|
+
"allowAllPropertiesOnSameLine": true,
|
|
160
|
+
}
|
|
161
|
+
],
|
|
146
162
|
|
|
147
163
|
"react/display-name": "error",
|
|
148
164
|
"react/jsx-boolean-value": ["error", "always"],
|
|
@@ -180,6 +196,31 @@ export default tseslint.config(
|
|
|
180
196
|
|
|
181
197
|
"react-hooks/exhaustive-deps": "error",
|
|
182
198
|
"react-hooks/rules-of-hooks": "error",
|
|
199
|
+
|
|
200
|
+
"import/order": [
|
|
201
|
+
"error",
|
|
202
|
+
{
|
|
203
|
+
"groups": [
|
|
204
|
+
"builtin",
|
|
205
|
+
"external", // "package"
|
|
206
|
+
"object",
|
|
207
|
+
"internal",
|
|
208
|
+
"index", // "./"
|
|
209
|
+
"sibling", // "./directory"
|
|
210
|
+
"parent", // "../directory"
|
|
211
|
+
// Then the omitted imports: type, unknown
|
|
212
|
+
],
|
|
213
|
+
}
|
|
214
|
+
],
|
|
215
|
+
|
|
216
|
+
"import-newlines/enforce": [
|
|
217
|
+
"error",
|
|
218
|
+
{
|
|
219
|
+
"items": 5,
|
|
220
|
+
"max-len": 120,
|
|
221
|
+
"semi": false
|
|
222
|
+
}
|
|
223
|
+
],
|
|
183
224
|
},
|
|
184
225
|
settings: {
|
|
185
226
|
react: {
|
|
@@ -207,6 +248,8 @@ export default tseslint.config(
|
|
|
207
248
|
"stylistic": stylisticJs,
|
|
208
249
|
"react": react,
|
|
209
250
|
"react-hooks": reactHooks,
|
|
251
|
+
"import": importPlugin,
|
|
252
|
+
"import-newlines": importNewlines,
|
|
210
253
|
},
|
|
211
254
|
},
|
|
212
255
|
);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unitedstatespowersquadrons/components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "USPS shared React components library",
|
|
5
5
|
"main": "index.tsx",
|
|
6
6
|
"scripts": {
|
|
@@ -26,6 +26,8 @@
|
|
|
26
26
|
"@stylistic/eslint-plugin": "^5.1.0",
|
|
27
27
|
"@types/react": "^19.1.8",
|
|
28
28
|
"eslint": "^9.30.1",
|
|
29
|
+
"eslint-plugin-import": "^2.32.0",
|
|
30
|
+
"eslint-plugin-import-newlines": "^1.4.0",
|
|
29
31
|
"eslint-plugin-react": "^7.37.5",
|
|
30
32
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
31
33
|
"typescript-eslint": "^8.36.0"
|