Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6212

Disable eslint(no-use-before-define) eslint rule on typescript

$
0
0

I'm, trying to disable the rule eslint(no-use-before-define) on variables in typescript because in react-native the styles are used after the component declaration, and even though the @typescript-eslint error was fixed with "@typescript-eslint/no-use-before-define": ["error", { "variables": false }],the same error on eslint isn't fixed with "no-use-before-define": ["error", { "variables": false }].

In any case, for me is strange that is neccesary disable the rule in eslint since the parser is "parser": "@typescript-eslint/parser",

My .eslintrc config is:

"parser": "@typescript-eslint/parser","extends": ["@react-native-community","prettier","prettier/@typescript-eslint","prettier/react","universe/native","universe/shared/typescript-analysis","plugin:@typescript-eslint/eslint-recommended","plugin:@typescript-eslint/recommended","plugin:react-hooks/recommended","plugin:react-native-a11y/all","plugin:react-native/all"  ],"plugins": ["@typescript-eslint", "import", "react", "react-native"],"rules": {"@typescript-eslint/no-use-before-define": ["error", { "variables": false }],"no-use-before-define": ["error", { "variables": false }]  },

Viewing all articles
Browse latest Browse all 6212

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>