lint-configs v1.0.0
jslint-configs
THE best lint configurations for JS, React, Node and Jest!
Stop relying on humans to write consistent and good quality JavaScript. Use jslint-configs to ensure your code is clean from common mistakes of JavaScript/React/Node and while doing that, give your developer-productivity an unfair boost!
⭐️ Features
jslint-configs support linting for the following technologies:
- JavaScript and ES6
- Node.js
- React.js
:bulb: For quickly increasing developer's knowledge it also has respective hyperlink for each lint rule as follows:
'arrow-parens': [2, // https://eslint.org/docs/rules/arrow-parens
'as-needed',
],
💿 Installation
- For Yarn:
yarn add --dev lint-configs
- For NPM:
npm install --save-dev lint-configs
📖 About Lint Setup
The way this lint configuration is setup as follows:
- Base Configuration (Parent configuration - includes all standard JS linting rules)
- React Configuration (Inherits from Base Config - adds up all standard React.js and JSX linting rules)
- Node Configuration (Inherits from Base Config - adds up all standard Node.js linting rules)
Let the picture speak a thousand words!
🔧 Usage
- Install ESLint in your project
- Create
.eslintrc.js
at the root of your project
Vanilla JavaScript
If you want to lint only vanilla JavaScript, extend your project's .eslintrc.js
file from config-base as follows:
module.exports = {
extends: "@inam/lint-configs/index.js"
};
React.JS Linting
If you want to lint JavaScript + React.JS code, extend your project's .eslintrc.js
file from config-react as follows:
module.exports = {
extends: "@inam/lint-configs/config-react.js"
};
Node.JS Linting
If you want to lint JavaScript + Node.JS, extend your project's .eslintrc.js
file from config-node as follows:
module.exports = {
extends: "@inam/lint-configs/config-node.js"
};
❤️ Contributing
Welcome contributing!
Please use GitHub's Issues/PRs.
6 years ago