Skip to content

Commit

Permalink
Merge pull request #143 from SwitchDreams/feat/improveComponents
Browse files Browse the repository at this point in the history
[SW-6980, SW-5966] Feat/improve components
  • Loading branch information
VHvictor1 authored Nov 7, 2024
2 parents bdbcb61 + 6b046d6 commit 751604a
Show file tree
Hide file tree
Showing 21 changed files with 1,198 additions and 2,558 deletions.
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@switchdreams:registry=https://registry.npmjs.org
9 changes: 0 additions & 9 deletions .prettierrc

This file was deleted.

7 changes: 7 additions & 0 deletions .prettierrc.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import switchDreamsConfig from "@switchdreams/lint-config/prettier";

const config = {
...switchDreamsConfig,
};

export default config;
109 changes: 20 additions & 89 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,95 +1,26 @@
import path from "node:path";
import { fileURLToPath } from "node:url";

import { fixupPluginRules } from "@eslint/compat";
import { FlatCompat } from "@eslint/eslintrc";
import js from "@eslint/js";
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
import prettier from "eslint-plugin-prettier";
import react from "eslint-plugin-react";
import reactHooks from "eslint-plugin-react-hooks";
import simpleImportSort from "eslint-plugin-simple-import-sort";
import globals from "globals";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default [
...compat.extends(
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:storybook/recommended",
"plugin:tailwindcss/recommended",
"plugin:prettier/recommended",
),
import eslintConfigSwitchDreams from "@switchdreams/lint-config";
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";

export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
...eslintConfigSwitchDreams,
{
plugins: {
react,
"@typescript-eslint": typescriptEslint,
"react-hooks": fixupPluginRules(reactHooks),
prettier,
"simple-import-sort": simpleImportSort,
},

languageOptions: {
globals: {
...globals.browser,
},

parser: tsParser,
ecmaVersion: "latest",
sourceType: "module",

parserOptions: {
ecmaFeatures: {
tsx: true,
},
},
},

settings: {
"import/resolver": {
typescript: {},
},

react: {
pragma: "React",
version: "detect",
},
},

rules: {
camelcase: "error",
"no-duplicate-imports": "error",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-explicit-any": "off",
"react/react-in-jsx-scope": "off",
"no-console": "error",
"no-alert": "error",
"react-hooks/exhaustive-deps": "off",
"react/prop-types": 0,
"react/display-name": 0,
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error",
"@typescript-eslint/no-empty-function": "off",
"react/no-unknown-property": "off",
"react/no-unescaped-entities ": "off",
"tailwindcss/no-custom-classname": ["off"],
"tailwindcss/enforces-shorthand": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
varsIgnorePattern: "React",
},
],
"@typescript-eslint/no-unused-expressions": "off",
"@typescript-eslint/no-empty-object-type": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-unsafe-function-type": "off",
},
},
{
files: ["**/*.stories.tsx", "**/*.test.tsx", "**/*.spec.tsx"],

rules: {
"tree-shaking/no-side-effects-in-initialization": "off",
},
},
];
);
46 changes: 21 additions & 25 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,39 +42,32 @@
"devDependencies": {
"@eslint/compat": "^1.2.1",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.13.0",
"@storybook/addon-designs": "^8.0.3",
"@storybook/addon-essentials": "^8.3.6",
"@storybook/addon-interactions": "^8.3.6",
"@storybook/addon-links": "^8.3.6",
"@storybook/blocks": "^8.3.6",
"@storybook/react": "^8.3.6",
"@storybook/react-vite": "^8.3.6",
"@storybook/test": "^8.3.6",
"@testing-library/jest-dom": "^6.4.6",
"@testing-library/react": "^14.2.1",
"@storybook/addon-designs": "^8.0.4",
"@storybook/addon-essentials": "^8.4.2",
"@storybook/addon-interactions": "^8.4.2",
"@storybook/addon-links": "^8.4.2",
"@storybook/blocks": "^8.4.2",
"@storybook/react": "^8.4.2",
"@storybook/react-vite": "^8.4.2",
"@storybook/test": "^8.4.2",
"@switchdreams/lint-config": "^0.0.2",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.0.1",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/react-input-mask": "^3.0.5",
"@typescript-eslint/eslint-plugin": "^8.11.0",
"@typescript-eslint/parser": "^8.11.0",
"@typescript-eslint/eslint-plugin": "^8.13.0",
"@typescript-eslint/parser": "^8.13.0",
"@vitejs/plugin-react": "^4.3.3",
"agadoo": "^3.0.0",
"autoprefixer": "^10.4.20",
"eslint": "^9.13.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint": "^9.14.0",
"eslint-plugin-react-refresh": "^0.4.14",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-storybook": "^0.10.1",
"eslint-plugin-tailwindcss": "^3.17.5",
"globals": "^15.11.0",
"jsdom": "^24.0.0",
"postcss": "^8.4.47",
"prettier": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.8",
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand All @@ -83,7 +76,6 @@
"storybook": "^8.3.6",
"tailwindcss": "^3.4.14",
"typescript": "^5.6.3",
"typescript-eslint": "^8.11.0",
"vite": "^5.4.10",
"vite-plugin-dts": "^3.7.3",
"vite-plugin-linter": "^2.1.1",
Expand All @@ -92,20 +84,24 @@
"vitest": "^1.4.0"
},
"dependencies": {
"@eslint/js": "^9.14.0",
"@floating-ui/react": "^0.26.25",
"@floating-ui/react-dom": "^2.1.2",
"@headlessui/react": "^2.2.0",
"@headlessui/tailwindcss": "^0.2.1",
"@heroicons/react": "^2.1.5",
"class-variance-authority": "^0.7.0",
"jackspeak": "4.0.2",
"react-input-mask": "^2.0.4",
"react-select": "^5.8.1",
"tailwind-merge": "^2.5.4"
"react-select": "^5.8.2",
"strip-ansi": "7.1.0",
"tailwind-merge": "^2.5.4",
"typescript-eslint": "^8.13.0"
},
"sideEffects": false,
"resolutions": {
"strip-ansi": "6.0.1",
"jackspeak": "2.1.1"
"jackspeak": "3.1.2"
},
"engines": {
"node": ">=20.0.0"
Expand Down
Loading

0 comments on commit 751604a

Please sign in to comment.