<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ambika</title>
    <description>The latest articles on DEV Community by Ambika (@ambika_vaish_e5986546d9fe).</description>
    <link>https://dev.to/ambika_vaish_e5986546d9fe</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3328106%2F411d9e97-74a1-4cd4-8f0b-2a663f8df06c.png</url>
      <title>DEV Community: Ambika</title>
      <link>https://dev.to/ambika_vaish_e5986546d9fe</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ambika_vaish_e5986546d9fe"/>
    <language>en</language>
    <item>
      <title>Major Differences between ESLint v9 and Previous Versions:</title>
      <dc:creator>Ambika</dc:creator>
      <pubDate>Mon, 07 Jul 2025 14:08:41 +0000</pubDate>
      <link>https://dev.to/ambika_vaish_e5986546d9fe/major-differences-between-eslint-v9-and-previous-versions-4jj7</link>
      <guid>https://dev.to/ambika_vaish_e5986546d9fe/major-differences-between-eslint-v9-and-previous-versions-4jj7</guid>
      <description>&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Feature&lt;/th&gt;
&lt;th&gt;ESLint v9+ (Flat Config)&lt;/th&gt;
&lt;th&gt;ESLint v8 and below (.eslintrc)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Config Format&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;JavaScript-only &lt;strong&gt;flat&lt;/strong&gt; config (&lt;code&gt;eslint.config.js&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;JSON, YAML, or JS (&lt;code&gt;.eslintrc&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;File Structure&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;Flat array&lt;/strong&gt; of config objects (more predictable merge order)&lt;/td&gt;
&lt;td&gt;Hierarchical and deep merging of config&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Config File Name&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;eslint.config.js&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;.eslintrc.js&lt;/code&gt;, &lt;code&gt;.eslintrc.json&lt;/code&gt;, etc.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Plugins&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Must be imported &lt;strong&gt;explicitly&lt;/strong&gt; using &lt;code&gt;import&lt;/code&gt; or &lt;code&gt;require&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Auto-loaded by name convention&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Extends&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;No &lt;code&gt;extends&lt;/code&gt; keyword — you &lt;strong&gt;spread config&lt;/strong&gt; into the array manually&lt;/td&gt;
&lt;td&gt;Uses &lt;code&gt;extends: 'airbnb-base'&lt;/code&gt; etc.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Performance&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Faster, deterministic resolution order&lt;/td&gt;
&lt;td&gt;Slower with more complex merging&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Scoping&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Config applies only to matching files (using &lt;code&gt;files&lt;/code&gt;/&lt;code&gt;ignores&lt;/code&gt;)&lt;/td&gt;
&lt;td&gt;Can be inherited by directory hierarchy&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;TypeScript Support&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Better integration with &lt;code&gt;@eslint/js&lt;/code&gt; and modern bundlers&lt;/td&gt;
&lt;td&gt;Requires additional setup or plugin support&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;Config Format
Flat Config (ESLint v9)
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import js from '@eslint/js';
export default [
  js.configs.recommended,
  {
    rules: {
      'eqeqeq':'error',
    },
  },
];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Old Config&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;module.exports = {
  extends: ['eslint:recommended'],
  rules: {
   'eqeqeq':'error',
  },
};

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;File Structure: Flat vs Nested
Flat Config (v9): No inheritance, flat array.Each config block is evaluated in order, top-down.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export default [
  {
    files: ['**/*.js'],
    rules: {
      'no-console': 'warn',
    },
  },
  {
    files: ['src/**/*.js'],
    rules: {
      'no-console': 'error',
    },
  },
];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Nested: Deep merge + inheritance. ESLint merges configs up the directory tree.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// root/.eslintrc.js
module.exports = {
  rules: {
    'no-console': 'warn',
  },
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// root/src/.eslintrc.js
module.exports = {
  rules: {
    'no-console': 'error', // overrides parent
  },
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Extends vs Import
Flat Config (v9): No extends, uses direct imports
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import js from '@eslint/js';
import airbnb from 'eslint-config-airbnb-base';

export default [
  js.configs.recommended,
  ...airbnb, // must be spread manually if it's an array
];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;.eslintrc: Uses extends keyword&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;module.exports = {
  extends: ['eslint:recommended', 'airbnb-base'],
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Plugins Usage: Flat Config: Plugins must be imported manually
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import js from '@eslint/js';
import myPlugin from 'eslint-plugin-myplugin';

export default [
  js.configs.recommended,
  {
    plugins: {
      my: myPlugin,
    },
    rules: {
      'my/custom-rule': 'error',
    },
  },
];
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;.eslintrc: Plugins are auto-loaded by name&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;module.exports = {
  plugins: ['myplugin'],
  rules: {
    'myplugin/custom-rule': 'error',
  },
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>EsLint SetUp</title>
      <dc:creator>Ambika</dc:creator>
      <pubDate>Mon, 07 Jul 2025 14:05:19 +0000</pubDate>
      <link>https://dev.to/ambika_vaish_e5986546d9fe/eslint-setup-1d8h</link>
      <guid>https://dev.to/ambika_vaish_e5986546d9fe/eslint-setup-1d8h</guid>
      <description>&lt;p&gt;Inorder to install EsLint in your application , you need node.js in your system. &lt;/p&gt;

&lt;p&gt;1.Install Node.js.&lt;br&gt;
2.create project(workspace)&lt;br&gt;
3.package.json should be there first for eslint.&lt;br&gt;
4.npm init                            creates package.json&lt;br&gt;
5.npm install eslint -g               for installing globally&lt;br&gt;
6.npm install eslint --save-dev       for locally in the application&lt;br&gt;
7.eslint -v                           gives version of eslint&lt;br&gt;
8.eslint --init                       to create config file for eslint(it can be of type yaml, json, js).&lt;br&gt;
9.eslintrc.json will be created and eslint dependency will be added in package.json&lt;/p&gt;

&lt;p&gt;NOTE: In ESLint v9, the config file format defaults to the new flat config (e.g., eslint.config.js or .mjs), which is more flexible and powerful than the old .eslintrc format. And type is JavaScript (JS).&lt;/p&gt;

</description>
    </item>
    <item>
      <title>ESLint Inrtoduction</title>
      <dc:creator>Ambika</dc:creator>
      <pubDate>Mon, 07 Jul 2025 13:53:50 +0000</pubDate>
      <link>https://dev.to/ambika_vaish_e5986546d9fe/eslint-1ild</link>
      <guid>https://dev.to/ambika_vaish_e5986546d9fe/eslint-1ild</guid>
      <description>&lt;p&gt;Linting is identifying problem and syntax error in JS code. JS is dynamic language and loosely typed. we can write as we want. Like that of freeness it gives can be chance of bad code.&lt;br&gt;
eg:--function with no return type, no semicolon. code will work but in edge scenarios it will fails.&lt;/p&gt;

&lt;p&gt;ESLint is useful tool for JS application to find bugs and styling. Its the most popular js linter. Its popular because it allows use to write customized rules as per application need.&lt;/p&gt;

&lt;p&gt;The term lint is a static code analysis tool used to flag programming error, bugs, stylish errors and suspicious constructs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F56c8v55z452a14nrppqu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F56c8v55z452a14nrppqu.png" alt="Image description" width="654" height="358"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In above example, function returns true only when the number is positive. Variable x is defined but not used in the code.&lt;br&gt;
The code works but it will break through error in edge scenarios.&lt;/p&gt;

&lt;p&gt;ESLint will try to find x is used or not anywhere and value is returned in all scenarios in function. ESLint statically analyze your code to quickly find problems. ESLint is built into most text editors, and you can run EsLint as part of your continuous integration pipeline.&lt;br&gt;
Many problems EsLint finds can automatically fixed using the --fix option.&lt;/p&gt;

&lt;p&gt;ESLint uses Espree for JS parsing .&lt;br&gt;
ESLint usese an AST to evaluate patterns in code&lt;br&gt;
ESLint is completely pluggable .Every single rule is a plugin, and you can add more at runtime.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
