Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module.exports = {
- root: true,
- parser: "@typescript-eslint/parser",
- plugins: [
- "react",
- "react-hooks",
- "prettier",
- "no-inline-styles",
- "relay",
- "graphql",
- "@typescript-eslint"
- ],
- extends: [
- "react-app",
- "prettier",
- "plugin:relay/recommended",
- "eslint:recommended",
- "plugin:react/recommended"
- ],
- settings: {
- react: {
- version: "detect"
- }
- },
- rules: {
- "no-restricted-imports": [
- "error",
- {
- paths: [
- {
- name: "@material-ui/core",
- importNames: ["makeStyles", "withStyles"],
- message: "Please import makeStyles/withStyles from @material-ui/core/styles instead."
- }
- ]
- }
- ],
- "graphql/no-deprecated-fields": [
- "warn",
- {
- env: "relay",
- tagName: "graphql",
- schemaJson: require("./ql/schema.json")
- }
- ],
- "no-var": "error",
- "no-debugger": "warn",
- "prefer-const": "error",
- "prettier/prettier": "error",
- "jsx-a11y/anchor-is-valid": "off",
- "react-hooks/rules-of-hooks": "error",
- "react-hooks/exhaustive-deps": [
- "warn",
- {
- additionalHooks: "(useUpdateEffect)"
- }
- ],
- "no-console": ["warn", { allow: ["warn", "info", "error"] }],
- "no-unused-expressions": "off",
- "no-inline-styles/no-inline-styles": "warn",
- "react/display-name": "off",
- "react/prop-types": "off",
- "react/jsx-handler-names": "warn",
- "react/jsx-pascal-case": "error",
- "padding-line-between-statements": [
- "error",
- { blankLine: "always", prev: "*", next: ["const", "let", "var"] },
- { blankLine: "always", prev: ["const", "let", "var"], next: "*" },
- { blankLine: "any", prev: ["const", "let", "var"], next: ["const", "let", "var"] },
- {
- blankLine: "always",
- prev: "*",
- next: [
- "multiline-const",
- "return",
- "function",
- "multiline-expression",
- "multiline-block-like"
- ]
- },
- {
- blankLine: "always",
- prev: ["multiline-const", "function", "multiline-expression", "multiline-block-like"],
- next: "*"
- }
- ],
- "relay/generated-flow-types": "off",
- "relay/must-colocate-fragment-spreads": "warn",
- "no-unused-vars": "off",
- "no-useless-catch": "off",
- "@typescript-eslint/no-unused-vars": ["warn", { ignoreRestSiblings: true }],
- "unused-imports/no-unused-imports": "error",
- "no-use-before-define": "off", // this one is broken
- "@typescript-eslint/no-use-before-define": ["off"], // this one works,
- "import/order": [
- "error",
- {
- groups: ["builtin", "external", "internal", ["parent", "sibling"]],
- pathGroups: [
- {
- pattern: "react",
- group: "external",
- position: "before"
- }
- ],
- pathGroupsExcludedImportTypes: ["react"],
- "newlines-between": "always",
- alphabetize: {
- order: "asc",
- caseInsensitive: true
- }
- }
- ]
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement