-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable extending by providing an empty config preset
- Loading branch information
Showing
6 changed files
with
20 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
/node_modules | ||
*.js | ||
!/rules/index.js | ||
/coverage/ | ||
/.nyc_output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,9 @@ | |
"rules/*.js", | ||
"src/*.js" | ||
], | ||
"exclude": [ | ||
"rules/index.js" | ||
], | ||
"extension": [ | ||
".js" | ||
], | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,13 +15,24 @@ Install from npm to your devDependencies (https://www.npmjs.com/package/tslint- | |
npm install --save-dev tslint-consistent-codestyle | ||
``` | ||
|
||
Configure tslint to use the tslint-consistent-codestyle folder: | ||
Configure tslint to use `tslint-consistent-codestyle`: | ||
|
||
Add the following path to the `rulesDirectory` setting in your `tslint.json` file: | ||
This package provides an empty configuration preset that just contains the `rulesDirectory`. That means you can easily use the rules in this package, but don't get any predefined configuration. To use it, just add it to the `extends` array in your `tslint.json`: | ||
|
||
```javascript | ||
{ | ||
"rulesDirectory": ["./node_modules/tslint-consistent-codestyle/rules"] | ||
"extends": ["tslint-consistent-codestyle"] | ||
"rules": { | ||
... | ||
} | ||
} | ||
``` | ||
|
||
As of `[email protected]` you can also use `tslint-consistent-codestyle` as `rulesDirectory`: | ||
|
||
```javascript | ||
{ | ||
"rulesDirectory": ["tslint-consistent-codestyle"] | ||
"rules": { | ||
... | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// this file exists for tslint to resolve the rules directory | ||
export = {rulesDirectory: '.'}; |