Skip to content

Commit 0414086

Browse files
authored
Merge branch 'master' into add/status/colors
2 parents f095a04 + 0912244 commit 0414086

File tree

21 files changed

+2043
-1188
lines changed

21 files changed

+2043
-1188
lines changed

.eslintignore

Lines changed: 0 additions & 13 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/slack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,4 @@ jobs:
3838
token: ${{ secrets.SLACK_BOT_TOKEN }}
3939
payload: |
4040
channel: C019426UBNY
41-
text: ":new: Good first issue up for grabs: <${{ github.event.issue.title }}|${{ github.event.issue.html_url }}>"
41+
text: ":new: Good first issue up for grabs: <${{ github.event.issue.html_url }}|${{ github.event.issue.title }}>"

CONTRIBUTING.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,43 @@ Run the following command before commiting the changes:
129129
make lint
130130
```
131131

132+
# Project Directory Structure
133+
134+
## Overview of `/src` Directory
135+
136+
### actors
137+
138+
### assets
139+
140+
- Assets are the files that are used in the project. These files can be images, videos, logos or fonts etc. The assets directory is used to store all the assets that are used in the project.
141+
142+
### base
143+
144+
- Base directory contains all the basic components that are used in the project. These components are the building blocks of the project. The base directory contains the following subdirectories like `Buttons`, `Forms`, `Typography` etc.
145+
146+
### constants
147+
148+
- Constants directory contains all the constants that are used in the project. These constants can be colors, fonts, breakpoints etc.
149+
150+
### custom
151+
152+
- Custom directory contains all the custom components using the theme colors.
153+
154+
### icons
155+
156+
- Icons directory contains all the icons that are used in the project or can be used in any of other projects.
157+
158+
### theme
159+
160+
- Theme directory contains all the theme related files. The theme directory contains the following subdirectories like:
161+
- `Colors`- contains all the colors that are used in the project or theme components.
162+
- `components` - contains all the theme components like `Button`,
163+
- `Typography` with brand colors.
164+
- [`typography.ts`](https://github.com/layer5io/sistent/blob/master/src/theme/typography.ts) - contains all the typography related files like `font-size`, `font-family` etc.
165+
- [`palette.ts`](https://github.com/layer5io/sistent/blob/master/src/theme/palette.ts) - contains all the tokens that are used in the project and used in components.
166+
167+
Through the theme directory, we export the SistentThemeProvider which is used to provide the theme to the project.
168+
132169
# <a name="maintaining"> Reviews</a>
133170

134171
All contributors are invited to review pull requests. See this short video on [how to review a pull request](https://www.youtube.com/watch?v=isLfo7jfE6g&feature=youtu.be).

eslint.config.js

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
const { FlatCompat } = require("@eslint/eslintrc");
2+
const js = require("@eslint/js");
3+
const tsParser = require("@typescript-eslint/parser");
4+
const react = require("eslint-plugin-react");
5+
const reactHooks = require("eslint-plugin-react-hooks");
6+
const typescript = require("@typescript-eslint/eslint-plugin");
7+
const storybook = require("eslint-plugin-storybook");
8+
const globals = require("globals");
9+
10+
const compat = new FlatCompat({
11+
baseDirectory: __dirname,
12+
recommendedConfig: js.configs.recommended,
13+
allConfig: js.configs.all
14+
});
15+
16+
module.exports = [
17+
// Global ignores
18+
{
19+
ignores: [
20+
"**/node_modules/**",
21+
"**/dist/**",
22+
"**/*.md",
23+
"**/jest.config.js",
24+
"**/vite.config.ts",
25+
"**/.eslintrc.cjs",
26+
"**/site/**",
27+
"apps/next-12/**",
28+
"**/.yarnrc.yml",
29+
"**/.eslintrc.*js",
30+
"**/*.config.*js",
31+
"**/eslint-config-sistent/**",
32+
"apps/design-system/**",
33+
"examples/**",
34+
"**/build/**",
35+
"**/coverage/**",
36+
]
37+
},
38+
39+
// Test files configuration
40+
{
41+
files: ["**/*.test.{js,jsx,ts,tsx}", "**/__tests__/**/*.{js,jsx,ts,tsx}"],
42+
43+
languageOptions: {
44+
globals: {
45+
...globals.browser,
46+
...globals.node,
47+
...globals.jest,
48+
React: "readonly",
49+
JSX: "readonly",
50+
NodeJS: "readonly",
51+
},
52+
parser: tsParser,
53+
ecmaVersion: "latest",
54+
sourceType: "module",
55+
parserOptions: {
56+
requireConfigFile: false,
57+
ecmaFeatures: {
58+
jsx: true,
59+
},
60+
},
61+
},
62+
63+
plugins: {
64+
react,
65+
"react-hooks": reactHooks,
66+
"@typescript-eslint": typescript,
67+
storybook,
68+
},
69+
70+
rules: {
71+
// ESLint recommended rules
72+
...js.configs.recommended.rules,
73+
74+
// TypeScript recommended rules
75+
...typescript.configs.recommended.rules,
76+
77+
// React hooks recommended rules
78+
...reactHooks.configs.recommended.rules,
79+
80+
// Storybook recommended rules
81+
...storybook.configs.recommended.rules,
82+
},
83+
84+
settings: {
85+
react: {
86+
version: "detect",
87+
},
88+
},
89+
90+
linterOptions: {
91+
reportUnusedDisableDirectives: true,
92+
},
93+
},
94+
95+
// Main configuration - matches old .eslintrc.js
96+
{
97+
files: ["**/*.{js,jsx,ts,tsx}"],
98+
ignores: ["**/*.test.{js,jsx,ts,tsx}", "**/__tests__/**/*.{js,jsx,ts,tsx}"],
99+
100+
languageOptions: {
101+
globals: {
102+
...globals.browser,
103+
...globals.node,
104+
React: "readonly",
105+
JSX: "readonly",
106+
NodeJS: "readonly",
107+
},
108+
parser: tsParser,
109+
ecmaVersion: "latest",
110+
sourceType: "module",
111+
parserOptions: {
112+
requireConfigFile: false,
113+
ecmaFeatures: {
114+
jsx: true,
115+
},
116+
},
117+
},
118+
119+
plugins: {
120+
react,
121+
"react-hooks": reactHooks,
122+
"@typescript-eslint": typescript,
123+
storybook,
124+
},
125+
126+
rules: {
127+
// ESLint recommended rules
128+
...js.configs.recommended.rules,
129+
130+
// TypeScript recommended rules
131+
...typescript.configs.recommended.rules,
132+
133+
// React hooks recommended rules
134+
...reactHooks.configs.recommended.rules,
135+
136+
// Storybook recommended rules
137+
...storybook.configs.recommended.rules,
138+
},
139+
140+
settings: {
141+
react: {
142+
version: "detect",
143+
},
144+
},
145+
146+
linterOptions: {
147+
reportUnusedDisableDirectives: true,
148+
},
149+
}
150+
];

0 commit comments

Comments
 (0)