How to use the eslint-plugin-react.configs function in eslint-plugin-react

To help you get started, we’ve selected a few eslint-plugin-react examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github coralproject / talk / .eslintrc.js View on Github external
const typescriptEslintRecommended = require('@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended').default.overrides[0];
const typescriptRecommended = require('@typescript-eslint/eslint-plugin/dist/configs/recommended.json');
const typescriptRecommendedTypeChecking = require('@typescript-eslint/eslint-plugin/dist/configs/recommended-requiring-type-checking.json');
const typescriptEslintPrettier = require('eslint-config-prettier/@typescript-eslint');
const react = require('eslint-plugin-react').configs.recommended;
const jsxA11y = require('eslint-plugin-jsx-a11y').configs.recommended;
const reactPrettier = require('eslint-config-prettier/react');

const typescriptOverrides = {
  files: ["*.ts", "*.tsx"],
  parser: "@typescript-eslint/parser",
  parserOptions: {
    sourceType: "module",
    ecmaFeatures: {
      jsx: true,
    },
  },
  plugins: [
    "@typescript-eslint",
    "@typescript-eslint/tslint",
    "react",
github swissquote / crafty / packages / eslint-plugin-swissquote / src / react.js View on Github external
"@swissquote/swissquote/react/no-redundant-should-component-update":
      "error",
    "@swissquote/swissquote/react/no-typos": "error",
    "@swissquote/swissquote/react/no-unused-state": "error",
    "@swissquote/swissquote/react/no-will-update-set-state": "error",
    "@swissquote/swissquote/react/prefer-es6-class": ["error", "always"],
    "@swissquote/swissquote/react/prefer-stateless-function": [
      "error",
      { ignorePureComponents: true }
    ],
    "@swissquote/swissquote/react/void-dom-elements-no-children": "error"
  }
};

addMissingRules(
  require("eslint-plugin-react").configs.recommended.rules,
  module.exports.rules
);

eslint-plugin-react

React specific linting rules for ESLint

MIT
Latest version published 1 month ago

Package Health Score

95 / 100
Full package analysis

Popular eslint-plugin-react functions