-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tslint.json files in sub directories are ignored. #5770
Comments
You should get the desired behavior by removing the reference to the tslint config file from angular-cli.json |
I don't see any reference to tslint.json in the .angular-cli.json?
|
TSLint includes logic to find the most relevant config per linted file. Unfortunately, by defaulting the config filename this behavior was being disabled. Fixes #5770
…ar#5792) TSLint includes logic to find the most relevant config per linted file. Unfortunately, by defaulting the config filename this behavior was being disabled. Fixes angular#5770
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Versions.
$ ng version
_ _ ____ _ ___
/ \ _ __ __ _ _ | | __ _ _ __ / | | | |
/ △ \ | ' \ / _
| | | | |/ _
| '| | | | | | |/ ___ | | | | (| | || | | (| | | | || | | |
// __| ||_, |_,||_,|| _|||
|___/
@angular/cli: 1.0.0
node: 6.9.2
os: win32 x64
@angular/common: 4.0.1
@angular/compiler: 4.0.1
@angular/core: 4.0.1
@angular/forms: 4.0.1
@angular/http: 4.0.1
@angular/platform-browser: 4.0.1
@angular/platform-browser-dynamic: 4.0.1
@angular/router: 4.0.1
@angular/cli: 1.0.0
@angular/compiler-cli: 4.0.1
Repro steps.
Add a tslint.json file in a directory under src that has rules different than the
cli defaults (see log below).
The log given by the failure.
$ ng new ng-lint-issue > /dev/null
$ cd ng-lint-issue
$ mkdir src/app/new-rules
$ cat > src/app/new-rules/tslint.json <<EOL
$ cat > src/app/new-rules/test.ts <<EOL
$ ng lint
src/app/new-rules/test.ts[1, 22]: " should be '
Lint errors found in the listed files.
$ ./node_modules/.bin/tslint --project src/tsconfig.app.json
src/app/new-rules/test.ts[2, 22]: ' should be "
Desired functionality.
We are using multiple tslint.json files because we have modified versions of code from other projects in our src directory and do not want to rewrite them to conform to the angular-cli tslint rules. With the previous version we just included the tslint.json from the original project in the sub directory. This worked in earlier versions (1.0.0-beta.26).
We are also thinking about using them to override the default component/directive prefix in feature modules as a workaround for #3452.
Mention any other details that might be useful.
The text was updated successfully, but these errors were encountered: