Skip to content

Commit

Permalink
Add object-curly-spacing rule (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrei Goncharov authored and blakeembrey committed Oct 17, 2017
1 parent 1767594 commit b761827
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions test/rules.out
Expand Up @@ -6,11 +6,19 @@ ERROR: /rules/import-spacing.ts[1, 8]: missing whitespace
ERROR: /rules/import-spacing.ts[2, 17]: missing whitespace
ERROR: /rules/import-spacing.ts[2, 9]: missing whitespace
ERROR: /rules/import-spacing.ts[1, 7]: missing whitespace
ERROR: /rules/import-spacing.ts[1, 7]: A space is required after '{'
ERROR: /rules/import-spacing.ts[1, 22]: A space is required before '}'
ERROR: /rules/import-spacing.ts[2, 8]: A space is required after '{'
ERROR: /rules/import-spacing.ts[2, 17]: A space is required before '}'
ERROR: /rules/no-constant-condition.ts[1, 5]: unexpected constant condition
ERROR: /rules/no-inner-declarations.ts[4, 20]: block is empty
ERROR: /rules/no-inner-declarations.ts[4, 12]: 'test' is declared but never used.
ERROR: /rules/no-inner-declarations.ts[4, 3]: move function declaration to program root
ERROR: /rules/no-multi-spaces.ts[1, 22]: Multiple spaces found before 'true'.
ERROR: /rules/object-destruct-spacing.ts[1, 13]: A space is required after '{'
ERROR: /rules/object-destruct-spacing.ts[1, 19]: A space is required before '}'
ERROR: /rules/object-destruct-spacing.ts[1, 26]: A space is required after '{'
ERROR: /rules/object-destruct-spacing.ts[1, 32]: A space is required before '}'
ERROR: /rules/semicolon.ts[1, 24]: Unnecessary semicolon
ERROR: /rules/ter-arrow-spacing.ts[5, 11]: Multiple spaces found before '=>'.
ERROR: /rules/ter-indent.ts[11, 1]: Expected indentation of 2 spaces but found 3.
Expand Down
1 change: 1 addition & 0 deletions test/rules/object-destruct-spacing.ts
@@ -0,0 +1 @@
const fn = ({field}) => ({field})
3 changes: 2 additions & 1 deletion tslint.js
Expand Up @@ -174,6 +174,7 @@ module.exports = {
{
'allowSingleLine': true
}
]
],
'object-curly-spacing': [true, 'always']
}
}

0 comments on commit b761827

Please sign in to comment.