Commit 94dc3b41 authored by Yannis Barlas's avatar Yannis Barlas

linter fixes

parent 3124cef4
Pipeline #3333 failed with stages
in 3 minutes and 44 seconds
**/_build
**/node_modules
**/_build
\ No newline at end of file
**/_build
**/node_modules
......@@ -15,9 +15,9 @@ module.exports = [
presets: [
[require('babel-preset-env'), { modules: false }],
require('babel-preset-react'),
require('babel-preset-stage-2')
]
}
require('babel-preset-stage-2'),
],
},
},
// CSS Modules
......@@ -32,12 +32,10 @@ module.exports = [
options: {
modules: true,
localIdentName: '[name]_[local]-[hash:base64:8]',
}
}
]
})
},
},
],
}),
},
// SCSS Modules
......@@ -53,11 +51,11 @@ module.exports = [
modules: true,
importLoaders: 1,
localIdentName: '[name]_[local]-[hash:base64:8]',
}
},
},
'sass-loader'
]
})
'sass-loader',
],
}),
},
// global CSS
......@@ -65,9 +63,7 @@ module.exports = [
test: /\.css$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: [
'css-loader'
]
use: ['css-loader'],
}),
},
......@@ -78,9 +74,9 @@ module.exports = [
fallback: 'style-loader',
use: [
'css-loader', // TODO: importLoaders: 1?
'sass-loader'
]
})
'sass-loader',
],
}),
},
// files
......@@ -89,8 +85,8 @@ module.exports = [
loader: 'file-loader',
options: {
name: 'static/media/[name].[hash:8].[ext]',
}
}
]
}
},
},
],
},
]
......@@ -5,11 +5,10 @@ const components = require('../config/components.json')
const requireComponentsString = components
.filter(name => {
const component = require(name)
// "client" or "frontend" for backwards compatibility
return component.client || component.frontend
})
.map(name => "require('" + name + "')")
.map(name => `require('${name}')`)
.join(', ')
module.exports = {
......@@ -19,6 +18,6 @@ module.exports = {
loader: 'string-replace-loader',
options: {
search: 'PUBSWEET_COMPONENTS',
replace: '[' + requireComponentsString + ']'
}
replace: `[${requireComponentsString}]`,
},
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment