Skip to content

Commit

Permalink
Merge pull request #1 from Katletos/eslint
Browse files Browse the repository at this point in the history
add eslint to src project
  • Loading branch information
Katletos authored Aug 18, 2024
2 parents 8228b2a + a9e0f78 commit 6341b49
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import globals from 'globals';
import pluginJs from '@eslint/js';

export default [
{
languageOptions: { globals: globals.browser },
},
pluginJs.configs.recommended,
];
6 changes: 5 additions & 1 deletion src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@
"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": {
"@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",
Expand Down
1 change: 1 addition & 0 deletions test/file_existence.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const expectedFilesInDistDir = [

'index.html',

'eslint.config.mjs',
'js/',
'js/app.js',
'js/vendor/',
Expand Down

0 comments on commit 6341b49

Please sign in to comment.