-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #143 from SwitchDreams/feat/improveComponents
[SW-6980, SW-5966] Feat/improve components
- Loading branch information
Showing
21 changed files
with
1,198 additions
and
2,558 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@switchdreams:registry=https://registry.npmjs.org |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | ||
}, | ||
}, | ||
]; | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.