Skip to content

Conversation

@mgechev
Copy link
Owner

@mgechev mgechev commented Feb 18, 2016

I'm working on a static code analyzer which verifies that given project follows the best practices described in the Angular 2 Style Guide.

It will be configurable so later if any other style guide is released one be able to adjust the configuration options based on his own preferences.

return gulp.src(src)
.pipe(plugins.tslint())
.pipe(plugins.tslint({
rulesDirectory: NG2LINT_RULES
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe that one should be included in tsconfig instead to leverage linting straight from the IDE.
http://palantir.github.io/tslint/usage/tslint-json/

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I intended to do so but I didn't manage to make it work. Not sure if gulp-tslint recognizes this option.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. For VSCode it should actually be added to .vscode/settings.json (https://marketplace.visualstudio.com/items?itemName=eg2.tslint)
And it works :-)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could still be added to tslin.json so if running tslint in a shell it will work as well.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, definitely adding it to tslint.json is a good idea.

ludohenin added a commit that referenced this pull request Feb 19, 2016
chore: add angular 2 specific static code validation
@ludohenin ludohenin merged commit b36970a into master Feb 19, 2016
@mgechev mgechev deleted the ng2lint branch February 19, 2016 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants