Skip to content

Commit

Permalink
Merge pull request #166 from brainstormforce/dev
Browse files Browse the repository at this point in the history
v1.1.0
  • Loading branch information
vrundakansara authored Nov 6, 2024
2 parents 1b9d4f0 + 90ee690 commit 2250c2e
Show file tree
Hide file tree
Showing 269 changed files with 15,408 additions and 27,911 deletions.
13 changes: 12 additions & 1 deletion .eslintrc.js → .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module.exports = {
extends: [
'plugin:@wordpress/eslint-plugin/recommended-with-formatting',
'plugin:storybook/recommended',
'plugin:@typescript-eslint/recommended',
],
settings: {
'import/resolver': {
Expand All @@ -17,7 +18,7 @@ module.exports = {
['@/utilities', './src/utilities'],
['@', './src'],
],
extensions: ['.js', '.jsx'],
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
Expand All @@ -27,12 +28,22 @@ module.exports = {
presets: ['@wordpress/babel-preset-default'],
},
},
overrides: [
{
files: ['./src/utilities/withTW.js'],
rules: {
'@typescript-eslint/no-var-requires': 'off',
},
},
],
rules: {
'jsx-a11y/click-events-have-key-events': 'off',
'react-hooks/exhaustive-deps': 'off',
'jsx-a11y/label-has-associated-control': 'off',
'jsx-a11y/no-noninteractive-element-interactions': 'off',
'jsx-a11y/anchor-is-valid': 'off',

'no-mixed-spaces-and-tabs': 'off',
},
globals: {
localStorage: 'readonly',
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ dist/*
.DS_Store
*storybook.log
storybook-static/*
*.zip
*.zip
*.app.tsbuildinfo
*.node.tsbuildinfo
4 changes: 2 additions & 2 deletions .prettierrc.js → .prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Import the default config file and expose it in the project root.
// Useful for editor integrations.

const config = require('@wordpress/prettier-config');
import config from '@wordpress/prettier-config';

config.overrides = [
{
Expand All @@ -13,4 +13,4 @@ config.overrides = [
},
];

module.exports = config;
export default config;
41 changes: 0 additions & 41 deletions .storybook/main.js

This file was deleted.

62 changes: 62 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import type { StorybookConfig } from '@storybook/react-vite';
import path from 'path';

/** @type { import('@storybook/react-webpack5').StorybookConfig } */
const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
addons: [
'@storybook/addon-onboarding',
'@storybook/addon-links',
'@storybook/addon-essentials',
'@chromatic-com/storybook',
'@storybook/addon-interactions',
],
framework: {
name: '@storybook/react-vite',
options: {
builder: {
viteConfigPath: path.resolve(__dirname, '..', 'vite.config.ts'),
},
},
},
core: {
builder: '@storybook/builder-vite',
},
viteFinal: async (config) => {
// Merge custom configuration into the default config
const { mergeConfig } = await import('vite');

return mergeConfig(config, {
optimizeDeps: {
include: [
'storybook-dark-mode',
'storybook-addon-interactions',
],
},
resolve: {
...config.resolve,
alias: {
...config.resolve?.alias,
// 👇 Internal modules
'@/icons': path.resolve(
__dirname,
'..',
'src/ui/icons.jsx'
),
'@/utilities': path.resolve(
__dirname,
'..',
'src/utilities'
),
'@/components': path.resolve(
__dirname,
'..',
'src/components'
),
'@': path.resolve(__dirname, '..', 'src'),
},
},
});
},
};
export default config;
7 changes: 5 additions & 2 deletions .storybook/preview.js → .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import React from 'react';
import type { Preview } from '@storybook/react';

/** @type { import('@storybook/react').Preview } */
import '../dist/force-ui.css';
const preview = {
import '../dist/style.css';
const preview: Preview = {
parameters: {
controls: {
matchers: {
Expand Down
22 changes: 0 additions & 22 deletions .stylelintrc

This file was deleted.

51 changes: 51 additions & 0 deletions .stylelintrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
export default {
extends: ['@wordpress/stylelint-config'],
rules: {
'font-family-name-quotes': 'always-where-recommended',
'function-url-quotes': 'always',
'declaration-property-unit-allowed-list': {
'/^line-height/': ['em', 'rem', 'px'],
},
'comment-empty-line-before': null,
'selector-class-pattern': null,
'selector-id-pattern': null,
'no-descending-specificity': null,
'no-duplicate-selectors': null,
'at-rule-no-unknown': null,
'at-rule-empty-line-before': null,
'at-rule-empty-line-before': [
'always',
{
except: ['blockless-after-same-name-blockless', 'first-nested'],
ignore: ['after-comment'],
},
],
'block-no-empty': true,
'no-empty-source': true,
'declaration-empty-line-before': [
'always',
{
except: ['after-declaration', 'first-nested'],
ignore: ['after-comment', 'inside-single-line-block'],
},
],
'rule-empty-line-before': [
'always-multi-line',
{
except: ['first-nested'],
ignore: ['after-comment'],
},
],
},
overrides: [
{
files: ['*.scss', '**/*.scss'],
extends: '@wordpress/stylelint-config/scss-stylistic',
},
{
files: ['*.css', '**/*.css'],
extends: '@wordpress/stylelint-config/stylistic',
},
],
customSyntax: 'postcss-scss',
};
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### Getting Started
## Getting Started

Learn how to use @bsf/force-ui components to quickly and easily create elegant and flexible pages using Tailwind CSS.

Expand Down
3 changes: 0 additions & 3 deletions babel.config.js

This file was deleted.

2 changes: 2 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"compilerOptions": {
"jsx": "react",
"baseUrl": "./",
"paths": {
"@/components/*": ["src/components/*"],
"@/components": ["src/components"],
"@/utilities/*": ["src/utilities/*"],
"@/icons": ["src/ui/icons"],
"@/*": ["src/*"],
Expand Down
Loading

0 comments on commit 2250c2e

Please sign in to comment.