Comments (4)
Problems occur with webpack 4
together with gulp/webpack-stream
. In this case the fileName is omitted completely leaving:
[3, 17]: Type boolean trivially inferred from a boolean literal, remove type annotation
while e.g ts-loader
displays:
[tsl] ERROR in path/to.ts(35,5)
TS2531: Object is possibly 'null'.
from tslint-loader.
@almondtools any workaround? I'm experiencing the same issue. Super frustrating when enabling tslint on an existing codebase. Could take a long time to hunt down these errors.
from tslint-loader.
I tried to fix this issue in a fork, yet this lets every unit test fail. So this would have meant a complete API change and I think it should be confirmed by the project owner.
However I found out that a custom formatter has access to more information. Look at the file customFormatter.js and prepend failure.fileName
to positionTuple
. To include a custom formatter you have to configure the formatter directory and the name of the new formatter.
from tslint-loader.
Took some trial-and-error to get it right.
Options:
{
formatter: 'michael',
formattersDirectory: 'tslint-formatters'
}
I created the file tslint-formatters/michaelFormatter.js
and copied/pasted the contents of customFormatter.js linked above. I made the one tweak @almondtools mentioned. No need to change the Formatter name in the file.
Thanks for the help!
from tslint-loader.
Related Issues (20)
- version mismatch with npm repo
- Using old TSLint version
- tslint-loader ignores linterOptions.exclude HOT 1
- [email protected] throws some warning with webpack 4 + vue-loader HOT 6
- Warning: The 'no-array-mutation' rule requires type information. HOT 1
- Performance issues HOT 1
- Version 3.6.0 in npm but 3.5.4 in master package.json. HOT 7
- I use Vue sfc, ts-loader will check html and css, but I don't want that HOT 4
- Is it possible to ignore no-default-export for vue files?
- Getting `Tried to lint` errors in tslint-loader HOT 6
- Module build failed with webpack4
- Support query strings for loader options HOT 1
- Failed to minify the code HOT 1
- Bundle all errors as tslint.report.xml HOT 2
- Webpack 4 support
- Type checking module build fails when consuming TS files from an `npm link`ed package HOT 2
- Support webpack 4 HOT 2
- Release new version with fix for webpack 4 HOT 6
- Error with webpack 4 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tslint-loader.