Socket
Book a DemoInstallSign in
Socket

@localazy/eslint-config

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@localazy/eslint-config

Unified ESLint configuration for Localazy projects

1.3.0
latest
Source
npmnpm
Version published
Weekly downloads
291
18.78%
Maintainers
2
Weekly downloads
 
Created
Source

Localazy

📦 @localazy/eslint-config

Unified ESLint configuration for Localazy projects

🚀 Quick Start

Install the package using your preferred package manager:

# Using npm
npm install eslint @localazy/eslint-config --save-dev

# Using yarn
yarn add eslint @localazy/eslint-config --dev

# Using pnpm
pnpm add eslint @localazy/eslint-config --save-dev

Note: This package requires ESLint 9.0.0 or higher.

🔧 Usage

Basic Usage

Create or update your eslint.config.js file:

import { localazy } from '@localazy/eslint-config';

export default localazy();

Advanced Usage

The localazy() function accepts an options object that allows you to customize the ESLint configuration:

import { localazy } from '@localazy/eslint-config';

export default localazy({
  // Add your custom ESLint configurations
  userConfigs: [
    {
      rules: {
        // Override or disable specific rules
        'no-console': 'warn',
        'annoying-rule': 'off'
      }
    }
  ],

  // Specify files to ignore
  ignores: [
    'build/**',
    'dist/**',
    'coverage/**'
  ],
});

⚙️ Configuration Options

userConfigs

User-defined ESLint configurations that will be merged with the default Localazy ESLint configuration.

{
  userConfigs: [
    {
      rules: {
        'no-console': 'warn',
        'prefer-const': 'error'
      }
    }
  ]
}

ignores

List of glob patterns for files to be ignored by ESLint. These patterns will be added to the ignore list in addition to files from .gitignore.

{
  ignores: [
    'build/**',
    'dist/**',
    'coverage/**',
    'node_modules/**'
  ]
}

features

Feature flags to enable or disable specific ESLint plugins and behaviors:

FeatureDescriptionDefault
gitignoreExclude files listed in .gitignore from being lintedtrue
dtsEnable linting for TypeScript declaration (.d.ts) filestrue
prettierEnable the Prettier plugintrue
forceJsExtensionsRequire .js file extensions in import statements and autofix themfalse
forcePathAliasesForce the use of configured TypeScript path aliases instead of relative imports and autofix themfalse
vue2Enable Vue 2 supportfalse
vue3Enable Vue 3 supportfalse

Example:

{
  features: {
    vue2: true,
    forceJsExtensions: true,
  }
}

settings

Configuration settings for ESLint plugins:

TypeScript Settings

{
  settings: {
    ts: {
      // Path to the TypeScript project configuration file
      project: 'tsconfig.json',

      // Project root directory
      tsconfigRootDir: import.meta.dirname,
    }
  }
}

GitIgnore Settings

{
  settings: {
    gitignore: {
      // Path to .gitignore file or files
      paths: ['.gitignore'] // default
    }
  }
}

🔌 Included Configurations

This ESLint configuration includes:

  • JavaScript: Base JavaScript rules and best practices
  • TypeScript: TypeScript-specific rules and type checking
  • Vue.js (optional): Support for both Vue 2 and Vue 3 with specific rules and best practices for each version
  • Prettier (enabled by default): Integration with Prettier for consistent code formatting
  • Import/Export: Rules for import and export statements
  • Path Aliases: Support for TypeScript path aliases

🛠️ Development

To contribute to this project:

# Install dependencies
pnpm install

# Build the package
pnpm build

# Check everything
pnpm check

📚 Documentation

For more details on ESLint configuration, visit the ESLint documentation.

📜 License

This project is licensed under the MIT License.

See LICENSE for details.

Keywords

eslint

FAQs

Package last updated on 25 Aug 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.