Skip to content

Instantly share code, notes, and snippets.

@hungdev
Created January 7, 2019 10:32
Show Gist options
  • Select an option

  • Save hungdev/a59de55e72a8e57cce04c948a173a5a2 to your computer and use it in GitHub Desktop.

Select an option

Save hungdev/a59de55e72a8e57cce04c948a173a5a2 to your computer and use it in GitHub Desktop.
old rule wassha
module.exports = {
  extends: "airbnb",
  root: true,
  parser: 'babel-eslint',
  parserOptions: {
    sourceType: 'module',
    "ecmaFeatures": {
      "jsx": true
    }
  },
  globals: {
    "window": true,
    "document": true,
    "navigator": true
  },
  env: {
    browser: true,
  },
  // https://github.com/feross/standard/blob/master/RULES.md#javascript-standard-style
  // extends: ["eslint:all", "plugin:react/all", "standard"],
  // required to lint *.vue files
  plugins: [
    'react',
    'html'
  ],
  // add your custom rules here
  'rules': {
    // 'template-curly-spacing': 0,
    // 'react/jsx-first-prop-new-line': 'error',
    // "react/jsx-max-props-per-line": [5, { "when": "always" }],
    'react/jsx-one-expression-per-line': 0,
    'import/no-unresolved': 0,
    '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/jsx-max-depth': 0,
    // 'react/jsx-sort-props': 0,
    // 'capitalized-comments': 0,
    // 'multiline-comment-style': 0,
    // 'react/no-unused-state': 0,
    // 'quotes': 0,
    'react/prop-types': 0,
    'react/sort-comp': 0,
    // 'react/no-deprecated': 0,
    // 'react/jsx-no-bind': 0,
    // 'max-len': 0,
    // 'no-inline-comments': 0,
    'react/jsx-max-props-per-line': 0,
    // 'react/no-set-state': 0,
    // 'sort-keys': 0,
    'class-methods-use-this': 0,
    'react/forbid-component-props': 0,
    'func-style': [2, 'declaration', { 'allowArrowFunctions': true }],
    // 'max-lines-per-function': ['error', { 'max': 100 }],
    // 'no-underscore-dangle': 0,
    'react/jsx-no-target-blank': 0,
    // 'react/require-optimization': 0,
    // 'max-params': 0,
    // 'no-magic-numbers': 0,
    // 'no-console': 0,
    // 'line-comment-position': 0,
    'react/prefer-stateless-function': 0,
    'no-useless-constructor': 0,
    // 'multiline-ternary': 0,
    // 'no-ternary': 0,
    // 'react/destructuring-assignment': 0,
    // 'react/no-access-state-in-setstate': 0,
    // 'react/jsx-child-element-spacing': 0,
    // 'react/jsx-no-literals': 0,
    // 'react/no-unescaped-entities': 0,
    'linebreak-style': 0,
    'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
    'no-process-env': 0
  },
  "settings": {
    "react": {
      "pragma": "React",  // Pragma to use, default to "React"
      "version": "16.4.2", // React version, default to the latest React stable release
    }
  }
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment