Skip to content

Commit

Permalink
Merge pull request #93 from nikkorn/#92
Browse files Browse the repository at this point in the history
Add linter and update dependencies
  • Loading branch information
nikkorn committed Jun 28, 2024
2 parents 75bc354 + 5777053 commit 3433e2f
Show file tree
Hide file tree
Showing 39 changed files with 2,485 additions and 973 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
16 changes: 16 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"@typescript-eslint/no-explicit-any": ["off"],
"@typescript-eslint/no-unused-vars": ["off"]
}
}
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
{
"typescript.tsdk": "node_modules\\typescript\\lib"
}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1431,6 +1431,7 @@ A practical look at behaviour trees and a good example of modelling behaviour fo
## Version History
| Version | Notes |
| -------------- |:----------------------------------------------------------------------------------------|
| 4.1.1 | Added linter and updated dependencies |
| 4.1.0 | Added Race and All node types |
| | Added onNodeStateChange callback to behaviour tree options |
| | Added getTreeNodeDetails method to BehaviourTree |
Expand Down
10 changes: 5 additions & 5 deletions dist/BehaviourTreeDefinitionUtilities.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,31 @@ import { NodeDefinition, RootNodeDefinition, DecoratorNodeDefinition, CompositeN
* @param node The node.
* @returns A value of true if the specified node satisfies the RootNodeDefinition type.
*/
export declare function isRootNode(node: NodeDefinition): node is RootNodeDefinition;
export declare function isRootNodeDefinition(node: NodeDefinition): node is RootNodeDefinition;
/**
* A type guard function that returns true if the specified node satisfies the BranchNodeDefinition type.
* @param node The node.
* @returns A value of true if the specified node satisfies the BranchNodeDefinition type.
*/
export declare function isBranchNode(node: NodeDefinition): node is BranchNodeDefinition;
export declare function isBranchNodeDefinition(node: NodeDefinition): node is BranchNodeDefinition;
/**
* A type guard function that returns true if the specified node satisfies the NodeDefinition type.
* @param node The node.
* @returns A value of true if the specified node satisfies the NodeDefinition type.
*/
export declare function isLeafNode(node: NodeDefinition): node is NodeDefinition;
export declare function isLeafNodeDefinition(node: NodeDefinition): node is NodeDefinition;
/**
* A type guard function that returns true if the specified node satisfies the DecoratorNodeDefinition type.
* @param node The node.
* @returns A value of true if the specified node satisfies the DecoratorNodeDefinition type.
*/
export declare function isDecoratorNode(node: NodeDefinition): node is DecoratorNodeDefinition;
export declare function isDecoratorNodeDefinition(node: NodeDefinition): node is DecoratorNodeDefinition;
/**
* A type guard function that returns true if the specified node satisfies the CompositeNodeDefinition type.
* @param node The node.
* @returns A value of true if the specified node satisfies the CompositeNodeDefinition type.
*/
export declare function isCompositeNode(node: NodeDefinition): node is CompositeNodeDefinition;
export declare function isCompositeNodeDefinition(node: NodeDefinition): node is CompositeNodeDefinition;
/**
* Flatten a node definition into an array of all of its nested node definitions.
* @param nodeDefinition The node definition to flatten.
Expand Down
5 changes: 0 additions & 5 deletions dist/attributes/Attribute.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import Guard from "./guards/Guard";
export type AttributeDetails = {
/** The attribute type. */
type: string;
Expand All @@ -20,8 +19,4 @@ export default abstract class Attribute<TAttributeDetails extends AttributeDetai
* Gets the attribute details.
*/
abstract getDetails(): TAttributeDetails;
/**
* Gets whether this attribute is a guard.
*/
abstract isGuard: () => this is Guard;
}
4 changes: 0 additions & 4 deletions dist/attributes/callbacks/Callback.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ export default abstract class Callback extends Attribute<CallbackAttributeDetail
* Gets the name of the agent function to call.
*/
getFunctionName: () => string;
/**
* Gets whether this attribute is a guard.
*/
isGuard: () => boolean;
/**
* Gets the attribute details.
*/
Expand Down
4 changes: 0 additions & 4 deletions dist/attributes/guards/Guard.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ export default abstract class Guard extends Attribute<GuardAttributeDetails> {
* Gets the name of the condition function that determines whether the guard is satisfied.
*/
getCondition: () => string;
/**
* Gets whether this attribute is a guard.
*/
isGuard: () => boolean;
/**
* Gets the attribute details.
*/
Expand Down
70 changes: 34 additions & 36 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions dist/index.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 3433e2f

Please sign in to comment.