Skip to content

Commit

Permalink
bugfix/pharos-site-development: Wrap component files in fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
satya-achanta-venkata committed May 24, 2024
2 parents d6bd13d + 9331f3a commit 47ca563
Show file tree
Hide file tree
Showing 51 changed files with 2,866 additions and 4,186 deletions.
8 changes: 0 additions & 8 deletions .eslintignore

This file was deleted.

89 changes: 0 additions & 89 deletions .eslintrc.js

This file was deleted.

6 changes: 6 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,10 @@ module.exports = {
singleQuote: true,
arrowParens: 'always',
bracketSpacing: true,
overrides: [
{
files: '*.mdx',
options: { parser: 'mdx' },
},
],
};
20 changes: 15 additions & 5 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import { mergeConfig } from 'vite';
import path from 'path';
import react from '@vitejs/plugin-react';

import path, { dirname, join } from 'path';

const config = {
stories: [],
addons: ['@storybook/addon-a11y', '@storybook/addon-essentials', '@storybook/addon-links'],
features: {
storyStoreV7: true,
},
addons: [
getAbsolutePath('@storybook/addon-a11y'),
getAbsolutePath('@storybook/addon-essentials'),
getAbsolutePath('@storybook/addon-links'),
],
docs: {
autodocs: true,
},
Expand Down Expand Up @@ -54,12 +57,15 @@ const config = {
'@config': path.resolve(__dirname, './'),
},
},
plugins: [react()],
optimizeDeps: {
exclude: ['fsevents'],
include: [
'@storybook/addon-viewport',
'@storybook/blocks',
'@storybook/theming/create',
'@storybook/web-components',
'@vitejs/plugin-react',
'lit/directives/style-map.js',
'uuid',
],
Expand All @@ -68,3 +74,7 @@ const config = {
},
};
export default config;

function getAbsolutePath(value: string): any {
return dirname(require.resolve(join(value, 'package.json')));
}
2 changes: 1 addition & 1 deletion .stylelintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = {
'selector-id-pattern': null,
'keyframes-name-pattern': null,
'scss/operator-no-newline-after': null,
'value-no-vendor-prefix': [true, { ignoreValues: 'box' }],
'value-no-vendor-prefix': [true, { ignoreValues: ['box'] }],
'alpha-value-notation': 'number',
},
};
Binary file modified .yarn/install-state.gz
Binary file not shown.
324 changes: 162 additions & 162 deletions .yarn/releases/yarn-4.1.0.cjs → .yarn/releases/yarn-4.1.1.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.1.0.cjs
yarnPath: .yarn/releases/yarn-4.1.1.cjs
118 changes: 118 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
import js from '@eslint/js';
import babelParser from '@babel/eslint-parser';
import reactPlugin from 'eslint-plugin-react';
import prettierPlugin from 'eslint-plugin-prettier';
import storybookPlugin from 'eslint-plugin-storybook';
import typeScriptEsLint from '@typescript-eslint/eslint-plugin';
import globals from 'globals';

const globalIgnores = [
'.storybook-static/',
'packages/pharos/coverage/',
'packages/pharos/lib/',
'packages/pharos/src/styles/**/*.ts',
'packages/pharos-site/public/',
'packages/pharos-site/.cache/',
'**/dist/',
'**/node_modules/',
'**/*.css.ts',
];

const pharosConfig = {
languageOptions: {
parser: babelParser,
globals: {
...globals.browser,
...globals.node,
},
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
requireConfigFile: false,
ecmaFeatures: {
jsx: true,
},
babelOptions: {
plugins: ['@babel/plugin-syntax-import-assertions'],
presets: ['@babel/preset-react'],
},
},
},
plugins: {
reactPlugin,
prettierPlugin,
storybookPlugin,
typeScriptEsLint,
},
settings: {
react: {
version: 'detect',
},
},
rules: {
'react/react-in-jsx-scope': 'off',
},
};

const tsConfig = {
files: ['*.ts'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './packages/**/tsconfig.json',
},
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:wc/recommended',
'plugin:lit/recommended',
],
rules: {
'no-unused-vars': 'off',
'@typescript-eslint/consistent-type-imports': ['error'],
'@typescript-eslint/no-unused-vars': ['error'],
'lit/no-legacy-template-syntax': 'off',
},
};

const tsxConfig = {
files: ['*.tsx'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: './packages/**/tsconfig.json',
},
extends: [
'plugin:jsx-a11y/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:@typescript-eslint/recommended',
],
rules: {
'no-unused-vars': 'off',
'@typescript-eslint/consistent-type-imports': ['error'],
'@typescript-eslint/no-unused-vars': ['error'],
'react/display-name': 'off',
'react/prop-types': 'off',
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
},
};

