Skip to content

Commit

Permalink
chore: Update tslint conf
Browse files Browse the repository at this point in the history
  • Loading branch information
ludohenin committed Feb 21, 2016
1 parent 9865b73 commit a1480c9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion tools/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const JS_PROD_APP_BUNDLE = 'app.js';
export const VERSION_NPM = '2.14.2';
export const VERSION_NODE = '4.0.0';

export const NG2LINT_RULES = join('node_modules', 'ng2lint', 'dist', 'src');
export const NG2LINT_RULES = customRules();

if (ENABLE_HOT_LOADING) {
console.log(chalk.bgRed.white.bold('The hot loader is temporary disabled.'));
Expand Down Expand Up @@ -133,6 +133,11 @@ function appVersion(): number|string {
return pkg.version;
}

function customRules(): string[] {
var lintConf = JSON.parse(readFileSync('tslint.json').toString());
return lintConf.rulesDirectory;
}

function getEnvironment() {
let base:string[] = argv['_'];
let prodKeyword = !!base.filter(o => o.indexOf(ENVIRONMENTS.PRODUCTION) >= 0).pop();
Expand Down
3 changes: 2 additions & 1 deletion tslint.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"rulesDirectory": ["node_modules/ng2lint/dist/src"],
"rules": {
"class-name": true,
"curly": false,
"eofline": true,
"indent": "spaces",
"indent": ["spaces"],
"max-line-length": [true, 140],
"member-ordering": [true,
"public-before-private",
Expand Down

0 comments on commit a1480c9

Please sign in to comment.