Skip to content

Commit

Permalink
Jshint for prod and dev build
Browse files Browse the repository at this point in the history
  • Loading branch information
dyuvzhenko committed Nov 14, 2017
1 parent fb7f7f0 commit a1ae6f7
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
File renamed without changes.
30 changes: 28 additions & 2 deletions webpack/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ _loaders = [{
test: /\.js$/,
exclude: /node_modules/,
loader: 'babel-loader?presets[]=es2015'
}, {
// './src/*.js', './src/modules/*.js'
test: /\.\.\/src\/[a-z]*\.js/,
exclude: /node_modules/,
enforce: 'pre',
loader: 'jshint-loader',
options: Object.assign({}, require('../.jshintrc.json'), require('../src/.jshintrc.json'))
}];

let configEnv = {};
Expand All @@ -32,11 +39,30 @@ if (ENV === 'development') {

module: {
loaders: [..._loaders, {
test: /\.js$/,
// './test/*Spec.js'
test: /\.[/]test[/][a-z*]\.js/,
exclude: /node_modules/,
enforce: 'pre',
loader: 'jshint-loader',
options: require('../.jshintrc.json')
options: Object.assign({}, require('../.jshintrc.json'), {
node: true,
globals: {
angular: false,
inject: false,
jQuery: false,
jasmine: false,
afterEach: false,
beforeEach: false,
ddescribe: false,
describe: false,
expect: false,
iit: false,
it: false,
spyOn: false,
xdescribe: false,
xit: false
}
})
}
]},

Expand Down

0 comments on commit a1ae6f7

Please sign in to comment.