From a3e67f99b155e1dd66e9fbeb24a941b1e8687f4f Mon Sep 17 00:00:00 2001 From: Angelo Reale <12191809+angeloreale@users.noreply.github.com> Date: Sun, 12 May 2024 00:31:57 +0200 Subject: [PATCH] ar(lint) --- .eslintrc | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ .prettierrc | 5 +++++ 2 files changed, 58 insertions(+) create mode 100644 .eslintrc create mode 100644 .prettierrc diff --git a/.eslintrc b/.eslintrc new file mode 100644 index 0000000..f09a919 --- /dev/null +++ b/.eslintrc @@ -0,0 +1,53 @@ +{ + "env": { + "jest": true, + "browser": true + }, + "root": true, + "parser": "@typescript-eslint/parser", + "plugins": ["@typescript-eslint", "react"], + "settings": { + "react": { + "version": "detect" + }, + "import/resolver": { + "node": { + "extensions": [".js", ".jsx", ".ts", ".tsx"], + "moduleDirectory": ["node_modules", "src/"] + } + }, + }, + "parserOptions": { + "ecmaFeatures": { + "jsx": true + } + }, + "extends": [ + "eslint:recommended", + "plugin:react/recommended", + "plugin:@typescript-eslint/recommended", + "plugin:@typescript-eslint/eslint-recommended", + "prettier", + "plugin:prettier/recommended", + "plugin:react-hooks/recommended", + "plugin:storybook/recommended", + "airbnb" + ], + "rules": { + "react/jsx-uses-react": "error", + "react/jsx-uses-vars": "error", + "react/require-default-props": "off", + "react/react-in-jsx-scope": "off", + "import/no-extraneous-dependencies": "off", + "import/no-unresolved": "off", + "import/extensions": "off", + "react/jsx-filename-extension": [1, + { + "extensions": [ + ".tsx" + ] + } + ], + "react/function-component-definition": [2, { "namedComponents": "function-expression" }] + }, +} \ No newline at end of file diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..0b73d5e --- /dev/null +++ b/.prettierrc @@ -0,0 +1,5 @@ +{ + "printWidth": 80, + "tabWidth": 2, + "singleQuote": true +} \ No newline at end of file