From e90653bca398dd91665a43935ae0be1a320dcb87 Mon Sep 17 00:00:00 2001 From: spaenleh Date: Thu, 12 Sep 2024 14:00:51 +0200 Subject: [PATCH] fix: remove jest mentions --- .eslintrc | 109 +++++++++++++++++++++++++++++++++++++++++++++++++++++ .gitignore | 3 -- 2 files changed, 109 insertions(+), 3 deletions(-) create mode 100644 .eslintrc diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 00000000..01b1af85 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,109 @@ +{ + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": "latest", + "sourceType": "module", + "ecmaFeatures": { + "legacyDecorators": true, + "jsx": true, + }, + }, + "extends": [ + "airbnb", + "eslint:recommended", + "prettier", + "plugin:@typescript-eslint/recommended", + ], + "plugins": [ + "import", + "jsx-a11y", + "react", + "react-hooks", + "@typescript-eslint", + ], + "ignorePatterns": ["dist"], + "env": { + "browser": true, + "node": true, + "mocha": true, + }, + "globals": { + "cy": true, + "Cypress": true, + }, + "settings": { + "react": { + "version": "17", + }, + "import/parsers": { + "@typescript-eslint/parser": [".ts", ".tsx"], + }, + "import/resolver": { + "typescript": { + "alwaysTryTypes": true, // always try to resolve types under `@types` directory even it doesn't contain any source code, like `@types/unist` + }, + }, + }, + "rules": { + "import/export": "off", + "no-underscore-dangle": [ + "error", + { + "allow": ["_id", "__REDUX_DEVTOOLS_EXTENSION__"], + }, + ], + "jsx-a11y/anchor-is-valid": [ + "error", + { + "components": ["Link"], + "specialLink": ["to", "hrefLeft", "hrefRight"], + "aspects": ["noHref", "invalidHref", "preferButton"], + }, + ], + "react/jsx-filename-extension": [ + 1, + { + "extensions": [".js", ".jsx", ".tsx", ".ts"], + }, + ], + "import/no-named-as-default": 0, + "react/static-property-placement": [ + "error", + "property assignment", + { + "childContextTypes": "static public field", + "contextTypes": "static public field", + "contextType": "static public field", + "defaultProps": "static public field", + "displayName": "static public field", + "propTypes": "static public field", + }, + ], + "react/state-in-constructor": ["error", "never"], + "no-console": [1, { "allow": ["error", "debug"] }], + "no-restricted-syntax": "off", + "import/extensions": [ + "error", + "ignorePackages", + { + "js": "never", + "jsx": "never", + "ts": "never", + "tsx": "never", + }, + ], + "import/no-extraneous-dependencies": "off", + "no-shadow": "off", + "@typescript-eslint/no-shadow": "error", + "no-unused-vars": "off", + "@typescript-eslint/no-unused-vars": [ + "error", + { + "argsIgnorePattern": "^_", + "varsIgnorePattern": "^_", + "caughtErrorsIgnorePattern": "^_", + }, + ], + "import/prefer-default-export": 0, + }, +} diff --git a/.gitignore b/.gitignore index d9b8e48e..d5758086 100644 --- a/.gitignore +++ b/.gitignore @@ -22,7 +22,6 @@ yarn-error.log* # cache .eslintcache -.jest-cache # testing and coverage .jest-cache @@ -47,5 +46,3 @@ example/src/react-app-env.d.ts !.yarn/releases !.yarn/sdks !.yarn/versions - -package-lock.json