.eslintrc.yaml 1.14 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
extends:
    - sinon
    - 'plugin:prettier/recommended'

env:
  browser: true
  node: true

globals:
  ArrayBuffer: false
  Map: false
  Promise: false
  Set: false
  Symbol: false

plugins:
  - ie11
  - local-rules

rules:
  strict: [error, 'global']
  # authors are expected to understand function hoisting
  no-use-before-define: off

  ie11/no-collection-args: error
  ie11/no-for-in-const: error
  ie11/no-loop-func: warn
  ie11/no-weak-collections: error
  local-rules/no-prototype-methods: error

overrides:
    - files: '*.test.*'
      plugins:
          - mocha
      env:
          mocha: true
      rules:
        max-nested-callbacks:
          - warn
          - 6
        mocha/handle-done-callback: error
        mocha/no-exclusive-tests: error
        mocha/no-global-tests: error
        mocha/no-hooks-for-single-case: off
        mocha/no-identical-title: error
        mocha/no-mocha-arrows: error
        mocha/no-nested-tests: error
        mocha/no-return-and-callback: error
        mocha/no-sibling-hooks: error
        mocha/no-skipped-tests: error
        mocha/no-top-level-hooks: error
        local-rules/no-prototype-methods: off