1.0.2 • Published 4 years ago

eslint-config-volly-test v1.0.2

Weekly downloads
-
License
-
Repository
-
Last release
4 years ago

Volly Eslint Config

Base config for Typescript code. Extends prettier, airbnb, and eslint typescript plugins.

How to extend this config in a service or core package:

In your package.json, add the following to your dev dependencies:

"devDependencies": {
  "@core/eslint-config-volly": "1.0.0",
}

Then at the root level of your project create a file named .eslintrc.js and extend config relevant to your environment. Currently only the backend linting config is set up, but in the future we will add a frontend config with react specific linting rules.

module.exports = {
  extends: "@core/eslint-config-volly/backend",
};

Customizing Rules

Your eslintrc.js file can override or add any rules and settings to eslint you like. If you find a rule isn't helpful or pertinent to your project, just disable it.

  • Note: All eslint rules will have documentation, so make sure you understand why something is an error in the docs before disabling. Many rules are set to avoid common misconceptions about the behaviors.
module.exports = {
  extends: "@core/eslint-config-volly/backend",
  globals: {
    // add any additional global variables in your environment
    SomeGlobalVariable: true
  },
  rules: {
    // modify any default linting rules
    "no-console:" "off",
  }
};

More information on customizing your configuration in the Eslint docs.

Note: adding any additonal plugins or extending other configs may cause rule conflicts. Also, make sure any added plugins are hoisted in the lerna.json file, all eslint plugins must be hoisted to work together.

Customizing Prettier Styling

To modify prettier settings (any eslint errors marked prettier/prettier), add an optional .prettierrc at the root level of your project with prettier setting overrides.

{
  "tabWidth": 4,
  "semi": false,
  "singleQuote": true
}