Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ node_modules/
_doc
yarn-error.log
!.github
!.husky
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pretty-quick --staged
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"docs:publish": "generate_docs && publish_docs",
"prepublishOnly": "npm run build",
"artifacts": "artifact_tagging",
"prettier": "npx prettier --write src/**/*.[jt]s src/**/*.[jt]sx"
"prettier": "npx prettier --write src/**/*.[jt]s src/**/*.[jt]sx",
"prepare": "husky"
},
"homepage": "https://ui-router.github.io/react",
"contributors": [
Expand Down Expand Up @@ -64,10 +65,10 @@
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.24.1",
"cross-env": "^7.0.3",
"husky": "^4.3.6",
"husky": "^9.1.7",
"jsdom": "^27.4.0",
"prettier": "^2.3.2",
"pretty-quick": "^3.1.1",
"prettier": "^3.7.4",
"pretty-quick": "^4.2.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-test-renderer": "^17.0.2",
Expand All @@ -79,13 +80,12 @@
"webpack-cli": "^6.0.1",
"webpack-dev-server": "^5.2.2"
},
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged"
}
},
"checkPeerDependencies": {
"ignore": ["@types/node", "terser", "yaml"]
"ignore": [
"@types/node",
"terser",
"yaml"
]
},
"docgen": {
"publishDir": "_react_docs",
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useStableCallback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ export function useStableCallback<T extends Function>(unstableCallback: T): T {
const callback = useCallback(function () {
return ref.current && ref.current.apply(this, arguments);
}, []);
return (callback as unknown) as T;
return callback as unknown as T;
}
5 changes: 4 additions & 1 deletion src/reactViews.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,10 @@ export class ReactViewConfig implements ViewConfig {
loaded: boolean = true;
$id: number = id++;

constructor(public path: [PathNode], public viewDecl: ReactViewDeclaration) {}
constructor(
public path: [PathNode],
public viewDecl: ReactViewDeclaration
) {}

load() {
return services.$q.when(this);
Expand Down
Loading