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)
|
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
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:
tslint.json(example below)ionic-app-scripts lint{ "linterOptions": { "exclude": ["src/pages/**/*"] }, ... }Which @ionic/app-scripts version are you using?
3.1.0Other 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
The above function should be something like this:
Possibly related PR: #1204