eslint-plugin-getsentry

2.0.0 • Public • Published

ESLint-plugin-React

Custom ESLint rules for the getsentry organization. Used for Sentry and other projects.

Installation

$ npm install eslint-plugin-getsentry

Configuration

Add plugins section and specify ESLint-plugin-React as a plugin.

{
  "plugins": [
    "getsentry"
  ]
}

If it is not already the case you must also configure ESLint to support JSX.

{
  "ecmaFeatures": {
    "jsx": true
  }
}

Finally, enable all of the rules that you would like to use.

{
  "rules": {
    "getsentry/jsx-needs-il8n": 1
  }
}

List of supported rules

jsx-needs-il8n

Prevent usage of unwrapped string literals in JSX components.

Bad:

<div>foo</div>

Good:

<div>{t('foo')}</div>

If you don't want to translate a string, but don't want it to trigger this rule, you can just do:

<div>{'foo'}</div>

License

ESLint-plugin-getsentry is licensed under the Apache 2.0 License.

/eslint-plugin-getsentry/

    Package Sidebar

    Install

    npm i eslint-plugin-getsentry

    Weekly Downloads

    231

    Version

    2.0.0

    License

    Apache-2.0

    Last publish

    Collaborators

    • benvinegar
    • billyvg
    • mitsuhiko
    • haza
    • jauer
    • sentry-bot
    • evanpurkhiser
    • lynnagara
    • leedongwei
    • markstory
    • zeeg