I have this directory that was part of the template, and I want to exclude it on linting. I already excluded it on tsconfig and eslint. runnig eslint it works fine, but when doing ng build
it will include the directory on linting and will produce errors.
The subject directory is src/fuse.
I already added this to my config.
eslintignore
build/
dist/
www/
src/@fuse/
eslintrc
"ignorePatterns": [
"src/@fuse/**/*",
"./src/@fuse/**/*",
"src/@fuse",
"./src/@fuse"
],
tsconfig
"exclude": ["./src/@fuse", "src/@fuse"]
When doing ng build
I will get this. It still apply the linting even it was excluded
2
Answers
While I'm fiddling with the config, and found out that
angular.json
usingtsconfig.app.json
and thetsconfig.app.json
is extending thetsconfig.json
, I proceed to edit thetsconfig.app.json
to override some configs. This way it still gives me the full strictness while editing and loosen a bit when building.Here is a part of the
angular.json
While this is my
tsconfig.json
And the
tsconfig.app.json
that used byangular.json
and extnds bytsconfig.json
I think they are not lint errors, lint errors show up only when you do
ng lint
, these are build errors due to the configuration oftsconfig.json
.Try toggling these properties and check if it works. Else just fix these error, since its necessary for the build to run!