Skip to content

Instantly share code, notes, and snippets.

@hungdev
Created August 16, 2019 04:16
Show Gist options
  • Save hungdev/98fd0a689c16a6abbd2b99e4cc776d31 to your computer and use it in GitHub Desktop.
Save hungdev/98fd0a689c16a6abbd2b99e4cc776d31 to your computer and use it in GitHub Desktop.
eslint.md
{
  "extends": "airbnb",
  "parser": "babel-eslint",
  "env": {
    "node": true,
    "es6": true,
    "browser": true
  },
  "rules": {
    "react/jsx-props-no-spreading": 0,
    "object-curly-newline": 0, // disable new line in object
    "react/jsx-one-expression-per-line": 0, // allow do not break per line
    "import/no-unresolved": 0, // allow import with alias
    "max-len": "off",
    "sort-imports": 0,
    "react/jsx-filename-extension": [
      1,
      {
        "extensions": [
          ".js",
          ".jsx"
        ]
      }
    ],
    "no-tabs": 1,
    "react/jsx-indent": [
      2,
      2
    ],
    "indent": 0,
    "react/prop-types": 0,
    "react/sort-comp": 0, // allow do not sort position func
    "react/jsx-max-props-per-line": 0,
    "class-methods-use-this": 0,
    "react/forbid-component-props": 0,
    "func-style": [
      2,
      "declaration",
      {
        "allowArrowFunctions": true
      }
    ],
    "react/jsx-no-target-blank": 0,
    "react/prefer-stateless-function": 0,
    "no-useless-constructor": 0,
    "linebreak-style": 0,
    "no-process-env": 0,
    "import/no-extraneous-dependencies": [ // disable warning import
      "error",
      {
        "devDependencies": false,
        "optionalDependencies": false,
        "peerDependencies": false,
        "packageDir": "./"
      }
    ],
    "react/state-in-constructor": 0 // disable warning state in constructor
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment