Inside classes, if you reuse properties inside other properties, the ordering will lead to an error depending on how they are named.
Code example
class TheClass {
x = new XProperty()
// Create model from properties
model = [this.x]
}
will lead to
class TheClass {
// Create model from properties
// Error TS2729: Property 'x' is used before its initialization.
model = [this.x]
x = new XProperty()
}
ESLint version
v8.57.0
ESLint Plugin Perfectionist version
v2.7.0
Additional comments
I don't know if this is a good programming standard as I'm just using a framework that generates this kind of code OOB.
Describe the bug
Inside classes, if you reuse properties inside other properties, the ordering will lead to an error depending on how they are named.
Code example
will lead to
ESLint version
v8.57.0
ESLint Plugin Perfectionist version
v2.7.0
Additional comments
I don't know if this is a good programming standard as I'm just using a framework that generates this kind of code OOB.
Validations