You are apparently trying to use examples for webpack v1 with webpack v2. Straight from the changelog:
module: {
- preLoaders: [
+ rules: [
{
test: /\.js$/,
+ enforce: "pre",
loader: "eslint-loader"
}
]
}