You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We will reformat the configuration file from its current form to the following:
266
268
267
269
```js
268
-
// ...
270
+
importglobalsfrom'globals'
271
+
269
272
exportdefault [
270
273
{
271
-
files: ["**/*.js"],
274
+
files: ['**/*.js'],
272
275
languageOptions: {
273
-
sourceType:"commonjs",
274
-
globals: {
275
-
...globals.node,
276
-
},
277
-
ecmaVersion:"latest",
276
+
sourceType:'commonjs',
277
+
globals: { ...globals.node },
278
+
ecmaVersion:'latest',
278
279
},
279
280
},
280
281
]
@@ -289,15 +290,15 @@ Finally, the _ecmaVersion_ property is set to "latest". This sets the ECMAScript
289
290
We want to make use of [ESLint's recommended](https://eslint.org/docs/latest/use/configure/configuration-files#using-predefined-configurations) settings along with our own. The _@eslint/js_ package we installed earlier provides us with predefined configurations for ESLint. We'll import it and enable it in the configuration file:
This includes a rule that warns about <em>console.log</em> commands. Disabling a rule can be accomplished by defining its "value" as 0 or "off" in the configuration file. Let's do this for the _no-console_ rule in the meantime.
442
+
This includes a rule that warns about <em>console.log</em> commands which we don't want to use. Disabling a rule can be accomplished by defining its "value" as 0 or _off_ in the configuration file. Let's do this for the _no-console_ rule in the meantime.
@@ -468,54 +460,36 @@ This includes a rule that warns about <em>console.log</em> commands. Disabling a
468
460
Disabling the no-console rule will allow us to use console.log statements without ESLint flagging them as issues. This can be particularly useful during development when you need to debug your code. Here's the complete configuration file with all the changes we have made so far:
0 commit comments