Skip to content

Commit

Permalink
Merge pull request #12 from amir78729/fix/types
Browse files Browse the repository at this point in the history
Fix/types
  • Loading branch information
amir78729 authored Jul 20, 2024
2 parents 91033a7 + d11b8f0 commit fdb8a7b
Show file tree
Hide file tree
Showing 29 changed files with 2,377 additions and 1,650 deletions.
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
storybook-static
dist
157 changes: 154 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,158 @@
{
"env": {
"browser": true,
"es2021": true
},
"extends": [
"airbnb",
"airbnb/hooks",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 12,
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": [
"react",
"@typescript-eslint",
"prettier"
],
"rules": {
"import/no-unresolved": "off",
"@typescript-eslint/no-explicit-any": "off",
"prettier/prettier": "error",
"import/no-extraneous-dependencies": "off",
"object-curly-newline": "off",
"jsx-a11y/href-no-hash": "off",

"jsx-a11y/label-has-for": "warn",

"react/jsx-filename-extension": ["error", { "extensions": [".js", ".jsx"] }],

"react/prefer-stateless-function": "off",

"max-len": ["error", { "code": 130, "tabWidth": 2 }],
"jsx-a11y/no-static-element-interactions": "off",
"jsx-a11y/no-noninteractive-element-interactions": "off",
"jsx-a11y/anchor-has-content": "off",
"react/jsx-no-target-blank": "off",
"react/forbid-prop-types": "off",
"no-console": "off",
"import/prefer-default-export": "off",
"no-plusplus": "off",
"func-names": "off",
"no-case-declarations": "off",
"no-param-reassign": "off",
"react/no-array-index-key": "off",
"no-use-before-define": "off",
"react/no-did-update-set-state": "off",
"react-hooks/exhaustive-deps": "off",
"react/destructuring-assignment": "off",
"react/static-property-placement": "off",
"jsx-a11y/click-events-have-key-events": "off",
"react/jsx-props-no-spreading": "off",
"react/require-default-props": "off",
"react/button-has-type": "off",
"import/extensions": [
"error",
"always",
{
"js": "never",
"jsx": "never",
"ts": "never",
"tsx": "never",
"mjs": "never"
}
]
},
"settings": {
"import/resolver": {
"typescript": {}
"typescript": {},
"node": {
"moduleDirectory": ["node_modules", "src"],
"extensions": [".js", ".jsx", ".ts", ".tsx"],
"typescript": {
"alwaysTryTypes": true
}
}
}
}
}
},
"overrides": [
{
"files": ["*.ts", "*.tsx"],
"rules": {

"@typescript-eslint/no-explicit-any": "off"
}
},
{
"files": ["**/*.ts", "**/*.tsx"],
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "prettier"],
"parserOptions": {
"sourceType": "module",
"project": null
},
"extends": ["airbnb", "plugin:@typescript-eslint/recommended", "prettier"],
"rules": {
"prettier/prettier": ["error"],
"object-curly-newline": "off",
"max-len": ["error", { "code": 130, "tabWidth": 2 }],
"react/require-default-props": "off",
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": "off",
"jsx-a11y/anchor-has-content": "off",
"import/prefer-default-export": "off",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/await-thenable": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/unbound-method": "off",
"@typescript-eslint/no-for-in-array": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-misused-promises": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/restrict-plus-operands": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"class-methods-use-this": "off",
"react/prop-types": "off",
"no-plusplus": "off",
"react/jsx-props-no-spreading": "off",
"react/jsx-filename-extension": ["error", { "extensions": [".js", ".jsx", "tsx"] }],
"import/extensions": [
"error",
"always",
{
"js": "never",
"jsx": "never",
"ts": "never",
"tsx": "never",
"mjs": "never"
}
]
},
"settings": {
"import/resolver": {
"typescript": {},
"node": {
"moduleDirectory": ["node_modules", "src"],
"extensions": [".js", ".jsx", ".ts", ".tsx"],
"typescript": {
"alwaysTryTypes": true,
}
}
}
}
}
]
}
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm lint-staged
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
storybook-static
dist
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"singleQuote": true,
"tabWidth": 2,
"printWidth": 130,
"trailingComma": "all"
}
29 changes: 27 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
{
"name": "schema-builder",
"version": "1.0.0",
"version": "0.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build"
"build-storybook": "storybook build",
"prepare": "husky install",
"lint": "eslint 'src/**/*.{js,ts,jsx,tsx}'",
"lint:fix": "eslint 'src/**/*.{js,ts,jsx,tsx}' --fix",
"format": "prettier --write 'src/**/*.{js,ts,jsx,tsx,json,css,scss,md}'",
"postinstall": "husky install",
"prepack": "pinst --disable",
"postpack": "pinst --enable"
},
"lint-staged": {
"src/**/*.{js,ts,jsx,tsx}": [
"eslint --fix",
"prettier --write"
]
},
"keywords": [],
"author": "",
Expand Down Expand Up @@ -40,11 +53,23 @@
"@storybook/test": "^8.1.6",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.16.0",
"@typescript-eslint/parser": "^7.16.0",
"eslint": "^9.4.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.9.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.34.2",
"eslint-plugin-react-hooks": "^4.6.2",
"globals": "^15.4.0",
"husky": "^8.0.0",
"lint-staged": "^15.2.7",
"pinst": "^3.0.0",
"prettier": "^3.3.2",
"shiki": "^1.10.3",
"storybook": "^8.1.6",
"typescript": "^5.4.5",
"typescript-eslint": "^7.12.0"
Expand Down
Loading

0 comments on commit fdb8a7b

Please sign in to comment.