I am using VS Code to work on a web page (using Leaflet). In my index.html I run the JS with:
<script type="module" src="js/main.js"></script>
I am using an ESLint plugin with VS Code and I want it to use strict JS rules for the linting, but though I have a “use strict”; at the top of main.js, it is only showing problems for non-strict issues.
I have an eslint.config.js file in the root of my project which looks like this:
import globals from "globals";
import pluginJs from "@eslint/js";
export default [
{languageOptions: { globals: globals.browser }},
pluginJs.configs.recommended,
];
What do I need to change to get ESLint to get it to respond to the “use strict”; command and what to do to make it the default so it’s not needed?
Thanks