eslint-config-unosquare

raw JSON →
0.20.0 verified Fri May 01 auth: no javascript

Unosquare's shared ESLint configuration, version 0.20.0, providing a consistent code style setup for JavaScript/TypeScript projects. This package includes standard ESLint rules alongside Prettier integration for automatic formatting. Unlike generic configs, this one is tailored for Unosquare's internal projects but can be used by others. It actively releases to match ESLint and Prettier updates. Requires ESLint 8.57.0 and Prettier 3.0.0. Supports both CommonJS and ESM via the main entry point.

error Failed to load plugin 'prettier' declared in 'eslint-config-unosquare': Cannot find module 'eslint-plugin-prettier'
cause eslint-plugin-prettier is not installed automatically; it's a transitive peer dependency.
fix
Run npm install eslint-plugin-prettier --save-dev
error Configuration for rule 'no-unused-vars' is invalid
cause Custom rules conflict with default config; extend config incorrectly.
fix
Remove conflicting rule definitions or adjust your .eslintrc to override correctly.
deprecated ESLint 8 reaches end of life; consider upgrading to ESLint 9 and using flat config.
fix Update to a future version that supports ESLint 9 or switch to flat config manually.
gotcha Prettier version must be exactly 3.0.0; newer or older versions may cause formatting conflicts.
fix Ensure Prettier 3.0.0 is installed as a dev dependency.
npm install eslint-config-unosquare
yarn add eslint-config-unosquare
pnpm add eslint-config-unosquare

Extend your ESLint configuration with Unosquare's shared config using the extends property.

// .eslintrc.js
module.exports = {
  extends: [
    'eslint-config-unosquare'
  ]
};

// Or with plugins:
module.exports = {
  extends: [
    'unosquare', // shorthand for 'eslint-config-unosquare'
  ],
  rules: {
    // Your custom rules
  }
};