eslint-config-ghyston
Usage
Core
npm install --save-dev @ghyston/eslint-config-ghyston
- Install the following peer dependencies, deleting where necessary:
npm install --save-dev @typescript-eslint/eslint-plugin eslint eslint-plugin-import eslint-plugin-unused-imports
- Then add the following to your
.eslintrc
file:
{
"extends": [
"@ghyston/eslint-config-ghyston"
]
}
Modules
React
See React configuration
Jest
See Jest configuration
Development
Setup
npm install
Editing the config
- Make changes to any of the
index.js
file
Adding new config
- Create a new folder for the config in root
- Add an
index.js
file - Add a
README.md
file - Add a link to the new config in the modules section
Testing the changes locally
- Update the version number in the
package.json
file e.g. 1.0.0
- Create a folder somewhere to store a local copy of the package e.g.
~/npm-test-packages
npm pack --pack-destination ~/npm-test-packages
- Add the following to the
package.json
file of the project you want to test the changes in. Make sure you use the correct version number:
{
"devDependencies": {
"@ghyston/eslint-config-ghyston": "file:~/npm-test-packages/eslint-config-ghyston-1.0.0.tgz"
}
}
Publishing
To publish you'll need to be part of the Ghyston organisation, contact an existing member to be added.
Checkout main and run the following:
npm login
./publish.sh patch
(or minor
, or major
)