eslint-config-prestashop
raw JSON → 0.2.1 verified Sat Apr 25 auth: no javascript
PrestaShop's official shareable ESLint config based on Airbnb Base style guide. Version 0.2.1 requires eslint-config-airbnb-base ^15.0.0 and eslint-plugin-import ^2.25.3. Config is applied via `extends: 'prestashop'` and supports integration with `npx eslint --init`. Maintained by PrestaShop team for projects following their JavaScript styleguide.
Common errors
error Error: Cannot find module 'eslint-config-prestashop' ↓
cause Missing peer dependencies or wrong install
fix
Run: npm install --save-dev eslint-config-prestashop eslint-config-airbnb-base eslint-plugin-import eslint
error Configuration for rule "import/no-unresolved" is invalid ↓
cause Incompatible version of eslint-plugin-import
fix
Update eslint-plugin-import to ^2.25.3
error ESLint couldn't find the config "prestashop" after the package was installed. ↓
cause Typo in extends value or incorrect file path
fix
Ensure extends is exactly 'prestashop' (no extra hyphens or prefix)
Warnings
gotcha Do not include 'eslint-config-' prefix in the extends value; use just 'prestashop'. ↓
fix Use extends: 'prestashop' instead of extends: 'eslint-config-prestashop'.
breaking Requires eslint-config-airbnb-base ^15.0.0; older versions may be incompatible. ↓
fix Ensure eslint-config-airbnb-base is version ^15.0.0 or higher.
breaking Requires eslint-plugin-import ^2.25.3; older versions may be incompatible. ↓
fix Ensure eslint-plugin-import is version ^2.25.3 or higher.
deprecated The config may not be actively updated for latest ESLint versions; check compatibility. ↓
fix Verify with your ESLint version and consider forking if needed.
Install
npm install eslint-config-prestashop yarn add eslint-config-prestashop pnpm add eslint-config-prestashop Imports
- eslint-config-prestashop wrong
extends: 'eslint-config-prestashop'correctextends: 'prestashop' in .eslintrc - default config wrong
const config = require('eslint-config-prestashop');correctmodule.exports = { extends: 'prestashop' }
Quickstart
// .eslintrc.json
{
"extends": "prestashop"
}
// Then install dependencies:
// npm install --save-dev eslint-config-prestashop eslint-config-airbnb-base eslint-plugin-import eslint