| User Manual | API Reference | Blog | Forum |
ESLint configuration developed by the PlayCanvas team and leveraged by many PlayCanvas-related projects, including the PlayCanvas Engine. However, you can use it for any JavaScript-based project if you approve of the PlayCanvas coding style.
- Install the package:
npm install -D @playcanvas/eslint-config eslint- Create an
eslint.config.jsfile in your project root:
import playcanvasConfig from '@playcanvas/eslint-config';
export default [
...playcanvasConfig.typescript,
// ...playcanvasConfig.react, // Uncomment if using react
// ...playcanvasConfig.legacy, // Uncomment if using legacy javascript rules
// Your custom configurations here
];Warning
The typescript and react rules are incomplete and are still being developed based on current practises and existing legacy rules
- Full flat config format support for ESLint 9+
- Comprehensive rule configuration
- Support for ESM Script JSDoc tags used in PlayCanvas
- Import ordering and validation
- Strict JSDoc validation
- Regular expression pattern enforcement
- ESLint 9 or later
- Node.js 18 or later