Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(eslint): migrate eslint configuration .eslintrc.js to eslint.co…
…nfig.mjs (#205) This pr converts the existing .eslintrc.js configuration file to the latest eslint format, eslint.config.mjs, and includes necessary updates to related libraries to support this change. a .nvmrc file specifying v20.9.0 has also been added to ensure compatibility with eslint’s minimum version requirements. the update ensures that the original eslint configuration is adapted to the flat config format while maintaining consistent functionality with typescript, react, and prettier plugins and recommended rules. **Why**: the main goal of this change is to adopt eslint’s latest configuration style, making maintenance easier and leveraging the flexibility of the flat config structure. this approach is expected to bring several benefits: * adoption of the latest module standard: the flat config format uses the latest ecmascript module (esm) standard, allowing for more flexible application of javascript features in configuration. * improved maintainability and extensibility: by updating plugins, we are now using versions optimized for flat config. this transition also prepares us to more easily adapt to future eslint version updates. * node version compatibility: a .nvmrc file specifying v20.9.0 has been added to ensure compatibility with [eslint’s minimum version requirements, as the latest eslint requires node.js version 18.18.0, 20.9.0, or 21.1.0 and above](https://eslint.org/docs/latest/use/getting-started#prerequisites). this change helps ensure that all environments using this repository align with the required node version. **How**: * configuration migration: all configurations from .eslintrc.js were transferred to eslint.config.mjs and adapted to the flat config format, ensuring functional parity with the previous setup. * library updates: major eslint-related plugins (typescript, react, prettier) were updated to their latest versions, supporting the new configuration style. * node version specification: a .nvmrc file was added with v20.9.0 to meet eslint’s minimum node version requirements, ensuring compatibility across environments. * environment and global variable consistency: the environment variables and global options (browser, es2021, node) from the previous configuration were applied consistently in the flat config, ensuring that the setup performs identically to the former .eslintrc.js configuration. this transition modularizes the eslint configuration with the latest standards, improving maintainability and allowing for greater flexibility in accommodating future eslint and plugin updates.
- Loading branch information