Showing 36 of 36 total issues
trailing whitespace Open
* A function used to compare the previous and current state for equality.
- Read upRead up
- Exclude checks
Rule: no-trailing-whitespace
Disallows trailing whitespace at the end of a line.
Rationale
Keeps version control diffs clean as it prevents accidental whitespace from being committed.
Notes
- Has Fix
Config
Possible settings are:
-
"ignore-template-strings"
: Allows trailing whitespace in template strings. -
"ignore-comments"
: Allows trailing whitespace in comments. -
"ignore-jsdoc"
: Allows trailing whitespace only in JSDoc comments. -
"ignore-blank-lines"
: Allows trailing whitespace on empty lines.
Examples
"no-trailing-whitespace": true
"no-trailing-whitespace": true,ignore-comments
"no-trailing-whitespace": true,ignore-jsdoc
Schema
{
"type": "array",
"items": {
"type": "string",
"enum": [
"ignore-comments",
"ignore-jsdoc",
"ignore-template-strings",
"ignore-blank-lines"
]
}
}
For more information see this page.
Missing semicolon Open
console.warn('NgSimpleStateBaseStore is deprecated. Please use NgSimpleStateBaseRxjsStore')
- Read upRead up
- Exclude checks
Rule: semicolon
Enforces consistent semicolon usage at the end of every statement.
Notes
- Has Fix
Config
One of the following arguments must be provided:
-
"always"
enforces semicolons at the end of every statement. -
"never"
disallows semicolons at the end of every statement except for when they are necessary.
The following arguments may be optionally provided:
-
"ignore-interfaces"
skips checking semicolons at the end of interface members. -
"ignore-bound-class-methods"
skips checking semicolons at the end of bound class methods. -
"strict-bound-class-methods"
disables any special handling of bound class methods and treats them as any other assignment. This option overrides"ignore-bound-class-methods"
.
Examples
"semicolon": true,always
"semicolon": true,never
"semicolon": true,always,ignore-interfaces
"semicolon": true,always,ignore-bound-class-methods
Schema
{
"type": "array",
"items": [
{
"type": "string",
"enum": [
"always",
"never"
]
},
{
"type": "string",
"enum": [
"ignore-interfaces"
]
}
],
"additionalItems": false
}
For more information see this page.
unused expression, expected an assignment or function call Open
comparator ??= this.comparator;
- Read upRead up
- Exclude checks
Rule: no-unused-expression
Disallows unused expression statements.
Unused expressions are expression statements which are not assignments or function calls (and thus usually no-ops).
Rationale
Detects potential errors where an assignment or function call was intended.
Config
Three arguments may be optionally provided:
-
allow-fast-null-checks
allows to use logical operators to perform fast null checks and perform method or function calls for side effects (e.g.e && e.preventDefault()
). -
allow-new
allows 'new' expressions for side effects (e.g.new ModifyGlobalState();
. -
allow-tagged-template
allows tagged templates for side effects (e.g.this.add\
foo`;`.
Examples
"no-unused-expression": true
"no-unused-expression": true,allow-fast-null-checks
Schema
{
"type": "array",
"items": {
"type": "string",
"enum": [
"allow-fast-null-checks",
"allow-new",
"allow-tagged-template"
]
},
"minLength": 0,
"maxLength": 3
}
For more information see this page.
Missing semicolon Open
selectFn ??= this.selectFn.bind(this);
- Read upRead up
- Exclude checks
Rule: semicolon
Enforces consistent semicolon usage at the end of every statement.
Notes
- Has Fix
Config
One of the following arguments must be provided:
-
"always"
enforces semicolons at the end of every statement. -
"never"
disallows semicolons at the end of every statement except for when they are necessary.
The following arguments may be optionally provided:
-
"ignore-interfaces"
skips checking semicolons at the end of interface members. -
"ignore-bound-class-methods"
skips checking semicolons at the end of bound class methods. -
"strict-bound-class-methods"
disables any special handling of bound class methods and treats them as any other assignment. This option overrides"ignore-bound-class-methods"
.
Examples
"semicolon": true,always
"semicolon": true,never
"semicolon": true,always,ignore-interfaces
"semicolon": true,always,ignore-bound-class-methods
Schema
{
"type": "array",
"items": [
{
"type": "string",
"enum": [
"always",
"never"
]
},
{
"type": "string",
"enum": [
"ignore-interfaces"
]
}
],
"additionalItems": false
}
For more information see this page.
expected call-signature: 'provideNgSimpleState' to have a typedef Open
export function provideNgSimpleState(ngSimpleStateConfig?: NgSimpleStateConfig) {
- Read upRead up
- Exclude checks
Rule: typedef
Requires type definitions to exist.
Notes
- TypeScript Only
Config
Several arguments may be optionally provided:
-
"call-signature"
checks return type of functions. -
"arrow-call-signature"
checks return type of arrow functions. -
"parameter"
checks type specifier of function parameters for non-arrow functions. -
"arrow-parameter"
checks type specifier of function parameters for arrow functions. -
"property-declaration"
checks return types of interface properties. -
"variable-declaration"
checks non-binding variable declarations. -
"variable-declaration-ignore-function"
ignore variable declarations for non-arrow and arrow functions. -
"member-variable-declaration"
checks member variable declarations. -
"object-destructuring"
checks object destructuring declarations. -
"array-destructuring"
checks array destructuring declarations.
Examples
"typedef": true,call-signature,parameter,member-variable-declaration
Schema
{
"type": "array",
"items": {
"type": "string",
"enum": [
"call-signature",
"arrow-call-signature",
"parameter",
"arrow-parameter",
"property-declaration",
"variable-declaration",
"variable-declaration-ignore-function",
"member-variable-declaration",
"object-destructuring",
"array-destructuring"
]
},
"minLength": 0,
"maxLength": 10
}
For more information see this page.
unused expression, expected an assignment or function call Open
comparator ??= this.comparator;
- Read upRead up
- Exclude checks
Rule: no-unused-expression
Disallows unused expression statements.
Unused expressions are expression statements which are not assignments or function calls (and thus usually no-ops).
Rationale
Detects potential errors where an assignment or function call was intended.
Config
Three arguments may be optionally provided:
-
allow-fast-null-checks
allows to use logical operators to perform fast null checks and perform method or function calls for side effects (e.g.e && e.preventDefault()
). -
allow-new
allows 'new' expressions for side effects (e.g.new ModifyGlobalState();
. -
allow-tagged-template
allows tagged templates for side effects (e.g.this.add\
foo`;`.
Examples
"no-unused-expression": true
"no-unused-expression": true,allow-fast-null-checks
Schema
{
"type": "array",
"items": {
"type": "string",
"enum": [
"allow-fast-null-checks",
"allow-new",
"allow-tagged-template"
]
},
"minLength": 0,
"maxLength": 3
}
For more information see this page.
unused expression, expected an assignment or function call Open
comparator ??= this.comparator;
- Read upRead up
- Exclude checks
Rule: no-unused-expression
Disallows unused expression statements.
Unused expressions are expression statements which are not assignments or function calls (and thus usually no-ops).
Rationale
Detects potential errors where an assignment or function call was intended.
Config
Three arguments may be optionally provided:
-
allow-fast-null-checks
allows to use logical operators to perform fast null checks and perform method or function calls for side effects (e.g.e && e.preventDefault()
). -
allow-new
allows 'new' expressions for side effects (e.g.new ModifyGlobalState();
. -
allow-tagged-template
allows tagged templates for side effects (e.g.this.add\
foo`;`.
Examples
"no-unused-expression": true
"no-unused-expression": true,allow-fast-null-checks
Schema
{
"type": "array",
"items": {
"type": "string",
"enum": [
"allow-fast-null-checks",
"allow-new",
"allow-tagged-template"
]
},
"minLength": 0,
"maxLength": 3
}
For more information see this page.
Type number trivially inferred from a number literal, remove type annotation Open
protected stackPoint: number = 4;
- Read upRead up
- Exclude checks
Rule: no-inferrable-types
Disallows explicit type declarations for variables or parameters initialized to a number, string, or boolean.
Rationale
Explicit types where they can be easily inferred by the compiler make code more verbose.
Notes
- TypeScript Only
- Has Fix
Config
Two arguments may be optionally provided:
-
ignore-params
allows specifying an inferrable type annotation for function params. This can be useful when combining with thetypedef
rule. -
ignore-properties
allows specifying an inferrable type annotation for class properties.
Examples
"no-inferrable-types": true
"no-inferrable-types": true,ignore-params
"no-inferrable-types": true,ignore-params,ignore-properties
Schema
{
"type": "array",
"items": {
"type": "string",
"enum": [
"ignore-params",
"ignore-properties"
]
},
"minLength": 0,
"maxLength": 2
}
For more information see this page.
Missing semicolon Open
protected globalConfig = inject(NG_SIMPLE_STORE_CONFIG, { optional: true })
- Read upRead up
- Exclude checks
Rule: semicolon
Enforces consistent semicolon usage at the end of every statement.
Notes
- Has Fix
Config
One of the following arguments must be provided:
-
"always"
enforces semicolons at the end of every statement. -
"never"
disallows semicolons at the end of every statement except for when they are necessary.
The following arguments may be optionally provided:
-
"ignore-interfaces"
skips checking semicolons at the end of interface members. -
"ignore-bound-class-methods"
skips checking semicolons at the end of bound class methods. -
"strict-bound-class-methods"
disables any special handling of bound class methods and treats them as any other assignment. This option overrides"ignore-bound-class-methods"
.
Examples
"semicolon": true,always
"semicolon": true,never
"semicolon": true,always,ignore-interfaces
"semicolon": true,always,ignore-bound-class-methods
Schema
{
"type": "array",
"items": [
{
"type": "string",
"enum": [
"always",
"never"
]
},
{
"type": "string",
"enum": [
"ignore-interfaces"
]
}
],
"additionalItems": false
}
For more information see this page.
file should end with a newline Open
export * from './lib/ng-simple-state-provider';
- Read upRead up
- Exclude checks
Rule: eofline
Ensures the file ends with a newline.
Fix for single-line files is not supported.
Rationale
It is a standard convention to end files with a newline.
Notes
- Has Fix
Config
Not configurable.
Examples
"eofline": true
For more information see this page.
Missing semicolon Open
comparator ??= this.comparator;
- Read upRead up
- Exclude checks
Rule: semicolon
Enforces consistent semicolon usage at the end of every statement.
Notes
- Has Fix
Config
One of the following arguments must be provided:
-
"always"
enforces semicolons at the end of every statement. -
"never"
disallows semicolons at the end of every statement except for when they are necessary.
The following arguments may be optionally provided:
-
"ignore-interfaces"
skips checking semicolons at the end of interface members. -
"ignore-bound-class-methods"
skips checking semicolons at the end of bound class methods. -
"strict-bound-class-methods"
disables any special handling of bound class methods and treats them as any other assignment. This option overrides"ignore-bound-class-methods"
.
Examples
"semicolon": true,always
"semicolon": true,never
"semicolon": true,always,ignore-interfaces
"semicolon": true,always,ignore-bound-class-methods
Schema
{
"type": "array",
"items": [
{
"type": "string",
"enum": [
"always",
"never"
]
},
{
"type": "string",
"enum": [
"ignore-interfaces"
]
}
],
"additionalItems": false
}
For more information see this page.
unused expression, expected an assignment or function call Open
selectFn ??= this.selectFn.bind(this);
- Read upRead up
- Exclude checks
Rule: no-unused-expression
Disallows unused expression statements.
Unused expressions are expression statements which are not assignments or function calls (and thus usually no-ops).
Rationale
Detects potential errors where an assignment or function call was intended.
Config
Three arguments may be optionally provided:
-
allow-fast-null-checks
allows to use logical operators to perform fast null checks and perform method or function calls for side effects (e.g.e && e.preventDefault()
). -
allow-new
allows 'new' expressions for side effects (e.g.new ModifyGlobalState();
. -
allow-tagged-template
allows tagged templates for side effects (e.g.this.add\
foo`;`.
Examples
"no-unused-expression": true
"no-unused-expression": true,allow-fast-null-checks
Schema
{
"type": "array",
"items": {
"type": "string",
"enum": [
"allow-fast-null-checks",
"allow-new",
"allow-tagged-template"
]
},
"minLength": 0,
"maxLength": 3
}
For more information see this page.
missing whitespace Open
selectFn ??= this.selectFn.bind(this);
- Read upRead up
- Exclude checks
Rule: whitespace
Enforces whitespace style conventions.
Rationale
Helps maintain a readable, consistent style in your codebase.
Notes
- Has Fix
Config
Several arguments may be optionally provided:
-
"check-branch"
checks branching statements (if
/else
/for
/while
) are followed by whitespace. -
"check-decl"
checks that variable declarations have whitespace around the equals token. -
"check-operator"
checks for whitespace around operator tokens. -
"check-module"
checks for whitespace in import & export statements. -
"check-separator"
checks for whitespace after separator tokens (,
/;
). -
"check-rest-spread"
checks that there is no whitespace after rest/spread operator (...
). -
"check-type"
checks for whitespace before a variable type specification. -
"check-typecast"
checks for whitespace between a typecast and its target. -
"check-type-operator"
checks for whitespace between type operators|
and&
. -
"check-preblock"
checks for whitespace before the opening brace of a block. -
"check-postbrace"
checks for whitespace after an opening brace.
Examples
"whitespace": true,check-branch,check-operator,check-typecast
Schema
{
"type": "array",
"items": {
"type": "string",
"enum": [
"check-branch",
"check-decl",
"check-operator",
"check-module",
"check-separator",
"check-rest-spread",
"check-type",
"check-typecast",
"check-type-operator",
"check-preblock",
"check-postbrace"
]
},
"minLength": 0,
"maxLength": 11
}
For more information see this page.
Type number trivially inferred from a number literal, remove type annotation Open
protected stackPoint: number = 4;
- Read upRead up
- Exclude checks
Rule: no-inferrable-types
Disallows explicit type declarations for variables or parameters initialized to a number, string, or boolean.
Rationale
Explicit types where they can be easily inferred by the compiler make code more verbose.
Notes
- TypeScript Only
- Has Fix
Config
Two arguments may be optionally provided:
-
ignore-params
allows specifying an inferrable type annotation for function params. This can be useful when combining with thetypedef
rule. -
ignore-properties
allows specifying an inferrable type annotation for class properties.
Examples
"no-inferrable-types": true
"no-inferrable-types": true,ignore-params
"no-inferrable-types": true,ignore-params,ignore-properties
Schema
{
"type": "array",
"items": {
"type": "string",
"enum": [
"ignore-params",
"ignore-properties"
]
},
"minLength": 0,
"maxLength": 2
}
For more information see this page.
Missing semicolon Open
super()
- Read upRead up
- Exclude checks
Rule: semicolon
Enforces consistent semicolon usage at the end of every statement.
Notes
- Has Fix
Config
One of the following arguments must be provided:
-
"always"
enforces semicolons at the end of every statement. -
"never"
disallows semicolons at the end of every statement except for when they are necessary.
The following arguments may be optionally provided:
-
"ignore-interfaces"
skips checking semicolons at the end of interface members. -
"ignore-bound-class-methods"
skips checking semicolons at the end of bound class methods. -
"strict-bound-class-methods"
disables any special handling of bound class methods and treats them as any other assignment. This option overrides"ignore-bound-class-methods"
.
Examples
"semicolon": true,always
"semicolon": true,never
"semicolon": true,always,ignore-interfaces
"semicolon": true,always,ignore-bound-class-methods
Schema
{
"type": "array",
"items": [
{
"type": "string",
"enum": [
"always",
"never"
]
},
{
"type": "string",
"enum": [
"ignore-interfaces"
]
}
],
"additionalItems": false
}
For more information see this page.
The name of the class NgSimpleStateBaseRxjsStore should end with the suffix Directive (https://angular.io/styleguide#style-02-03) Open
export abstract class NgSimpleStateBaseRxjsStore<S extends object | Array<any>> extends NgSimpleStateBaseCommonStore<S> implements OnDestroy {
- Read upRead up
- Exclude checks
Rule: directive-class-suffix
Classes decorated with @Directive must have suffix "Directive" (or custom) in their name.
See more at https://angular.io/styleguide#style-02-03.
Rationale
Consistent conventions make it easy to quickly identify and reference assets of different types.
Notes
- TypeScript Only
Config
Supply a list of allowed component suffixes. Defaults to "Directive".
Examples
"directive-class-suffix": true
"directive-class-suffix": true,Directive,MySuffix
Schema
{
"items": {
"type": "string"
},
"minLength": 0,
"type": "array"
}
For more information see this page.