mirror of
https://github.com/abhijithvijayan/web-extension-starter.git
synced 2025-10-07 07:22:37 +02:00
add lint scripts & apply lint fixes
This commit is contained in:
parent
a04a8e25d6
commit
c308afa91b
@ -9,7 +9,9 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "webpack",
|
"build": "webpack",
|
||||||
"start": "webpack-dev-server"
|
"start": "webpack-dev-server",
|
||||||
|
"lint": "eslint .",
|
||||||
|
"lint:fix": "eslint . --fix"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.6.4",
|
"@babel/core": "^7.6.4",
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
console.log("Hello World from background main file!");
|
console.log('Hello World from background main file!');
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
console.log("Hello World from options main file!");
|
console.log('Hello World from options main file!');
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
console.log("Hello World from popup main file!");
|
console.log('Hello World from popup main file!');
|
||||||
|
|||||||
@ -31,12 +31,12 @@ module.exports = {
|
|||||||
entry: {
|
entry: {
|
||||||
background: './src/scripts/background.js',
|
background: './src/scripts/background.js',
|
||||||
popup: './src/scripts/popup.js',
|
popup: './src/scripts/popup.js',
|
||||||
options: './src/scripts/options.js'
|
options: './src/scripts/options.js',
|
||||||
},
|
},
|
||||||
|
|
||||||
output: {
|
output: {
|
||||||
filename: '[name].[chunkhash].js',
|
filename: '[name].[chunkhash].js',
|
||||||
path: path.resolve(__dirname, 'extension')
|
path: path.resolve(__dirname, 'extension'),
|
||||||
},
|
},
|
||||||
|
|
||||||
plugins: [new webpack.ProgressPlugin(), new HtmlWebpackPlugin()],
|
plugins: [new webpack.ProgressPlugin(), new HtmlWebpackPlugin()],
|
||||||
@ -55,13 +55,13 @@ module.exports = {
|
|||||||
[
|
[
|
||||||
'@babel/preset-env',
|
'@babel/preset-env',
|
||||||
{
|
{
|
||||||
modules: false
|
modules: false,
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
]
|
],
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
optimization: {
|
optimization: {
|
||||||
@ -69,18 +69,18 @@ module.exports = {
|
|||||||
cacheGroups: {
|
cacheGroups: {
|
||||||
vendors: {
|
vendors: {
|
||||||
priority: -10,
|
priority: -10,
|
||||||
test: /[\\/]node_modules[\\/]/
|
test: /[\\/]node_modules[\\/]/,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
chunks: 'async',
|
chunks: 'async',
|
||||||
minChunks: 1,
|
minChunks: 1,
|
||||||
minSize: 30000,
|
minSize: 30000,
|
||||||
name: true
|
name: true,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
devServer: {
|
devServer: {
|
||||||
open: true
|
open: true,
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user