Skip to content

Commit

Permalink
fix(eslint and themeprepare): changed eslint rule and themePrapare
Browse files Browse the repository at this point in the history
  • Loading branch information
opensrc0 committed Jan 17, 2024
1 parent 778700c commit ed83dd5
Show file tree
Hide file tree
Showing 19 changed files with 265 additions and 292 deletions.
7 changes: 6 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
"react/jsx-filename-extension": ["error", { "extensions": [".js"] }],
"react/require-default-props": ["off"],
"react/jsx-props-no-spreading": ["off"],
"no-restricted-exports": ["off"]
"no-restricted-exports": ["off"],
"comma-dangle": ["error", "never"],
"quotes": ["error", "double"],
"quote-props": ["error", "always"],
"semi": ["error", "never"]
}
}

8 changes: 4 additions & 4 deletions Init.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import merge from 'lodash.merge';
import defaultTheme from './__appset/universal/theme';
import merge from "lodash.merge"
import defaultTheme from "./__appset/theme"

export default function Init(userTheme) {
const mergeTheme = merge(defaultTheme, userTheme);
const mergeTheme = merge(defaultTheme, userTheme)

return mergeTheme;
return mergeTheme
}
57 changes: 28 additions & 29 deletions __application/utils/constants.js
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
/* eslint-disable */
export const MONTHS_NAME = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
'Jul', 'Aug', 'Sept', 'Oct', 'Nov', 'Dec',
];
export const MONTHS_NAME = ["Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sept", "Oct", "Nov", "Dec"
]

export const timeMap = {
1: '13',
2:'14',
3:'15',
4:'16',
5:'17',
6:'18',
7:'19',
8:'20',
9:'21',
10:'22',
11:'23',
12:'24',
"1": "13",
"2": "14",
"3": "15",
"4": "16",
"5": "17",
"6": "18",
"7": "19",
"8": "20",
"9": "21",
"10": "22",
"11": "23",
"12": "24"
}

// YEAR MAPPING

export const yearMapping = {
1: 'Jan',
2: 'Feb',
3: 'Mar',
4: 'Apr',
5: 'May',
6: 'Jun',
7: 'Jul',
8: 'Aug',
9: 'Sept',
10: 'Oct',
11: 'Nov',
12: 'Dec',
};
"1": "Jan",
"2": "Feb",
"3": "Mar",
"4": "Apr",
"5": "May",
"6": "Jun",
"7": "Jul",
"8": "Aug",
"9": "Sept",
"10": "Oct",
"11": "Nov",
"12": "Dec"
}
25 changes: 13 additions & 12 deletions __appset/configButton.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
/* eslint-disable */
const Button = {
"borderRadius": "50px",
"borderColor": "12px",
"primary": {
"color": "white",
"borderColor": "white"
},
"secondary": {
"color": "white",
"borderColor": "white"
}
"primary": {
"color": "white",
"background": "#03567b",
"borderColor": "white",
"borderRadius": "4px"
},
"secondary": {
"color": "white",
"background": "#03567b",
"borderColor": "white",
"borderRadius": "4px"
}
}

export default Button;
export default Button
41 changes: 20 additions & 21 deletions __appset/configChip.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
/* eslint-disable */
const Button = {
"borderRadius": "50px",
"borderColor": "12px",
"primary": {
"color": "white",
"borderColor": "white"
},
"secondary": {
"color": "white",
"borderColor": "white"
},
"tertiary": {
"color": "white",
"borderColor": "white"
},
"quaternary": {
"color": "white",
"borderColor": "white"
}
const Chip = {
"borderRadius": "50px",
"borderColor": "12px",
"primary": {
"color": "white",
"borderColor": "white"
},
"secondary": {
"color": "white",
"borderColor": "white"
},
"tertiary": {
"color": "white",
"borderColor": "white"
},
"quaternary": {
"color": "white",
"borderColor": "white"
}
}

export default Button;
export default Chip
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable */
const color = {
"primary": "#00364e",
"secondary": "#03567b",
Expand All @@ -13,4 +12,4 @@ const color = {
"orange": "#fc6027"
}

export default color;
export default color
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/* eslint-disable */
const FontFamily = {
"roboto": "Roboto",
"averta": "Averta",
"sans": "Open Sans,sans-serif"
}

export default FontFamily;
export default FontFamily
18 changes: 18 additions & 0 deletions __appset/configFontSize.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
const FontSize = {
"xxxxxl": "48px",
"xxxxl": "32px",
"xxxl": "28px",
"xxl": "24px",
"xl": "20px",
"l": "18px",
"m": "16px",
"md": "15px",
"s": "14px",
"sm": "13px",
"xs": "12px",
"xxs": "11px",
"xxxs": "10px",
"xxxxs": "8px"
}

export default FontSize
8 changes: 8 additions & 0 deletions __appset/configFontWeight.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const FontWeight = {
"normal": "400",
"medium": "500",
"semibold": "600",
"bold": "700"
}

export default FontWeight
3 changes: 1 addition & 2 deletions __appset/configInput.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable */
const Input = {
"borderRadius": "4px",
"primary": {
Expand All @@ -15,4 +14,4 @@ const Input = {
}
}

export default Input;
export default Input
11 changes: 11 additions & 0 deletions __appset/configPXL.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const PXL = {
"pxScale": 8,
"PXL": (value) => {
const values = [].concat(value)
return values
.map((v) => (typeof v === "string" ? v : `${v * 8}px`))
.join(" ")
}
}

export default PXL
21 changes: 21 additions & 0 deletions __appset/theme.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* eslint-disable import/no-anonymous-default-export */
import PXL from "./configPXL"
import Color from "./configColor"
import FontSize from "./configFontSize"
import FontFamily from "./configFontFamily"
import FontWeight from "./configFontWeight"

import Button from "./configButton"
import Input from "./configInput"

export default {
"Universal": {
...PXL,
Color,
FontSize,
FontFamily,
FontWeight
},
Button,
Input
}
Loading

0 comments on commit ed83dd5

Please sign in to comment.