Eslint adds unnecessary space between braces, Prettier shows error

I’ve had very similar error, but in my case default VSCode TypeScript formatter was messing with braces. In .vscode/settings.json add: “javascript.format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces”: false, “typescript.format.insertSpaceAfterOpeningAndBeforeClosingEmptyBraces”: false, You might also find useful option: “[typescript]”: { “editor.defaultFormatter”: “dbaeumer.vscode-eslint” }

Use npm uuid in reactjs

Try this: import React from “react”; import ReactDOM from “react-dom”; import uuid from “uuid”; function App() { return ( <div className=”App”> <h1>{uuid.v4()}</h1> </div> ); } const rootElement = document.getElementById(“root”); ReactDOM.render(<App />, rootElement); This is a working example: https://codesandbox.io/s/0pr5vz48kv

Eslint error when adding rule @typescript-eslint/interface-name-prefix

The rule @typescript-eslint/interface-name-prefix has been removed as you can see here. You can achieve the same effect of [ “error”, { “prefixWithI”: “always” }] with the following: { “@typescript-eslint/naming-convention”: [ “error”, { “selector”: “interface”, “format”: [“PascalCase”], “custom”: { “regex”: “^I[A-Z]”, “match”: true } } ] }

.eslintrc.js for React 17 and JSX without import ‘react’

You can read about it in React docs. If you are using eslint-plugin-react, the react/jsx-uses-react and react/react-in-jsx-scope rules are no longer necessary and can be turned off or removed. { // … “rules”: { // … “react/jsx-uses-react”: “off”, “react/react-in-jsx-scope”: “off” } } react-in-jsx-scope on github. To make it work, you should add those rules to … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)