shakacode/react_on_rails

View on GitHub
.eslintrc

Summary

Maintainability
Test Coverage
extends:
  - eslint-config-shakacode
  - prettier
  - prettier/react

plugins:
  - prettier

globals:
  __DEBUG_SERVER_ERRORS__: true
  __SERVER_ERRORS__: true

env:
  browser: true
  node: true
  mocha: true
  jest: true

overrides:
  - files: ["**/*.ts", "**/*.tsx"]
    parser: "@typescript-eslint/parser"
    parserOptions:
      ecmaVersion: 2018
      sourceType: module
      project: "./tsconfig.json"
    extends:
      - eslint:recommended
      - plugin:@typescript-eslint/eslint-recommended
      - plugin:@typescript-eslint/recommended
    plugins:
      - "@typescript-eslint"
    rules:
      "@typescript-eslint/no-namespace": 0
      "@typescript-eslint/no-shadow": ["error"]

rules:
  no-shadow: 0
  no-console: 0
  function-paren-newline: 0
  object-curly-newline: 0
  no-restricted-syntax: ["error", "SequenceExpression"]
  # https://stackoverflow.com/a/59268871/5241481
  import/extensions: ['error', 'ignorePackages', {"js": 'never',"ts": "never"}]

  # https://github.com/benmosher/eslint-plugin-import/issues/340
  import/no-extraneous-dependencies: 0

settings:
  import/core-modules:
    - react-redux
  import/resolver:
    node:
      extensions: [".js", ".ts", ".d.ts"]