const mdxConfig = {
files: ['*.mdx'],
extends: ['plugin:mdx/recommended', 'plugin:react/recommended'],
settings: {
'mdx/code-blocks': true,
},
rules: {
'react/no-unescaped-entities': 'off',
'react/jsx-no-undef': 'off',
},
};

export default [
{ ignores: globalIgnores },
js.configs.recommended,
pharosConfig,
tsConfig,
tsxConfig,
mdxConfig,
];
78 changes: 40 additions & 38 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,65 +54,67 @@
},
"homepage": "https://github.com/ithaka/pharos#readme",
"devDependencies": {
"@babel/core": "^7.24.0",
"@babel/eslint-parser": "^7.23.10",
"@babel/plugin-proposal-decorators": "^7.24.0",
"@babel/plugin-proposal-export-default-from": "^7.23.3",
"@babel/plugin-syntax-import-assertions": "^7.23.3",
"@babel/preset-env": "^7.24.0",
"@babel/core": "^7.24.5",
"@babel/eslint-parser": "^7.24.5",
"@babel/plugin-proposal-decorators": "^7.24.1",
"@babel/plugin-proposal-export-default-from": "^7.24.1",
"@babel/plugin-syntax-import-assertions": "^7.24.1",
"@babel/preset-env": "^7.24.5",
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.1",
"@commitlint/cli": "^19.2.0",
"@commitlint/config-conventional": "^19.1.0",
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"@emotion/babel-plugin": "^11.11.0",
"@size-limit/preset-small-lib": "^11.1.0",
"@storybook/addon-a11y": "^7.6.17",
"@storybook/addon-essentials": "^7.6.17",
"@storybook/addon-links": "^7.6.17",
"@storybook/blocks": "^7.6.17",
"@storybook/manager-api": "^7.6.17",
"@storybook/react-vite": "^7.6.17",
"@storybook/theming": "^7.6.17",
"@storybook/web-components": "^7.6.17",
"@storybook/web-components-vite": "^7.6.17",
"@size-limit/preset-small-lib": "^11.1.3",
"@storybook/addon-a11y": "^8.0.10",
"@storybook/addon-essentials": "^8.0.10",
"@storybook/addon-links": "^8.0.10",
"@storybook/blocks": "^8.0.10",
"@storybook/manager-api": "^8.0.10",
"@storybook/react-vite": "^8.0.10",
"@storybook/theming": "^8.0.10",
"@storybook/web-components": "^8.0.10",
"@storybook/web-components-vite": "^8.0.10",
"@types/uuid": "^9.0.8",
"@typescript-eslint/eslint-plugin": "^7.2.0",
"@typescript-eslint/parser": "^7.2.0",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/parser": "^7.8.0",
"@vitejs/plugin-react": "^4.2.1",
"all-contributors-cli": "^6.26.1",
"concurrently": "^8.2.2",
"cssnano": "^6.1.0",
"eslint": "^8.57.0",
"cssnano": "^7.0.1",
"eslint": "^9.2.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jsx-a11y": "^6.8.0",
"eslint-plugin-lit": "^1.11.0",
"eslint-plugin-mdx": "^2.3.4",
"eslint-plugin-no-smart-quotes": "^1.3.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.34.1",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-storybook": "^0.8.0",
"eslint-plugin-wc": "^2.0.4",
"eslint-plugin-wc": "^2.1.0",
"globals": "^15.2.0",
"husky": "^9.0.11",
"lint-staged": "^15.2.2",
"lit": "^2.8.0",
"lit-analyzer": "^2.0.3",
"markdown-toc": "^1.2.0",
"postcss": "^8.4.35",
"postcss-import": "^16.0.1",
"postcss": "^8.4.38",
"postcss-import": "^16.1.0",
"postcss-media-minmax": "^5.0.0",
"postcss-preset-env": "^9.5.1",
"postcss-preset-env": "^9.5.11",
"prettier": "^3.2.5",
"pretty-quick": "^4.0.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sass": "^1.72.0",
"size-limit": "^11.1.0",
"storybook": "^7.6.17",
"stylelint": "^16.2.1",
"stylelint-config-standard-scss": "^13.0.0",
"stylelint-scss": "^6.2.1",
"svglint": "^2.7.0",
"vite": "^4.5.2"
"react": "^18.3.1",
"react-dom": "^18.3.1",
"sass": "^1.77.0",
"size-limit": "^11.1.3",
"storybook": "^8.0.10",
"stylelint": "^16.5.0",
"stylelint-config-standard-scss": "^13.1.0",
"stylelint-scss": "^6.3.0",
"svglint": "^2.7.1",
"vite": "^5.2.11"
},
"workspaces": {
"packages": [
Expand All @@ -127,5 +129,5 @@
"path": "packages/pharos/lib/index.js"
}
],
"packageManager": "[email protected].0"
"packageManager": "[email protected].1"
}
Loading

0 comments on commit 47ca563

Please sign in to comment.