#atom

JavaScript and TypeScript code quality tool that identifies and fixes problems

Core Idea: ESLint is a static code analysis tool that identifies problematic patterns in JavaScript and TypeScript code, helping developers maintain consistent code style and avoid bugs.

Key Elements

// Basic .eslintrc.js configuration
module.exports = {
  env: {
    browser: true,
    es2021: true,
    node: true,
  },
  extends: [
    'eslint:recommended',
    'plugin:react/recommended',
    'plugin:@typescript-eslint/recommended',
  ],
  parser: '@typescript-eslint/parser',
  parserOptions: {
    ecmaFeatures: {
      jsx: true,
    },
    ecmaVersion: 12,
    sourceType: 'module',
  },
  plugins: [
    'react',
    '@typescript-eslint',
  ],
  rules: {
    'indent': ['error', 2],
    'quotes': ['error', 'single'],
    'semi': ['error', 'always'],
  },
};

Connections

References

  1. ESLint Official Documentation: https://eslint.org/docs/latest/
  2. "JavaScript Linting and Formatting with ESLint" by Nicholas C. Zakas

#javascript #typescript #linting #code-quality #static-analysis


Connections:


Sources: