Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ESLint #3152

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading