mirror of
https://github.com/h5bp/html5-boilerplate.git
synced 2026-01-07 22:04:06 -05:00
Add ESLint (#3152)
* add eslint to src project * fix test --------- Co-authored-by: Rob Larsen <rob@htmlcssjavascript.com>
This commit is contained in:
9
src/eslint.config.mjs
Normal file
9
src/eslint.config.mjs
Normal file
@@ -0,0 +1,9 @@
|
||||
import globals from 'globals';
|
||||
import pluginJs from '@eslint/js';
|
||||
|
||||
export default [
|
||||
{
|
||||
languageOptions: { globals: globals.browser },
|
||||
},
|
||||
pluginJs.configs.recommended,
|
||||
];
|
||||
@@ -11,14 +11,18 @@
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"start": "webpack serve --open --config webpack.config.dev.js",
|
||||
"build": "webpack --config webpack.config.prod.js"
|
||||
"lint": "eslint ./js --fix",
|
||||
"build": "npm run lint && webpack --config webpack.config.prod.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
"copy-webpack-plugin": "^13.0.0",
|
||||
"html-webpack-plugin": "^5.6.3",
|
||||
"webpack": "^5.99.9",
|
||||
"webpack-cli": "^6.0.1",
|
||||
"webpack-dev-server": "^5.2.1",
|
||||
"webpack-merge": "^6.0.1"
|
||||
"@eslint/js": "^9.9.0",
|
||||
"copy-webpack-plugin": "^11.0.0",
|
||||
"eslint": "^8.57.0",
|
||||
"globals": "^15.9.0",
|
||||
"html-webpack-plugin": "^5.6.0",
|
||||
"webpack": "^5.92.1",
|
||||
"webpack-cli": "^5.1.4",
|
||||
"webpack-dev-server": "^5.0.4",
|
||||
"webpack-merge": "^5.10.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ const expectedFilesInDistDir = [
|
||||
|
||||
'index.html',
|
||||
|
||||
'eslint.config.mjs',
|
||||
'js/',
|
||||
'js/app.js',
|
||||
'js/vendor/',
|
||||
|
||||
Reference in New Issue
Block a user