1.3.0 • Published 1 year ago

@neolution-ch/eslint-config-neolution v1.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

eslint-config-neolution

This package provides Neolution's .eslintrc as an extensible shared config.

Installation

# inside your project's working tree
yarn add -D @neolution-ch/eslint-config-neolution

Usage

Edit the .eslintrc.js of your project:

module.exports = {
  ...
  extends: ["@neolution-ch/eslint-config-neolution"],
  ...
}

React

For React project you might need to adjust the "@typescript-eslint/naming-convention" rule to allow PascalCase for component names.

module.exports = {
  ...
  rules: {
    "@typescript-eslint/naming-convention": ["error", {
      selector: "default",
      format: ["camelCase", "PascalCase"],
      leadingUnderscore: "allow",
    },
    {
      selector: ["typeLike", "accessor", "enumMember"],
      format: ["PascalCase"],
    }],
  }
  ...
}

License

MIT