diff --git a/.prettierignore b/.prettierignore
index 7773828..446c8cd 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -1 +1,2 @@
-dist/
\ No newline at end of file
+dist/
+cunningham-tokens.*
diff --git a/README.md b/README.md
index b79dd0f..2674bfe 100644
--- a/README.md
+++ b/README.md
@@ -10,11 +10,12 @@
📚 Documentation •
🖌️ Figma
+
- **Atomic**: We follow [atomic design principles](https://bradfrost.com/blog/post/atomic-web-design/).
- **Modular and Reusable**: Each component is designed to be self-contained and reusable across different projects, promoting consistency and saving development time.
-- **Accessibility-focused**: Our components prioritize accessibility standards, making them usable and inclusive for all users.
+- **Accessibility-focused**: Our components prioritize accessibility standards, making them usable and inclusive for all users.
- **Design tokens based**: We use [design tokens](https://openfun.github.io/cunningham/?path=/docs/getting-started-customization--docs#what-are-design-tokens-) to ensure consistency between design and code and allow high customization.
- **React** based: at the moment we only support React, but we are open to other frameworks, feel free to [contribute](./CONTRIBUTING.md) !
@@ -46,11 +47,12 @@ yarn add @openfun/cunningham-react
```
➡️ Then, add this script to your `package.json` file
+
```json
{
- "scripts": {
- "build-theme": "cunningham -g css -o src"
- },
+ "scripts": {
+ "build-theme": "cunningham -g css -o src"
+ }
}
```
@@ -79,7 +81,6 @@ To ensure everything works well, let's test rendering a component, such as the [
Now please see the [documentation](https://openfun.github.io/cunningham) 📚 to learn more about customization, typography, spacings and available components!
-
## Contributors
diff --git a/apps/demo/.eslintrc.json b/apps/demo/.eslintrc.json
index 96c1160..4a5f23e 100644
--- a/apps/demo/.eslintrc.json
+++ b/apps/demo/.eslintrc.json
@@ -1,9 +1,7 @@
{
"root": true,
- "extends": [
- "custom"
- ],
+ "extends": ["custom"],
"parserOptions": {
"project": "./tsconfig.eslint.json"
}
-}
\ No newline at end of file
+}
diff --git a/apps/demo/tsconfig.eslint.json b/apps/demo/tsconfig.eslint.json
index 824f560..d725a3a 100644
--- a/apps/demo/tsconfig.eslint.json
+++ b/apps/demo/tsconfig.eslint.json
@@ -1,8 +1,5 @@
{
"extends": "./tsconfig.json",
"exclude": [],
- "include": [
- "**/*.ts",
- "**/*.tsx"
- ]
-}
\ No newline at end of file
+ "include": ["**/*.ts", "**/*.tsx"]
+}
diff --git a/apps/demo/tsconfig.json b/apps/demo/tsconfig.json
index 88c9b8c..8db580b 100644
--- a/apps/demo/tsconfig.json
+++ b/apps/demo/tsconfig.json
@@ -1,9 +1,9 @@
{
"extends": "@openfun/typescript-configs/react.json",
"compilerOptions": {
- "noEmit": true,
+ "noEmit": true
},
"include": ["src"],
- "exclude": ["node_modules","dist"],
+ "exclude": ["node_modules", "dist"],
"references": [{ "path": "./tsconfig.node.json" }]
}
diff --git a/apps/demo/tsconfig.node.json b/apps/demo/tsconfig.node.json
index b8afcc8..9d31e2a 100644
--- a/apps/demo/tsconfig.node.json
+++ b/apps/demo/tsconfig.node.json
@@ -5,7 +5,5 @@
"moduleResolution": "Node",
"allowSyntheticDefaultImports": true
},
- "include": [
- "vite.config.ts"
- ]
+ "include": ["vite.config.ts"]
}
diff --git a/package.json b/package.json
index 6c9e857..1f17a03 100644
--- a/package.json
+++ b/package.json
@@ -13,7 +13,7 @@
"test-ci": "turbo run test-ci",
"lint": "turbo run lint",
"deploy": "turbo run deploy",
- "format": "prettier --write \"**/*.{ts,tsx,md}\""
+ "format": "prettier --write \"**/*.{ts,tsx,md,json,cjs,js}\""
},
"devDependencies": {
"cross-env": "7.0.3",
diff --git a/packages/eslint-config-custom/.eslintrc.json b/packages/eslint-config-custom/.eslintrc.json
index 6c2125a..c8f9243 100644
--- a/packages/eslint-config-custom/.eslintrc.json
+++ b/packages/eslint-config-custom/.eslintrc.json
@@ -29,7 +29,10 @@
"plugins": ["formatjs", "@typescript-eslint", "import"],
/* Disable some rules to be iso with tslint which was previously used */
"rules": {
- "@typescript-eslint/explicit-member-accessibility": ["error", { "accessibility": "no-public" }],
+ "@typescript-eslint/explicit-member-accessibility": [
+ "error",
+ { "accessibility": "no-public" }
+ ],
"@typescript-eslint/lines-between-class-members": "off",
"@typescript-eslint/no-use-before-define": "off",
"arrow-parens": "error",
@@ -45,7 +48,14 @@
"import/order": [
"error",
{
- "groups": ["builtin", "external", "internal", "parent", "sibling", "index"],
+ "groups": [
+ "builtin",
+ "external",
+ "internal",
+ "parent",
+ "sibling",
+ "index"
+ ],
"alphabetize": { "order": "ignore" }
}
],
@@ -70,7 +80,10 @@
"react/destructuring-assignment": "off",
"react/function-component-definition": [
"error",
- { "namedComponents": "arrow-function", "unnamedComponents": "arrow-function" }
+ {
+ "namedComponents": "arrow-function",
+ "unnamedComponents": "arrow-function"
+ }
],
"react/jsx-boolean-value": "off",
"react/jsx-fragments": "off",
diff --git a/packages/react/.storybook/manager.ts b/packages/react/.storybook/manager.ts
index 5c12990..4d7be41 100644
--- a/packages/react/.storybook/manager.ts
+++ b/packages/react/.storybook/manager.ts
@@ -1,16 +1,15 @@
-import { addons } from '@storybook/manager-api';
-import { create } from '@storybook/theming';
-import { defaultTokens } from '@openfun/cunningham-tokens';
+import { addons } from "@storybook/manager-api";
+import { create } from "@storybook/theming";
+import { defaultTokens } from "@openfun/cunningham-tokens";
const COLORS = defaultTokens.theme.colors;
const theme = create({
- base: 'light',
- brandUrl: 'https://github.com/openfun/cunningham',
- brandImage: 'logo-cunningham.svg',
- brandTitle: 'Cunningham',
- brandTarget: '_self',
-
+ base: "light",
+ brandUrl: "https://github.com/openfun/cunningham",
+ brandImage: "logo-cunningham.svg",
+ brandTitle: "Cunningham",
+ brandTarget: "_self",
//
colorPrimary: COLORS["primary-400"],
diff --git a/packages/react/src/locales/en-US.json b/packages/react/src/locales/en-US.json
index fc676cb..c9291d2 100644
--- a/packages/react/src/locales/en-US.json
+++ b/packages/react/src/locales/en-US.json
@@ -12,7 +12,7 @@
"empty": "This table is empty",
"empty_alt": "Illustration of an empty table",
"loader_aria": "Loading data",
- "rows_selection_aria":"All rows selection",
+ "rows_selection_aria": "All rows selection",
"row_selection_aria": "Row selection"
},
"provider": {
diff --git a/packages/react/tsconfig.eslint.json b/packages/react/tsconfig.eslint.json
index 73f0e5c..75b9e2f 100644
--- a/packages/react/tsconfig.eslint.json
+++ b/packages/react/tsconfig.eslint.json
@@ -1,9 +1,5 @@
{
"extends": "./tsconfig.json",
"exclude": [],
- "include": [
- "**/*.ts",
- "**/*.tsx",
- ".eslintrc.cjs"
- ]
-}
\ No newline at end of file
+ "include": ["**/*.ts", "**/*.tsx", ".eslintrc.cjs"]
+}
diff --git a/packages/react/tsconfig.json b/packages/react/tsconfig.json
index 3bf4baa..5a04f7d 100644
--- a/packages/react/tsconfig.json
+++ b/packages/react/tsconfig.json
@@ -8,6 +8,6 @@
"types": ["vitest/globals", "vite/client"]
},
"include": ["src", "cunningham.ts"],
- "exclude": ["node_modules","dist", "**/tokens.ts", "**/*.stories.tsx"],
+ "exclude": ["node_modules", "dist", "**/tokens.ts", "**/*.stories.tsx"],
"references": [{ "path": "./tsconfig.node.json" }]
}
diff --git a/packages/tokens/src/bin/tsconfig.build.json b/packages/tokens/src/bin/tsconfig.build.json
index c4cfa85..109f243 100644
--- a/packages/tokens/src/bin/tsconfig.build.json
+++ b/packages/tokens/src/bin/tsconfig.build.json
@@ -1,8 +1,4 @@
{
"extends": "./tsconfig.json",
- "exclude": [
- "./__mocks__",
- "./tests",
- "**/*.spec.ts",
- ]
+ "exclude": ["./__mocks__", "./tests", "**/*.spec.ts"]
}
diff --git a/packages/tokens/src/bin/tsconfig.json b/packages/tokens/src/bin/tsconfig.json
index dd90337..7106ff9 100644
--- a/packages/tokens/src/bin/tsconfig.json
+++ b/packages/tokens/src/bin/tsconfig.json
@@ -1,8 +1,6 @@
{
"extends": "@openfun/typescript-configs/node.json",
- "include": [
- "**/*"
- ],
+ "include": ["**/*"],
"compilerOptions": {
"baseUrl": "./",
"paths": {
@@ -10,5 +8,5 @@
},
"resolveJsonModule": true,
"outDir": "../../dist/bin"
- },
+ }
}
diff --git a/packages/tokens/src/lib/tsconfig.json b/packages/tokens/src/lib/tsconfig.json
index 4568d40..e0732c1 100644
--- a/packages/tokens/src/lib/tsconfig.json
+++ b/packages/tokens/src/lib/tsconfig.json
@@ -1,8 +1,6 @@
{
"extends": "@openfun/typescript-configs/node.json",
- "include": [
- "./*"
- ],
+ "include": ["./*"],
"compilerOptions": {
"baseUrl": "./",
"outDir": "../../dist/lib",
diff --git a/packages/tokens/tsconfig.eslint.json b/packages/tokens/tsconfig.eslint.json
index cddd206..e207bbb 100644
--- a/packages/tokens/tsconfig.eslint.json
+++ b/packages/tokens/tsconfig.eslint.json
@@ -1,7 +1,3 @@
{
- "include": [
- "**/*.ts",
- "**/*.js",
- ".eslintrc.cjs"
- ]
-}
\ No newline at end of file
+ "include": ["**/*.ts", "**/*.js", ".eslintrc.cjs"]
+}
diff --git a/packages/tokens/tsconfig.node.json b/packages/tokens/tsconfig.node.json
index 1cbd5f7..d077d3f 100644
--- a/packages/tokens/tsconfig.node.json
+++ b/packages/tokens/tsconfig.node.json
@@ -1,5 +1,3 @@
{
- "include": [
- "./jest.config.ts"
- ]
+ "include": ["./jest.config.ts"]
}
diff --git a/renovate.json b/renovate.json
index 3d7700e..2aab240 100644
--- a/renovate.json
+++ b/renovate.json
@@ -1,11 +1,5 @@
{
- "extends": [
- "github>openfun/renovate-configuration"
- ],
- "ignoreDeps": [
- "chalk", "@storybook/builder-vite"
- ],
- "ignorePaths": [
- "**/node_modules/**"
- ]
+ "extends": ["github>openfun/renovate-configuration"],
+ "ignoreDeps": ["chalk", "@storybook/builder-vite"],
+ "ignorePaths": ["**/node_modules/**"]
}
diff --git a/turbo.json b/turbo.json
index c552bf4..1341f6c 100644
--- a/turbo.json
+++ b/turbo.json
@@ -2,46 +2,26 @@
"$schema": "https://turbo.build/schema.json",
"pipeline": {
"build": {
- "dependsOn": [
- "^build"
- ],
- "outputs": [
- "dist/**"
- ]
+ "dependsOn": ["^build"],
+ "outputs": ["dist/**"]
},
"lint": {
"outputs": []
},
"dev": {
"cache": false,
- "dependsOn": [
- "^dev"
- ]
+ "dependsOn": ["^dev"]
},
"test": {
"outputs": [],
- "inputs": [
- "src/**/*.tsx",
- "src/**/*.ts",
- "test/**/*.ts",
- "test/**/*.tsx"
- ]
+ "inputs": ["src/**/*.tsx", "src/**/*.ts", "test/**/*.ts", "test/**/*.tsx"]
},
"test-ci": {
"outputs": [],
- "inputs": [
- "src/**/*.tsx",
- "src/**/*.ts",
- "test/**/*.ts",
- "test/**/*.tsx"
- ]
+ "inputs": ["src/**/*.tsx", "src/**/*.ts", "test/**/*.ts", "test/**/*.tsx"]
},
"deploy": {
- "dependsOn": [
- "build",
- "test",
- "lint"
- ],
+ "dependsOn": ["build", "test", "lint"],
"outputs": []
},
"@openfun/cunningham-tokens#test": {