An ESLint shareable config for Node, React and Next projects.
npm install eslint @magno/eslint-config --save-dev
# or using Yarn
yarn add eslint @magno/eslint-config --dev
Create a .eslintrc.js
file in your root project directory and extend the config you want to use.
module.exports = {
extends: "@magno/eslint-config/node",
};
module.exports = {
extends: "@magno/eslint-config/react",
};
module.exports = {
extends: "@magno/eslint-config/next",
};
If you would like to customize the Prettier settings, create a file named prettier.config.js
in your root project directory. The following is an example of a configuration file that matches the default settings:
module.exports = {
printWidth: 80,
tabWidth: 2,
useTabs: false,
semi: true,
singleQuote: true,
jsxSingleQuote: false,
trailingComma: 'all',
bracketSpacing: true,
arrowParens: 'always',
};
- Fork it!
- Create your feature branch
git checkout -b feature/my-new-feature
- Commit your changes
git commit -m "feat: add some feature"
- Push to the branch
git push origin feature/my-new-feature
- Submit a pull request
If you discover a security vulnerability within this project, please send an e-mail to Magno Biét via [email protected]. All security vulnerabilities will be promptly addressed.
This package is licensed under the MIT license. Copyright © Magno Biét.