{ "parser": "@typescript-eslint/parser", "extends": [ "airbnb", "airbnb-typescript", "plugin:react-hooks/recommended", "prettier" // Prettier must always be last as it overrides all other configs (https://github.com/prettier/eslint-config-prettier) ], "parserOptions": { "project": "./tsconfig.json" }, "plugins": ["react-hooks", "@typescript-eslint"], "env": { "browser": true, "commonjs": true, "es6": true, "jest": true, "node": true }, "settings": { "import/resolver": { "typescript": {} // this loads /tsconfig.json to eslint } }, "rules": { "@typescript-eslint/no-unused-vars": [ "error", { "vars": "all", "args": "none", "ignoreRestSiblings": true } ], "curly": ["error", "multi-line"], "import/no-unresolved": [ "error", { "ignore": ["react-native", "react"] } ], "lines-between-class-members": [ "error", "always", { "exceptAfterSingleLine": true } ], "prefer-const": ["error", { "destructuring": "all" } ], "react/jsx-filename-extension": [ "warn", { "extensions": [".js", ".jsx", ".ts", ".tsx"] } ], // Disabled rules "@typescript-eslint/no-shadow": "off", "@typescript-eslint/no-use-before-define": "off", "arrow-body-style": "off", "class-methods-use-this": "off", "consistent-return": "off", "default-case": "off", "guard-for-in": "off", "import/no-cycle": "off", "import/no-named-as-default": "off", "import/prefer-default-export": "off", "no-console": "off", "no-continue": "off", "no-else-return": "off", "no-lonely-if": "off", "no-param-reassign": "off", "no-restricted-syntax": "off", "no-underscore-dangle": "off", "radix": "off", "react/jsx-props-no-spreading": "off", "react/prefer-stateless-function": "off", "react/prop-types": "off", "react/sort-comp": "off", "react/state-in-constructor": "off", // TODO (michael-adalo): fix up, added in https://github.com/AdaloHQ/runner/pull/765 "react/static-property-placement": "off", // TODO (michael-adalo): fix up, added in https://github.com/AdaloHQ/runner/pull/765 "react-hooks/exhaustive-deps": "off", // TODO (michael-adalo): fix up, added in https://github.com/AdaloHQ/runner/pull/768 "no-restricted-imports": ["error", { "paths": [{ "name": "luxon", "message": "Please use the datetime utility functions in src/utils/luxon/index.ts instead of importing luxon directly." }, { "name": "utils/luxon/datetime", "message": "Please use the datetime utility functions in src/utils/luxon/index.ts instead of importing from the module directly." }, { "name": "utils/luxon/comparisons", "message": "Please use the datetime utility functions in src/utils/luxon/index.ts instead of importing from the module directly." }, { "name": "utils/luxon/formatting", "message": "Please use the datetime utility functions in src/utils/luxon/index.ts instead of importing from the module directly." }, { "name": "utils/luxon/bindings", "message": "Please use the datetime utility functions in src/utils/luxon/index.ts instead of importing from the module directly." }, { "name": "moment", "message": "Use of moment is deprecated. Please use the datetime utility functions in src/utils/luxon/index.ts instead." }] }] }, "overrides": [ { "files": ["./src/utils/luxon/datetime.ts", "./src/utils/luxon/datetime.test.ts"], "rules": { "no-restricted-imports": ["off", "luxon"] } }, { "files": ["./src/utils/moment-locale.ts"], "rules": { "no-restricted-imports": ["off", "moment"] } } ] }