Natural Preference for Minification

    @cognite/eslint-plugin

    2.0.1 • Public • Published

    @cognite/eslint-plugin

    Custom eslint rules for Cognite's front-end applications.

    Installation

    You will need to install ESLint:

    $ yarn add --dev eslint
    

    And install eslint-config-cognite:

    $ yarn add --dev @cognite/eslint-config
    

    Next, install @cognite/eslint-plugin:

    $ yarn add --dev @cognite/eslint-plugin
    

    Usage

    Add cognite to the plugins section of your .eslintrc configuration file. You can omit the /eslint-plugin suffix:

    {
      "plugins": ["@cognite"]
    }

    Then configure the rules you want to use under the rules section.

    {
      "rules": {
        "@cognite/no-number-z-index": "error"
      }
    }

    Supported Presets

    Presets are enabled by adding a line to the extends list in your config file. For example, to enable the all preset, use:

    {
      "extends": ["plugin:@cognite/all"]
    }
    • all enables all rules from this plugin.
    • noNumZIndex enables all the rules that prevent numbers with z-indexes.
    • insight enables all rules native to insight.
    • opsup enables all rules native to operations support.

    Supported Rules

    Here are all the individual rules you can use:

    @cognite/no-number-z-index

    z-index util should be used.

    @cognite/no-sdk-submodule-imports

    Importing from @cognite/sdk should only happen from the top-level.

    @cognite/no-unissued-todos

    TODO's in code require a JIRA ticket.

    [@cognite/hellip]

    Ensures that ... is rendered as a horizontal ellipsis.

    @cognite/require-t-function

    <Trans /> should be passed t as a prop.

    @cognite/styled-macro

    Make sure that styled-components/macro is correctly used.

    Keywords

    Install

    npm i @cognite/eslint-plugin

    DownloadsWeekly Downloads

    1,274

    Version

    2.0.1

    License

    UNLICENSED

    Unpacked Size

    19.7 kB

    Total Files

    11

    Last publish

    Collaborators

    • derek-reilly
    • lokaltog
    • cemreyavuz
    • trondeh80
    • parami.abeysekara
    • sumitpandey
    • francisco.rull
    • rhuan.barreto
    • neringaalt
    • dordev
    • alexnix
    • drsp-cognite
    • alitahir11
    • oiuytrdsxcvbnjkhgfcvbnm
    • wjoel
    • tapped
    • mortencognite
    • frxstrem
    • cognitecicd
    • pavelzubarev
    • msusag
    • nfremming
    • ktjolsen
    • kiriencognite
    • mperzyna
    • steinhdan
    • dmivankov
    • polomani
    • simen.eriksen
    • joma_cognite
    • nildo
    • sjinyuan
    • nils-cognite
    • dlcognite
    • haak
    • carlospereira
    • issaafkattan
    • larsmoa
    • nishafern
    • trygve.utstumo
    • bellamoo
    • kylling
    • kathrine-cognite
    • roman010
    • kimjoar
    • rekarnar
    • maximcognite
    • rumeshwick
    • tim-othy
    • vegardokland
    • hhenriques
    • tfheen-cognite
    • oksana_korniienko
    • j-bjorne
    • scottmelhop
    • magnusmoan
    • mathialo
    • agadacz-cognite
    • paulo-menezes-cognite
    • miladcognite
    • me-ydv-5
    • cogniteterraform
    • anderscognite
    • fredrik955
    • valgussev
    • halvard
    • dan.levings.cognite
    • sindresh92
    • christjt
    • maksim.nesterenko
    • hakontro
    • arnekv
    • jucc
    • ana-gheorghe
    • matthew.cameron
    • pbettler
    • anttran
    • dsaks999
    • qtiptip
    • cognite-joa
    • sceniclife
    • johan-cognite
    • theresatalor-cognite
    • mspang
    • eliasbjorne
    • oysteinolsen
    • arvearve
    • anders-cog
    • skairunner
    • siljec
    • nicklassvendsrud
    • jtcog
    • petmotzf
    • thorkild
    • deep-cognite
    • mattmurph9
    • lprovensi
    • haakonflatval-cognite
    • henne90gen-cognite
    • nicolasagnes
    • begozcan
    • eiriklv
    • valeriia-prokopenko
    • khalzmax
    • chingyu-cognite
    • mikaelcognite
    • sighol
    • lisa.halvorsen.cognite
    • heiding
    • ronald-cognite
    • senickel
    • sachila
    • daniel.priori
    • ravinda-cognite
    • timurgen
    • trodden-dev
    • podeig-cognite
    • aryna.karali
    • emel.varol
    • bdimitrijoski
    • madskjeldsberg
    • yevhenii.maltsev
    • farrukk24
    • aurlien
    • bianca-mv
    • samarv
    • soleh23
    • malindakpt
    • mihilr
    • gayandeegala
    • tfarvac
    • d0ttir
    • borajimin
    • marielha
    • samir-ajdarpasic
    • torbjornopheim
    • chanaka25
    • geircognite
    • soumesh.banerjee
    • mohsin.cognite
    • asankad.cog
    • vebjorngilberg
    • roligheten
    • marcushorn
    • sara.aalbu
    • atussa
    • aizumi
    • therockvalley
    • fgcognite
    • krzysztof-olbinski
    • gleb.kaistro
    • lasse.alm
    • dmitrijs.rutko.cognite
    • perarnet
    • denys-kseniev-cognite
    • bisera
    • shehan.cognite
    • udara-cognite
    • raabyeeggs
    • sennen-cognite
    • asankad
    • jarlah
    • keepfloyding
    • kbsaid
    • nayang-cognite
    • stevenhgnguyen
    • cgustad
    • haved
    • ttmcswg
    • cognitehumlen
    • tommy_thorsen
    • andersfylling
    • meisammalekzadeh
    • ericbrattli
    • mcarun
    • saagar-cognite
    • waqasjaved1