Skip to content

Commit c9e87f6

Browse files
committed
fix(rules): align with style guide
Fix #233
1 parent 220e527 commit c9e87f6

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

README.md

-2
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ Now create the following `tslint.json` file where your `node_modules` directory
7272
"pipe-naming": [true, "camelCase", "sg"],
7373
"component-class-suffix": true,
7474
"directive-class-suffix": true,
75-
"import-destructuring-spacing": true,
7675
"templates-use-public": true,
7776
"no-access-missing-member": true,
7877
"invoke-injectable": true
@@ -163,7 +162,6 @@ Below you can find a recommended configuration which is based on the [Angular St
163162
// Where "SUFFIX" is your custom suffix, for instance "Page" for Ionic 2 components.
164163
"component-class-suffix": [true, "Component"],
165164
"directive-class-suffix": [true, "Directive"],
166-
"import-destructuring-spacing": true,
167165
"templates-use-public": true,
168166
"no-access-missing-member": true,
169167
"invoke-injectable": true

src/importDestructuringSpacingRule.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as ts from 'typescript';
22
import * as Lint from 'tslint';
33

44
export class Rule extends Lint.Rules.AbstractRule {
5-
public static FAILURE_STRING = 'You need to leave whitespaces inside of the import statement\'s curly braces ($$03-05$$)';
5+
public static FAILURE_STRING = 'You need to leave whitespaces inside of the import statement\'s curly braces';
66

77
public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
88
return this.applyWithWalker(new ImportDestructuringSpacingWalker(sourceFile, this.getOptions()));

test/importDestructuringSpacingRule.spec.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ describe('import-destructruing-spacing', () => {
66
let source = `import {Foo} from './foo'`;
77

88
assertFailure('import-destructuring-spacing', source, {
9-
message: 'You need to leave whitespaces inside of the import statement\'s curly braces ($$03-05$$)',
9+
message: 'You need to leave whitespaces inside of the import statement\'s curly braces',
1010
startPosition: {
1111
line: 0,
1212
character: 7
@@ -22,7 +22,7 @@ describe('import-destructruing-spacing', () => {
2222
let source = `import {Foo,Bar} from './foo'`;
2323

2424
assertFailure('import-destructuring-spacing', source, {
25-
message: 'You need to leave whitespaces inside of the import statement\'s curly braces ($$03-05$$)',
25+
message: 'You need to leave whitespaces inside of the import statement\'s curly braces',
2626
startPosition: {
2727
line: 0,
2828
character: 7
@@ -38,7 +38,7 @@ describe('import-destructruing-spacing', () => {
3838
let source = `import {Foo, Bar} from './foo'`;
3939

4040
assertFailure('import-destructuring-spacing', source, {
41-
message: 'You need to leave whitespaces inside of the import statement\'s curly braces ($$03-05$$)',
41+
message: 'You need to leave whitespaces inside of the import statement\'s curly braces',
4242
startPosition: {
4343
line: 0,
4444
character: 7
@@ -54,7 +54,7 @@ describe('import-destructruing-spacing', () => {
5454
let source = `import { Foo} from './foo';`
5555

5656
assertFailure('import-destructuring-spacing', source, {
57-
message: 'You need to leave whitespaces inside of the import statement\'s curly braces ($$03-05$$)',
57+
message: 'You need to leave whitespaces inside of the import statement\'s curly braces',
5858
startPosition: {
5959
line: 0,
6060
character: 7
@@ -70,7 +70,7 @@ describe('import-destructruing-spacing', () => {
7070
let source = `import {Foo } from './foo';`
7171

7272
assertFailure('import-destructuring-spacing', source, {
73-
message: 'You need to leave whitespaces inside of the import statement\'s curly braces ($$03-05$$)',
73+
message: 'You need to leave whitespaces inside of the import statement\'s curly braces',
7474
startPosition: {
7575
line: 0,
7676
character: 7

0 commit comments

Comments
 (0)