From 0738bfb6200c7facc4de1cb90b44186ff91e6509 Mon Sep 17 00:00:00 2001 From: AlexAlexandre Date: Wed, 18 Aug 2021 18:24:23 -0300 Subject: [PATCH] [improve] - setting up some rules and integration with typescript --- .eslintrc.js | 24 ++++++++++++------------ package.json | 2 +- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 0f845cd79..b1ecf22dc 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -9,7 +9,6 @@ module.exports = { "parser": "@babel/eslint-parser", "extends": [ "@rocket.chat/eslint-config", - // 'plugin:react/recommended' ], "parserOptions": { "sourceType": "module", @@ -50,14 +49,15 @@ module.exports = { "extensions": [".js", ".jsx", ".ts", ".tsx"] }], "react/require-default-props": [0], - "react/no-unused-prop-types": [2, { - "skipShapeProps": true - }], + "ordered-imports": [0], + // "react/no-unused-prop-types": [2, { + // "skipShapeProps": true + // }], "react/no-did-mount-set-state": 0, "react/no-multi-comp": [0], "react/jsx-indent": [2, "tab"], "react/jsx-indent-props": [2, "tab"], - "react/forbid-prop-types": 0, + // "react/forbid-prop-types": 0, "jsx-quotes": [2, "prefer-single"], "jsx-a11y/href-no-hash": 0, "jsx-a11y/aria-role": 0, @@ -104,10 +104,7 @@ module.exports = { "no-undef": 2, "no-unreachable": 2, "no-unused-expressions": 0, - "no-unused-vars": [2, { - "vars": "all", - "args": "after-used" - }], + "no-unused-vars": "off", "max-len": 0, "react/jsx-uses-vars": 2, "no-void": 2, @@ -133,7 +130,7 @@ module.exports = { "block-scoped-var": 2, "curly": [2, "all"], "eqeqeq": [2, "allow-null"], - "new-cap": [2], + "new-cap": "off", "use-isnan": 2, "valid-typeof": 2, "linebreak-style": 0, @@ -193,7 +190,6 @@ module.exports = { "**/*.tsx" ], "extends": [ - // 'plugin:react/recommended', "plugin:@typescript-eslint/recommended", "plugin:@typescript-eslint/eslint-recommended", "@rocket.chat/eslint-config" @@ -257,7 +253,11 @@ module.exports = { "@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_", "ignoreRestSiblings": true - }] + }], + "new-cap": "off", + }, + "globals": { + "JSX": true, }, "settings": { "import/resolver": { diff --git a/package.json b/package.json index 55a1aa256..36195b8aa 100644 --- a/package.json +++ b/package.json @@ -136,8 +136,8 @@ "@babel/eslint-plugin": "^7.13.0", "@babel/plugin-proposal-decorators": "^7.8.3", "@babel/runtime": "^7.12.5", - "@rocket.chat/eslint-config-alt": "^0.27.0", "@bugsnag/source-maps": "^2.2.0", + "@rocket.chat/eslint-config": "^0.4.0", "@storybook/addon-storyshots": "5.3.21", "@storybook/react-native": "5.3.25", "@types/jest": "^26.0.24",