I am trying to lint my react project with typescript template. I want to use the airbnb style guide, but when the ran the comm npx eslint --init I only get the standard option and the xo option. Is there a reason for this?
I have added eslint with Prettier and the Airbnb-TypeScript-Styleguide to my Angular-project and it says you shouldn't have any dangling underscores. How am I meant to name my private fields that are accessed through getters and…
I updated my Eslint rules using airbnb in my React typescript project.
My project doesn't use 'create-reac-app'. So I have to extend airbnb since I am also using and extending airbnb-typescript.
eslint-plugin-react and eslint-plugin-react-hooks are…
I updated my Eslint rules using airbnb in my React typescript project.
I get those errors now:
React Hook useCallback has a missing dependency: 'setCookie'. Either
include it or remove the dependency
array.eslintreact-hooks/exhaustive-deps
I have…
I am updating eslint rules in my React project.
Currently I have this in the extend property inside eslintrc.js:
extends: [
'airbnb',
'airbnb-typescript',
'airbnb/hooks',
// "plugin:@typescript-eslint/recommended",
//…
My project is not using create-react-app. I am upadting my Eslint. How do I add React properly to the eslintrc.js file?
Currently I have this in the extend property:
extends: [
'airbnb',
'airbnb-typescript',
'airbnb/hooks',
//…
for example, running npx eslint ./App.js --fix on a fresh react native app that went through the eslint init process will cause the code to format from:
App.js:
import {
StyleSheet,
View,
TextInput,
ImageBackground,
Image,
…
I have globally installed eslint via cmd and its also installed as an extension in vs code. After that I used the following command in the vs code terminal to initialize it:
npx eslint --init
I used the Airbnb style guide option while setting it…
I have installed airbnb style guide in my eslint config. So for airbnb it is recommended to use single quotes for strings. But by adding plugin:prettier/recommended in extends it disables single quotes. So how do I make sure that the rule is…
I get eslint error and how to I fix it?
const filter = state.playListSetData.filter(item => {
// 若兩相符合,抓播放設定底下的其他資料
if (item.uuid === payload[i].playerList[j].uuid) {
…
I've recently started using eslint and prettier in my projects, but I'm always not sure if I'm installing them correctly. I've read several articles online and it seems each one does it differently. I'm trying to use the Airbnb configuration. I…
and thanks for the time taken for reading this.
I'm trying to learn Typescript with react using eslint with the AirBnB config. Something as simple as mapping an array of objects and creating a custom functional component with each is giving me the…
I have if block in my Angular component:
if (desc.length > 0) {
[this.errorMsg] = desc
}
However, Prettier doesn't like it and recommends to put ; at the beginning of the destructuring assignment:
if (desc.length > 0) {
;[this.errorMsg] =…