From bf397fed2aba00e1e654356b37227dd4dbd5189a Mon Sep 17 00:00:00 2001 From: Antonette Caldwell Date: Tue, 5 Sep 2023 12:30:34 -0500 Subject: [PATCH] chore: formatted svg files, added eslint config as there is one missing Signed-off-by: Antonette Caldwell --- packages/svg/.eslintrc.js | 20 ++++ packages/svg/package.json | 9 +- packages/svg/src/icons/Add/AddIcon.tsx | 13 +-- .../src/icons/Add/AddIconCircleBordered.tsx | 13 +-- .../src/icons/Application/ApplicationIcon.tsx | 12 +-- .../Application/KeppelApplicationIcon.tsx | 20 ++-- .../Application/OutlinedApplicationIcon.tsx | 20 ++-- packages/svg/src/icons/Bell/BellIcon.tsx | 12 +-- packages/svg/src/icons/Bus/BusIcon.tsx | 12 +-- packages/svg/src/icons/Chat/ChatIcon.tsx | 12 +-- packages/svg/src/icons/Circle/CircleIcon.tsx | 13 +-- .../src/icons/Circle/OutlinedCircleIcon.tsx | 22 +++-- packages/svg/src/icons/Clone/CloneIcon.tsx | 12 +-- .../svg/src/icons/Cloud/CloudSavedIcon.tsx | 12 +-- .../svg/src/icons/Component/ComponentIcon.tsx | 12 +-- packages/svg/src/icons/Copy/CopyLinkIcon.tsx | 12 +-- .../svg/src/icons/CreateNew/CreateNewIcon.tsx | 12 +-- packages/svg/src/icons/FilledCircleIcon.tsx | 13 +-- .../icons/Rectangle/KeppelRectangleIcon.tsx | 13 +-- .../icons/Rectangle/OutlinedRectangleIcon.tsx | 22 +++-- .../svg/src/icons/Rectangle/RectangleIcon.tsx | 12 +-- .../KeppelTallRoundedRectangleIcon.tsx | 13 +-- .../OutlinedTallRoundedRectangleIcon.tsx | 22 +++-- .../TallRoundedRectangleIcon.tsx | 13 +-- yarn.lock | 93 +++++++++++++++++++ 25 files changed, 264 insertions(+), 175 deletions(-) create mode 100644 packages/svg/.eslintrc.js diff --git a/packages/svg/.eslintrc.js b/packages/svg/.eslintrc.js new file mode 100644 index 00000000..d9dc2221 --- /dev/null +++ b/packages/svg/.eslintrc.js @@ -0,0 +1,20 @@ +module.exports = { + "env": { + "browser": true, + "es2021": true + }, + "extends": [ + "standard-with-typescript", + "plugin:react/recommended" + ], + "parserOptions": { + "ecmaVersion": "latest", + "sourceType": "module" + }, + "plugins": [ + "react" + ], + "rules": { + 'react/react-in-jsx-scope': 0 + } +} diff --git a/packages/svg/package.json b/packages/svg/package.json index ba44b173..e3716514 100644 --- a/packages/svg/package.json +++ b/packages/svg/package.json @@ -22,13 +22,20 @@ "@types/jest": "^29.5.4", "@types/react": "^18.2.20", "@types/react-dom": "^18.2.7", + "@typescript-eslint/eslint-plugin": "^6.4.0", + "eslint": "^8.0.1", + "eslint-config-standard-with-typescript": "^39.0.0", + "eslint-plugin-import": "^2.25.2", + "eslint-plugin-n": "^15.0.0 || ^16.0.0 ", + "eslint-plugin-promise": "^6.0.0", + "eslint-plugin-react": "^7.33.2", "jest": "^29.6.4", "jest-environment-jsdom": "^29.6.4", "react": "^18.2.0", "react-dom": "^18.2.0", "ts-jest": "^29.1.1", "tsup": "^7.2.0", - "typescript": "^5.1.6" + "typescript": "*" }, "publishConfig": { "access": "public" diff --git a/packages/svg/src/icons/Add/AddIcon.tsx b/packages/svg/src/icons/Add/AddIcon.tsx index 0e4d5b4d..f2aae1e3 100644 --- a/packages/svg/src/icons/Add/AddIcon.tsx +++ b/packages/svg/src/icons/Add/AddIcon.tsx @@ -1,13 +1,10 @@ -import { FC } from 'react'; +import { type FC } from 'react'; import { DEFAULT_FILL_NONE, DEFAULT_HEIGHT, DEFAULT_WIDTH } from '../../constants/constants'; -import { IconProps } from '../types'; +import { type IconProps } from '../types'; -export const AddIcon: FC = ({ - width = DEFAULT_WIDTH, - height = DEFAULT_HEIGHT, - fill = DEFAULT_FILL_NONE, - ...props -}) => { +export const AddIcon: FC = ( + { width = DEFAULT_WIDTH, height = DEFAULT_HEIGHT, fill = DEFAULT_FILL_NONE, ...props } +) => { return ( = ({ - width = DEFAULT_WIDTH, - height = DEFAULT_HEIGHT, - fill = DEFAULT_FILL_NONE, - ...props -}) => { +export const AddIconCircleBordered: FC = ( + { width = DEFAULT_WIDTH, height = DEFAULT_HEIGHT, fill = DEFAULT_FILL_NONE, ...props } +) => { return ( = ({ - width = DEFAULT_WIDTH, - height = DEFAULT_HEIGHT, - ...props -}) => { +const ApplicationIcon: FC = ( + { width = DEFAULT_WIDTH, height = DEFAULT_HEIGHT, ...props } +) => { return ( = ({ - width = DEFAULT_WIDTH, - height = DEFAULT_HEIGHT, - primaryFill = KEPPEL_GREEN_FILL, - secondaryFill = CARIBBEAN_GREEN_FILL, - ...props -}) => { +export const KeppelApplicationIcon: FC = ( + { + width = DEFAULT_WIDTH, + height = DEFAULT_HEIGHT, + primaryFill = KEPPEL_GREEN_FILL, + secondaryFill = CARIBBEAN_GREEN_FILL, + ...props + } +) => { return ( = ({ - width = DEFAULT_WIDTH, - height = DEFAULT_HEIGHT, - fill = DEFAULT_FILL_NONE, - stroke = DEFAULT_STROKE, - ...props -}) => { +export const OutlinedApplicationIcon: FC = ( + { + width = DEFAULT_WIDTH, + height = DEFAULT_HEIGHT, + fill = DEFAULT_FILL_NONE, + stroke = DEFAULT_STROKE, + ...props + } +) => { return ( = ({ - width = DEFAULT_WIDTH, - height = DEFAULT_HEIGHT, - ...props -}) => { +export const BellIcon: FC = ( + { width = DEFAULT_WIDTH, height = DEFAULT_HEIGHT, ...props } +) => { return ( = ({ - width = DEFAULT_WIDTH, - height = DEFAULT_HEIGHT, - ...props -}) => { +export const BusIcon: FC = ( + { width = DEFAULT_WIDTH, height = DEFAULT_HEIGHT, ...props } +) => { return ( = ({ - width = DEFAULT_WIDTH, - height = DEFAULT_HEIGHT, - ...props -}) => { +export const ChatIcon: FC = ( + { width = DEFAULT_WIDTH, height = DEFAULT_HEIGHT, ...props } +) => { return ( = ({ - width = DEFAULT_WIDTH, - height = DEFAULT_HEIGHT, - fill = DEFAULT_FILL, - ...props -}) => { +export const CircleIcon: FC = ( + { width = DEFAULT_WIDTH, height = DEFAULT_HEIGHT, fill = DEFAULT_FILL, ...props } +) => { return ( = ({ - width = DEFAULT_WIDTH, - height = DEFAULT_HEIGHT, - fill = DEFAULT_FILL_NONE, - stroke = DEFAULT_STROKE, - strokeWidth = DEFAULT_STROKE_WIDTH, - ...props -}) => { +export const OutlinedCircleIcon: FC = ( + { + width = DEFAULT_WIDTH, + height = DEFAULT_HEIGHT, + fill = DEFAULT_FILL_NONE, + stroke = DEFAULT_STROKE, + strokeWidth = DEFAULT_STROKE_WIDTH, + ...props + } +) => { return ( = ({ - width = DEFAULT_WIDTH, - height = DEFAULT_HEIGHT, - ...props -}) => { +export const CloneIcon: FC = ( + { width = DEFAULT_WIDTH, height = DEFAULT_HEIGHT, ...props } +) => { return ( = ({ - width = DEFAULT_WIDTH, - height = DEFAULT_HEIGHT, - ...props -}) => { +export const CloudSavedIcon: FC = ( + { width = DEFAULT_WIDTH, height = DEFAULT_HEIGHT, ...props } +) => { return ( = ({ - width = DEFAULT_WIDTH, - height = DEFAULT_HEIGHT, - ...props -}) => { +export const ComponentIcon: FC = ( + { width = DEFAULT_WIDTH, height = DEFAULT_HEIGHT, ...props } +) => { return ( = ({ - width = DEFAULT_WIDTH, - height = DEFAULT_HEIGHT, - ...props -}) => { +export const CopyLinkIcon: FC = ( + { width = DEFAULT_WIDTH, height = DEFAULT_HEIGHT, ...props } +) => { return ( = ({ - width = DEFAULT_WIDTH, - height = DEFAULT_HEIGHT, - ...props -}) => { +export const CreateNewIcon: FC = ( + { width = DEFAULT_WIDTH, height = DEFAULT_HEIGHT, ...props } +) => { return ( = ({ - width, - height, - fill = 'currentColor', - ...props -}) => { +export const FilledCircleIcon: FC = ( + { width, height, fill = 'currentColor', ...props } +) => { return ( = ({ - width = DEFAULT_WIDTH, - height = DEFAULT_HEIGHT, - primaryFill = KEPPEL_GREEN_FILL, - ...props -}) => { +export const KeppelRectangleIcon: FC = ( + { width = DEFAULT_WIDTH, height = DEFAULT_HEIGHT, primaryFill = KEPPEL_GREEN_FILL, ...props } +) => { return ( = ({ - width = DEFAULT_WIDTH, - height = DEFAULT_HEIGHT, - stroke = DEFAULT_STROKE, - strokeWidth = DEFAULT_STROKE_WIDTH, - fill = DEFAULT_FILL_NONE, - ...props -}) => { +export const OutlinedRectangleIcon: FC = ( + { + width = DEFAULT_WIDTH, + height = DEFAULT_HEIGHT, + stroke = DEFAULT_STROKE, + strokeWidth = DEFAULT_STROKE_WIDTH, + fill = DEFAULT_FILL_NONE, + ...props + } +) => { return ( = ({ - width = DEFAULT_WIDTH, - height = DEFAULT_HEIGHT, - ...props -}) => { +export const RectangleIcon: FC = ( + { width = DEFAULT_WIDTH, height = DEFAULT_HEIGHT, ...props } +) => { return ( = ({ - width = DEFAULT_WIDTH, - height = DEFAULT_HEIGHT, - primaryFill = KEPPEL_GREEN_FILL, - ...props -}) => { +export const KeppelTallRoundedRectangleIcon: FC = ( + { width = DEFAULT_WIDTH, height = DEFAULT_HEIGHT, primaryFill = KEPPEL_GREEN_FILL, ...props } +) => { return ( = ({ - width = DEFAULT_WIDTH, - height = DEFAULT_HEIGHT, - stroke = DEFAULT_STROKE, - strokeWidth = DEFAULT_STROKE_WIDTH, - fill = DEFAULT_FILL_NONE, - ...props -}) => { +export const OutlinedTallRoundedRectangleIcon: FC = ( + { + width = DEFAULT_WIDTH, + height = DEFAULT_HEIGHT, + stroke = DEFAULT_STROKE, + strokeWidth = DEFAULT_STROKE_WIDTH, + fill = DEFAULT_FILL_NONE, + ...props + } +) => { return ( = ({ - width = DEFAULT_WIDTH, - height = DEFAULT_HEIGHT, - fill = DEFAULT_FILL, - ...props -}) => { +export const TallRoundedRectangleIcon: FC = ( + { width = DEFAULT_WIDTH, height = DEFAULT_HEIGHT, fill = DEFAULT_FILL, ...props } +) => { return (