Skip to content

Commit

Permalink
add consistent-type-exports to eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
leobastiani committed Oct 1, 2024
1 parent 6b6ec46 commit 27b9389
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 13 deletions.
18 changes: 17 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,22 @@
"react-hooks",
"jest"
],
"overrides": [
{
"files": [
"src/**/*.ts",
"src/**/*.tsx"
],
"parserOptions": {
"project": [
"./tsconfig.json"
]
},
"rules": {
"@typescript-eslint/consistent-type-exports": "error"
}
}
],
"rules": {
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/ban-ts-comment": "off",
Expand All @@ -38,4 +54,4 @@
"globals": {
"JSX": true
}
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-with-hoc",
"version": "0.0.23-wip034",
"version": "0.0.23-wip035",
"description": "Work with React and HOCs (Higher-Order Components)",
"keywords": [
"higher-order",
Expand Down
18 changes: 7 additions & 11 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ export { withState } from "./hocs/withState";
export { withWrapper } from "./hocs/withWrapper";

// Types
export { DependencyNames } from "./types/DependencyNames";
export {
export type { DependencyNames } from "./types/DependencyNames";
export type {
Call,
Fn,
FromSchema,
Expand All @@ -37,19 +37,15 @@ export {
ToSchema,
UnionFn,
} from "./types/Fn";
export { Hoc } from "./types/Hoc";
export { PartialComponent } from "./types/PartialComponent";
export type { Hoc } from "./types/Hoc";
export type { PartialComponent } from "./types/PartialComponent";

// Utils
export { componentDisplayName } from "./utils/componentDisplayName";
export type { HocNameFactory } from "./utils/hocNameForWithStyle";
export {
HocNameFactory,
createHocNameFunction,
defaultHocName,
} from "./utils/hocNameForWithStyle";
export {
GetHocArgs,
HocDefinition,
NewHocReturn,
newHoc,
} from "./utils/newHoc";
export type { GetHocArgs, HocDefinition, NewHocReturn } from "./utils/newHoc";
export { newHoc } from "./utils/newHoc";

0 comments on commit 27b9389

Please sign in to comment.