Comments (9)
Just seen update, updated to tslint 4.0.1 and tslint-loader 3.0.0, same issue :)
FYI: tslint works as expected if I run from command line: tslint ./server/**/*.ts
from tslint-loader.
@jasdf2351 Does it work if you remove the tslint-loader option?
module.exports = {
entry: {
server: './bin/www.ts'
},
output: {
filename: '[name].js',
path: './build',
libraryTarget: "commonjs"
},
devtool: 'source-map',
target: 'node',
externals: [
/^[a-z-0-9]+$/ // Ignore node_modules folder
],
resolve: {
// Add in .ts as a resolvable extension.
extensions: ['.ts'],
},
resolveLoader: {
modules: ['./node_modules']
},
module: {
/* rules: [{
enforce: 'pre',
test: /.ts$/,
loader: 'tslint-loader',
exclude: /(node_modules)/
}], */
loaders: [{
test: /.ts$/,
exclude: [/node_modules/],
loader: 'awesome-typescript-loader'
}]
},
plugins
};
Just to make sure this is a problem with the tslint-loader and not with the typescript loader.
I'm not using webpack 2 yet, but in my configuration I have it like this:
{ test: /\.ts$/i, loaders: ['ts', 'tslint'], exclude: /node_modules/ },
You would have to use awesome-typescript
instead of ts
in your case.
from tslint-loader.
@jmlopez-rod Thanks for the tip, got it sorted. The docs have changed slightly since I last read them for the beta, now have:
module.exports = {
entry: {
server: './bin/www.ts'
},
output: {
filename: '[name].js',
path: './build',
libraryTarget: "commonjs"
},
devtool: 'source-map',
target: 'node',
externals: [
/^[a-z-0-9]+$/ // Ignore node_modules folder
],
resolve: {
// Add in .ts
as a resolvable extension.
extensions: ['.ts'],
modules: ['./node_modules']
},
module: {
rules: [{
enforce: 'pre',
test: /.ts$/,
loader: 'tslint-loader',
exclude: /(node_modules)/
}, {
test: /.ts$/,
loader: 'awesome-typescript-loader',
exclude: /(node_modules)/
}]
},
plugins
};
and turned on "no-any": true and it correctly spat out errors, turned it off and it's now passing.
Still does a build despite failOnHint: true being set, might just have to wait that one out do you think?
from tslint-loader.
So just to be clear, the no-any
option is from typescript right? It doesn't look like the issue is due to tslint at all then, seems more like an awesome-typescript-loader issue. Try removing the tslint-loader for moment and add several options to typescript, for instance:
noUnusedParameters
noUnusedLocals
Then declare some variable and see if your build fails.
from tslint-loader.
@jasdf2351 Is the tslint-loader
related part resolved then?
from tslint-loader.
@BlackSonic That's what it seems. I think it is safe to close issue unless @jasdf2351 has additional info. Also @jasdf2351 try to format what you post so that it easier for others to read, see https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code-and-syntax-highlighting.
from tslint-loader.
@jmlopez-rod no-any: true
is a rule from within tslint.json, tslint-loader correctly flags this as it should, a warning, however then webpack continues and does the build, I thought that failOnHint: true
would stop webpack from continuing to do the build.
Maybe it's a webpack-beta thing and might settle down when you guys have a stable webpack to test against?
Apologies for my lack of Markdown-foo, I've found the preview button :)
from tslint-loader.
No tests currently for Webpack beta, only for the stable branch.
from tslint-loader.
@BlackSonic I saw the test for failOnHint hence why I asked, thought I'd double check. Thanks for info, closing and will keep an eye out for WP2 hitting, keep up the great work.
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
- display better error messages HOT 4
- 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.