1.0.8 • Published 4 months ago

eslint-config-js-stack v1.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

Eslint Config JS Stack

ESLint and Prettier configuration for JavaScript stack, providing comprehensive and optimized setups for React and Node.js projects.

Plugins

This configuration utilizes the following ESLint plugins:

Installation

npm install eslint-config-js-stack --save-dev

Usage

To use the ESLint and Prettier configurations provided by eslint-config-js-stack, add the following to your project's ESLint configuration file:

{
  "extends": "eslint-config-js-stack/react"
  // "extends": "eslint-config-js-stack/node"
}

For React projects, use "eslint-config-js-stack/react" in the "extends" array. For Node.js projects, use "eslint-config-js-stack/node" in the "extends" array.

Overriding ESLint Configuration

You can add or override any ESLint configuration rules by creating your own .eslintrc.json file in your project and extending the eslint-config-js-stack configuration. Here's an example:

{
  "extends": [
    "eslint-config-js-stack/react",
    "my-custom-config"
  ],
  "rules": {
    "my-custom-rule": "error"
  }
}

In the example above, we extend both the eslint-config-js-stack/react configuration and another custom configuration called "my-custom-config". We can also add or override specific ESLint rules in the "rules" object.

Ignoring Files

To enhance the integration of ESLint and Prettier in your project, it's recommended to add .eslintignore and .prettierignore files to exclude certain files and directories from version control and code formatting. You can use the following examples on my gist as a starting point