https://github.com/tsmx/eslintrc-to-flatfile
Example showing how to migrate an existing eslinrc.json to new flat file config for using ESLint v9 and above in a CommonJS project
https://github.com/tsmx/eslintrc-to-flatfile
commonjs eslint eslintrc flatfile
Last synced: 6 months ago
JSON representation
Example showing how to migrate an existing eslinrc.json to new flat file config for using ESLint v9 and above in a CommonJS project
- Host: GitHub
- URL: https://github.com/tsmx/eslintrc-to-flatfile
- Owner: tsmx
- License: mit
- Created: 2024-08-18T18:37:31.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-08-20T19:19:56.000Z (about 1 year ago)
- Last Synced: 2025-02-19T05:35:31.762Z (8 months ago)
- Topics: commonjs, eslint, eslintrc, flatfile
- Language: JavaScript
- Homepage:
- Size: 53.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# eslintrc-to-flatfile
> Example showing how to migrate an existing eslinrc.json to new flat file config for using ESLint v9 and above in a CommonJS project
This is the accompanying example project for the article on [migrating eslintrc to flat file config in a CommonJS project](https://tsmx.net/migrating-eslintrc-to-flat-config-in-commonjs/).
To follow along with the guide, clone this repo an inspect the branches for ESLint v8 (old eslintrc config) and v9 (new flat-file config).
**Note:** Since the needed dependencies change when migrating from ESLint v8 to v9 or vice versa, you'll need to do a `npm install` after switching the branch.
```bash
# clone the example project
git clone https://github.com/tsmx/eslintrc-to-flatfile.git# check out/switch to the original ESLint v8 branch using eslintrc.json
git checkout eslint-v8
npm install# check out/switch to the migrated ESLint v9 branch using new eslint.config.js
git checkout eslint-v9
npm install
```