eslint-config-domdomegg
Personal preset for ESLint, set up for any JavaScript or TypeScript projects (including support for JSX and React).
Usage
Install ESLint and this library with:
npm install --save-dev eslint eslint-config-domdomegg
Enable it by adding a .eslintrc.js
file with:
module.exports = {
extends: ['eslint-config-domdomegg'],
rules: {
},
};
Generally if an ESLint config exists, I put my personal styles first in the 'extends' array (so the project-specific rules overwrite it).
You can add a lint script to package.json
that looks like:
{
"scripts": {
"lint": "eslint --ext .js,.jsx,.ts,.tsx ."
}
}
And then you can run:
npm run lint
npm run lint -- --fix
Contributing
Pull requests are welcomed on GitHub! To get started:
- Install Git and Node.js
- Clone the repository
- Install dependencies with
npm install
- Run
npm run test
to run tests
Releases
Versions follow the semantic versioning spec.
To release:
- Use
npm version <major | minor | patch>
to bump the version - Run
git push --follow-tags
to push with tags - Wait for GitHub Actions to publish to the NPM registry.