File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -52,14 +52,14 @@ module.exports = [
52
52
this . error ( node , 'Constant and immutable variables should not have leading underscore' ) ;
53
53
}
54
54
} else if ( node . isStateVar ) {
55
- if ( node . visibility === 'private' || node . visibility === 'internal' ) {
56
- if ( ! / ^ _ / . test ( node . name ) ) {
57
- this . error ( node , 'Private and internal state variables must have leading underscore' ) ;
58
- }
59
- } else {
60
- if ( / ^ _ / . test ( node . name ) ) {
61
- this . error ( node , 'Public state variables should not have leading underscore' ) ;
62
- }
55
+ if ( node . visibility === 'private' && ! / ^ _ / . test ( node . name ) )
56
+ this . error ( node , 'Private state variables must have leading underscore' ) ;
57
+ }
58
+ if ( node . visibility === 'internal' && ! / ^ _ / . test ( node . name ) ) {
59
+ this . error ( node , 'Internal state variables must have leading underscore' ) ;
60
+ }
61
+ if ( node . visibility === 'public' && / ^ _ / . test ( node . name ) ) {
62
+ this . error ( node , 'Public state variables should not have leading underscore' ) ;
63
63
}
64
64
}
65
65
}
You can’t perform that action at this time.
0 commit comments