// https://eslint.org/docs/latest/use/configure/configuration-files module.exports = { parser: "@typescript-eslint/parser", parserOptions: { project: "tsconfig.json", tsconfigRootDir: ".", sourceType: "module", ecmaFeatures: { jsx: true, }, ecmaVersion: "latest", }, globals: { JSX: true, }, plugins: ["@typescript-eslint/eslint-plugin", "import", "react", "cypress"], extends: [ "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended", "airbnb", "plugin:cypress/recommended", ], root: true, env: { node: true, jest: true, browser: true, es2021: true, }, ignorePatterns: [".eslintrc.js", "*.css"], rules: { "max-len": ["off", { code: 120 }], semi: "off", "object-curly-newline": "off", "no-shadow": "off", "no-unused-vars": "off", "no-underscore-dangle": "off", "no-continue": "off", "no-restricted-syntax": "off", "import/no-extraneous-dependencies": "off", camelcase: "off", "array-callback-return": "warn", "operator-linebreak": "off", indent: "off", "no-nested-ternary": "warn", "no-restricted-exports": "warn", "no-restricted-globals": "warn", "no-use-before-define": "warn", "arrow-body-style": "off", "consistent-return": "warn", "implicit-arrow-linebreak": "off", "class-methods-use-this": "off", "@typescript-eslint/no-unused-vars": ["off"], "@typescript-eslint/no-shadow": ["warn"], "@typescript-eslint/ban-ts-comment": "off", "@typescript-eslint/interface-name-prefix": "off", "@typescript-eslint/explicit-function-return-type": "off", "@typescript-eslint/explicit-module-boundary-types": "off", "@typescript-eslint/no-explicit-any": "off", "@typescript-eslint/semi": "off", "jsx-a11y/anchor-is-valid": "off", "jsx-a11y/media-has-caption": "warn", "jsx-a11y/alt-text": "warn", "jsx-a11y/no-static-element-interactions": "warn", "jsx-a11y/click-events-have-key-events": "warn", "jsx-a11y/iframe-has-title": "warn", "jsx-a11y/no-redundant-roles": "warn", "jsx-a11y/label-has-associated-control": "warn", "jsx-a11y/control-has-associated-label": "warn", "react/jsx-filename-extension": [1, { extensions: [".ts", ".tsx"] }], //should add ".ts" if typescript project "react/destructuring-assignment": "off", "react/jsx-no-target-blank": "warn", "react/jsx-one-expression-per-line": "off", "react/require-default-props": "off", "react/react-in-jsx-scope": "off", "react/no-array-index-key": "off", "react/jsx-props-no-spreading": "off", "react/jsx-no-bind": "off", "react/no-unescaped-entities": "off", "react/jsx-no-useless-fragment": "off", "react/function-component-definition": "off", "react/no-danger": "off", "cypress/unsafe-to-chain-command": "off", "import/extensions": "off", "import/no-unresolved": "off", "import/prefer-default-export": "off", "import/order": [ "error", { groups: [ "builtin", "external", "internal", ["parent", "sibling", "index"], ], "newlines-between": "always", alphabetize: { order: "asc", caseInsensitive: true }, }, ], }, };