migration from eslint-config-onepass
abhijithvijayan opened this issue · comments
This package was initially called eslint-config-onepass
The module is now deprecated in favour of @abhijithvijayan/eslint-config
Differences
- Dropped support for
eslint-plugin-html
- Uses Separate modules for
react
,javascript
,typescript
, etc... - Add new eslint rules
- Highly customisable and pluggable
See @abhijithvijayan/eslint-config
README for more info
Migration Instruction: #1 (comment)
Migration guide
Migration is just so simple. A couple of uninstalls/installs/updates is all it takes.
Follow these steps
- Remove everything. (Just to fix the dependency issues)
npm uninstall eslint-config-onepass babel-eslint eslint eslint-config-prettier eslint-config-airbnb eslint-plugin-html eslint-plugin-prettier eslint-plugin-import eslint-plugin-jsx-a11y eslint-plugin-react prettier eslint-plugin-react-hooks
- Install
@abhijithvijayan/eslint-config
# npm
npx install-peerdeps @abhijithvijayan/eslint-config --dev
# yarn
npx install-peerdeps @abhijithvijayan/eslint-config --dev --yarn
-
Update
.eslintrc.json
note: This comes with different types of modules exposed
-
JavaScript only projects
{ "extends": [ "@abhijithvijayan/eslint-config" ], "rules": { // your overrides } }
-
JavaScript + React.js
{ "extends": [ "@abhijithvijayan/eslint-config", "@abhijithvijayan/eslint-config/react", ], "rules": { // your overrides } }
If you need TypeScript / Node config, follow https://github.com/abhijithvijayan/eslint-config#typescript
-
-
Update scripts in
package.json
"scripts": {
// other scripts
"lint": "eslint . --ext .js,.ts,.tsx",
"lint:fix": "eslint . --ext .js,.ts,.tsx --fix"
},
Happy linting 🎉
Comment here if facing any problems.