Passed
Push — feature/run-behat-tests-in-smo... ( f22186...042f4a )
by Michiel
05:22
created

webpack.config.js (7 issues)

1
var Encore = require('@symfony/webpack-encore');
2
3
Encore
4
    .setOutputPath('public/build/')
5
    .setPublicPath('/build')
6
    .cleanupOutputBeforeBuild()
7
    // Convert typescript files.
8
    .enableTypeScriptLoader()
9
    .enableLessLoader()
10
    .addStyleEntry('global', [
0 ignored issues
show
The opening parenthesis of a multi-line function call should be the last content on the line.
Loading history...
11
        './public/scss/application.scss',
12
        './vendor/surfnet/stepup-bundle/src/Resources/public/less/stepup.less'
13
    ])
0 ignored issues
show
For multi-line function calls, the closing parenthesis should be on a new line.

If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
); // Closing parenthesis on a new line.
Loading history...
14
    .addEntry('submitonload', './public/typescript/submitonload.ts')
15
    .addEntry('app', './public/typescript/app.ts')
16
17
    // Convert sass files.
18
    .enableSassLoader(function (options) {
0 ignored issues
show
The opening parenthesis of a multi-line function call should be the last content on the line.
Loading history...
19
        options.sassOptions = {
20
            outputStyle: 'expanded',
21
            includePaths: ['public'],
22
        };
23
    })
0 ignored issues
show
For multi-line function calls, the closing parenthesis should be on a new line.

If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
); // Closing parenthesis on a new line.
Loading history...
24
    .addLoader({test: /\.scss$/, loader: 'webpack-import-glob-loader'})
25
    .addLoader({
0 ignored issues
show
The opening parenthesis of a multi-line function call should be the last content on the line.
Loading history...
26
        test: /\.tsx?|\.js$/,
27
        exclude: /node_modules|vendor/,
28
        use: [{
29
            loader: 'eslint-loader',
30
            options: {
31
                configFile: 'eslint.json',
32
                emitErrors: true,
33
                failOnHint: Encore.isProduction(),
34
                typeCheck: true
35
            }
36
        }]
37
    })
0 ignored issues
show
For multi-line function calls, the closing parenthesis should be on a new line.

If a function call spawns multiple lines, the coding standard suggests to move the closing parenthesis to a new line:

someFunctionCall(
    $firstArgument,
    $secondArgument,
    $thirdArgument
); // Closing parenthesis on a new line.
Loading history...
38
    .enableSingleRuntimeChunk()
39
    .enableSourceMaps(!Encore.isProduction())
40
    // enables hashed filenames (e.g. app.abc123.css)
41
    .enableVersioning(Encore.isProduction())
0 ignored issues
show
Space after closing parenthesis of function call prohibited
Loading history...
42
;
43
44
45
module.exports = Encore.getWebpackConfig();
46