Skip to content

Commit

Permalink
fix(rules): align with style guide
Browse files Browse the repository at this point in the history
Fix #233
  • Loading branch information
mgechev committed Feb 19, 2017
1 parent 220e527 commit c9e87f6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 0 additions & 2 deletions README.md
Expand Up @@ -72,7 +72,6 @@ Now create the following `tslint.json` file where your `node_modules` directory
"pipe-naming": [true, "camelCase", "sg"],
"component-class-suffix": true,
"directive-class-suffix": true,
"import-destructuring-spacing": true,
"templates-use-public": true,
"no-access-missing-member": true,
"invoke-injectable": true
Expand Down Expand Up @@ -163,7 +162,6 @@ Below you can find a recommended configuration which is based on the [Angular St
// Where "SUFFIX" is your custom suffix, for instance "Page" for Ionic 2 components.
"component-class-suffix": [true, "Component"],
"directive-class-suffix": [true, "Directive"],
"import-destructuring-spacing": true,
"templates-use-public": true,
"no-access-missing-member": true,
"invoke-injectable": true
Expand Down
2 changes: 1 addition & 1 deletion src/importDestructuringSpacingRule.ts
Expand Up @@ -2,7 +2,7 @@ import * as ts from 'typescript';
import * as Lint from 'tslint';

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

public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
return this.applyWithWalker(new ImportDestructuringSpacingWalker(sourceFile, this.getOptions()));
Expand Down
10 changes: 5 additions & 5 deletions test/importDestructuringSpacingRule.spec.ts
Expand Up @@ -6,7 +6,7 @@ describe('import-destructruing-spacing', () => {
let source = `import {Foo} from './foo'`;

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

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

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

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

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

0 comments on commit c9e87f6

Please sign in to comment.