{ "env": { "browser": true, "es6": true }, "extends": [ "plugin:@typescript-eslint/recommended", "eslint:recommended", "plugin:react/recommended", "airbnb", "plugin:@typescript-eslint/recommended", "prettier", "prettier/prettier", "plugin:import/typescript" ], "parser": "@typescript-eslint/parser", "parserOptions": { "ecmaFeatures": { "experimentalObjectRestSpread": true, "jsx": true }, "ecmaVersion": 9, "sourceType": "module", "project": "./tsconfig.json", "tsconfigRootDir": "./" }, "plugins": [ "react", "@typescript-eslint", "react-hooks", "sort-imports-es6-autofix", "no-relative-import-paths" ], "rules": { "linebreak-style": [ "error", "unix" ], "semi": [ "error", "always" ], "react/jsx-uses-react": [ "error" ], "react/jsx-uses-vars": [ "error" ], "react-hooks/rules-of-hooks": "error", // Checks rules of Hooks "react-hooks/exhaustive-deps": [ "warn", { "additionalHooks": "(useToolHandler|useOnDemandFrame|useAbort|useSecondaryButtonClicked|useAnimatedSpring|useHotkeyDown|useHotkey|useEvent|useServerUpdate)" } ], // Checks effect dependencies "jsx-a11y/no-static-element-interactions": [ "off" ], "sort-imports-es6-autofix/sort-imports-es6": [ 2, { "ignoreCase": false, "ignoreMemberSort": false, "memberSyntaxSortOrder": [ "none", "all", "multiple", "single" ] } ], "no-relative-import-paths/no-relative-import-paths": [ "error", { "allowSameFolder": false, "rootDir": "src", "prefix": "@" } ], "react/jsx-filename-extension": [ "warn", { "extensions": [ ".tsx" ] } ], "import/extensions": [ "error", "ignorePackages", { "js": "never", "jsx": "never", "ts": "never", "tsx": "never" } ], "no-shadow": "off", "@typescript-eslint/consistent-type-imports": "error", "@typescript-eslint/no-shadow": [ "error" ], "lines-between-class-members": [ "warn", "always", { "exceptAfterSingleLine": true } ], "react/sort-comp": [ "warn", { "order": [ "static-variables", "instance-variables", "static-methods", "lifecycle", "render", "/^render.+$/", "instance-methods", "everything-else" ] } ], "react/destructuring-assignment": [ "error", "always", { "ignoreClassFields": true } ], "react/state-in-constructor": [ "error", "never" ], "react/no-unknown-property": "off", "no-bitwise": "off", "import/no-unresolved": [ "error", { "ignore": [ "^mdast$" ] } ], "import/no-extraneous-dependencies": [ "error", { "devDependencies": [ "test/**/*.ts" ] } ], "no-return-assign": [ "error", "except-parens" ], "react/require-default-props": "off", "@typescript-eslint/no-unused-vars": [ "error", { "varsIgnorePattern": "^_", "argsIgnorePattern": "^_" } ], "class-methods-use-this": [ "error", { "enforceForClassFields": false } ], "no-promise-executor-return": "off", "no-empty-function": "off", "no-console": "off", "no-use-before-define": "off", "@typescript-eslint/no-use-before-define": "off", "@typescript-eslint/no-explicit-any": "off", "import/order": "off", "import/prefer-default-export": "off", "react/prop-types": "off", "@typescript-eslint/explicit-function-return-type": "off", "@typescript-eslint/explicit-module-boundary-types": "off", "react/jsx-props-no-spreading": "off", "react/jsx-boolean-value": "off", "no-plusplus": "off", "no-param-reassign": "off", "default-case": "off", "jsx-a11y/click-events-have-key-events": "off", "jsx-a11y/anchor-has-content": "off" }, "settings": { "react": { "version": "detect" }, "import/resolver": { "typescript": { "extensions": [ ".js", ".jsx", ".ts", ".tsx" ] }, "node": { "extensions": [ ".js", ".jsx", ".ts", ".tsx" ], "moduleDirectory": [ "node_modules", "extension/src/" ] } } }, "overrides": [ { "files": [ "src/application/{**,*.*}" ], "rules": { "no-restricted-imports": [ "error", { "patterns": [ "@/plugins/*", "@/pages/*", "@dicetable/plugin-shell", "@dicetable/plugin-shell/*" ] } ] } }, { "files": [ "src/pages/{**,*.*}" ], "rules": { "no-restricted-imports": [ "error", { "patterns": [ "@/plugins/*", "@dicetable/plugin-shell/*" ] } ] } }, { "files": [ "src/shared/{**,*.*}" ], "rules": { "no-restricted-imports": [ "error", { "patterns": [ "@/plugins/*", "@/pages/*", "@/pluginShell/*" ] } ] } }, { "files": [ "src/plugins/*/{**,*.*}" ], "rules": { "no-restricted-imports": [ "error", { "patterns": [ "@/models/*", "@/pages/*", "@/definitions/*", "@/application/*", "@/pluginShell/*" ] } ] } }, { "files": [ "src/pluginShell/{**,*.*}" ], "rules": { "no-restricted-imports": [ "error", { "patterns": [ "@/models/*", "@/pages/*", "@/plugins/*", "@dicetable/plugin-shell/*" ] } ] } } ] }