eslintrc-typescript-react.js 703 B

123456789101112131415161718192021222324
  1. /* eslint-env node */
  2. module.exports = {
  3. extends: [
  4. "eslint:recommended",
  5. "plugin:react-hooks/recommended",
  6. "plugin:@typescript-eslint/strict-type-checked",
  7. "plugin:@typescript-eslint/stylistic-type-checked",
  8. ],
  9. plugins: ["@typescript-eslint", "react-namespace-import"],
  10. parser: "@typescript-eslint/parser",
  11. parserOptions: {
  12. project: true,
  13. },
  14. root: true,
  15. ignorePatterns: [".eslintrc.js"],
  16. rules: {
  17. // The recommended way to import React is:
  18. //
  19. // import * as React from "react";
  20. //
  21. // This rule enforces that.
  22. "react-namespace-import/no-namespace-import": "error",
  23. },
  24. };