The definition of Righteous is: (1) Morally upright; without guilt or sin. (2) In accordance with virtue or morality: a righteous judgment. (3) morally justifiable: righteous anger.
Righteous and righteousness can be a confusing topic. "Noah was a righteous man" (Gen. 6:9) Job was also described as "perfect" in righteousness, yet Romans 3:10 states "There is no one righteous, not even one". Job was also considered righteous in his own eyes (Job 32:1). But being self-righteous is a derogatory term - being narrow minded and smugly moralistic. Self- righteous is connected with hypocrisy.
Righteous(ness) is used almost 500 times in the Bible (putting it in the top 250 words most used words) and so it would be natural for some dichotomy in interpretation. In fact knowing what is right and wrong - moral or immoral is the challenge of living with others (after all we always think we are right).
Right is opposite of wrong. Add the "eous" and you get the addition of "having the nature of being right". Add the "ness" and you get an abstract noun exemplifying a quality or state.
Like T.B. said the other day - "I'm never wrong. One time I thought I was wrong, but I was mistaken"
Is that self-righteousness or wrongeousness?