.eslintrc.yml 2.79 KB
Newer Older
Lukas Eipert's avatar
Lukas Eipert committed
1
extends:
2 3
  - plugin:@gitlab/default
  - plugin:@gitlab/i18n
4
  - plugin:no-jquery/slim
5
  - plugin:no-jquery/deprecated-3.4
6
  - ./tooling/eslint-config/conditionally_ignore_ee.js
Lukas Eipert's avatar
Lukas Eipert committed
7 8 9 10 11
globals:
  __webpack_public_path__: true
  gl: false
  gon: false
  localStorage: false
12
  IS_EE: false
Lukas Eipert's avatar
Lukas Eipert committed
13
plugins:
14
  - no-jquery
Lukas Eipert's avatar
Lukas Eipert committed
15 16 17
settings:
  import/resolver:
    webpack:
18
      config: './config/webpack.config.js'
Lukas Eipert's avatar
Lukas Eipert committed
19 20
rules:
  import/no-commonjs: error
Mark Florian's avatar
Mark Florian committed
21
  import/no-default-export: off
Lukas Eipert's avatar
Lukas Eipert committed
22 23 24
  no-underscore-dangle:
    - error
    - allow:
25 26
        - __
        - _links
27 28
  import/no-unresolved:
    - error
29 30 31 32
  # Disabled for now, to make the airbnb-base 12.1.0 -> 13.1.0 update smoother
  no-else-return:
    - error
    - allowElseIf: true
Mike Greiling's avatar
Mike Greiling committed
33
  lines-between-class-members: off
34
  # all offenses of no-jquery/no-animate-toggle are false positives ( $toast.show() )
35
  no-jquery/no-animate-toggle: off
36
  no-jquery/no-event-shorthand: off
37
  no-jquery/no-serialize: error
38 39
  promise/always-return: off
  promise/no-callback-in-promise: off
Vitaly Slobodin's avatar
Vitaly Slobodin committed
40
  '@gitlab/no-global-event-off': error
41 42 43 44 45 46 47 48 49 50 51
  no-param-reassign:
    - error
    - props: true
      ignorePropertyModificationsFor:
        - acc
        - accumulator
        - el
        - element
        - state
      ignorePropertyModificationsForRegex:
        - '^draft'
52
  import/order:
Vitaly Slobodin's avatar
Vitaly Slobodin committed
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
    - error
    - groups:
        - builtin
        - external
        - internal
        - parent
        - sibling
        - index
      pathGroups:
        - pattern: ~/**
          group: internal
        - pattern: emojis/**
          group: internal
        - pattern: '{ee_,}empty_states/**'
          group: internal
        - pattern: '{ee_,}icons/**'
          group: internal
        - pattern: '{ee_,}images/**'
          group: internal
        - pattern: vendor/**
          group: internal
        - pattern: shared_queries/**
          group: internal
        - pattern: '{ee_,}spec/**'
          group: internal
        - pattern: '{ee_,}jest/**'
          group: internal
        - pattern: ee_else_ce/**
          group: internal
        - pattern: ee/**
          group: internal
        - pattern: ee_component/**
          group: internal
        - pattern: '{test_,}helpers/**'
          group: internal
        - pattern: test_fixtures/**
          group: internal
      alphabetize:
        order: asc
92
overrides:
Paul Gascou-Vaillancourt's avatar
Paul Gascou-Vaillancourt committed
93 94 95
  - files:
      - '**/spec/**/*'
    rules:
Vitaly Slobodin's avatar
Vitaly Slobodin committed
96 97
      '@gitlab/require-i18n-strings': off
      '@gitlab/no-runtime-template-compiler': off
98 99 100 101
  - files:
      - 'config/**/*'
      - 'scripts/**/*'
      - '*.config.js'
102
      - '*.config.*.js'
103 104 105 106 107 108 109
    rules:
      '@gitlab/require-i18n-strings': off
      import/no-extraneous-dependencies: off
      import/no-commonjs: off
      import/no-nodejs-modules: off
      filenames/match-regex: off
      no-console: off
Tom Quirk's avatar
Tom Quirk committed
110 111 112 113
  - files:
      - '*.stories.js'
    rules:
      filenames/match-regex: off