This repository was archived by the owner on May 1, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 312
Can't override linterOptions in tslint.jsonΒ #1463
Copy link
Copy link
Open
Description
Short description of the problem:
Adding linterOptions to tslint.json has no effect.
What behavior are you expecting?
Adding linterOptions to tslint.json should work, e.g. exclude some project files from linting.
Steps to reproduce:
- Create a new project
- Add some linter options to
tslint.json(example below) - Edit home page code and introduce a linting error
- Run
ionic-app-scripts lint
{
"linterOptions": {
"exclude": ["src/pages/**/*"]
},
...
}Which @ionic/app-scripts version are you using?
3.1.0
Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
ionic-app-scripts/src/lint/lint-factory.ts
Lines 80 to 84 in ab96e23
| export function getTsLintConfig(tsLintConfig: string, linterOptions?: LinterOptions): LinterConfig { | |
| const config = Configuration.loadConfigurationFromPath(tsLintConfig); | |
| Object.assign(config, isObject(linterOptions) ? {linterOptions} : {}); | |
| return config; | |
| } |
The above function should be something like this:
const mergedLinterOptions = Object.assign({}, config.linterOptions, linterOptions);
Object.assign(config, { linterOptions: mergedLinterOptions });Possibly related PR: #1204
necsmike, janraasch and maksymilian-majer
Metadata
Metadata
Assignees
Labels
No labels