0.0.1 • Published 3 years ago

@oliveiraswell/eslint-config-oliveiraswell-js v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

ESLint configurations used by Dasa for JavaScript projects

Install

Run

yarn add --dev prettier eslint eslint-plugin-import  @dasa-health/eslint-config-dasa-js

To use prettier you need to add this line to prettier.config.js file:

module.exports = require('@dasa-health/eslint-config-dasa-js/prettier.config');

#How use:

if your config are at package.json

  "eslintConfig": {
    "extends": [
      "@dasa-health/dasa-health-js"
    ]
  }

if your config are at .eslintrc

{
    "extends": [
        "@dasa-health/dasa-health-js",
        "@dasa-health/dasa-health-js/config/react",
        "@dasa-health/dasa-health-js/config/typescript"
    ],
    "overrides": [
        {
            "files": ["src/packages/app/__mocks__/*.js"],
            "rules": {
                "react/no-multi-comp": "off"
            }
        }
    ]
}

How use some specific configuration:

To use specific type of configuration for React or Typescript, you only need to extend these configuration above @dasa-health/dasa-health-js/ declaration, i, e:

{
    "extends": [
        "@dasa-health/dasa-health-js",
        "@dasa-health/dasa-health-js/config/react",
        "@dasa-health/dasa-health-js/config/typescript"
    ]
}

After this you need to install all peer dependencies:

React

yarn add --dev eslint-plugin-react eslint-plugin-react-hooks

Typescript

yarn add --dev @typescript-eslint/eslint-plugin @typescript-eslint/parser