I've installed eslint-config-airbnb that is supposed to pre configure ESLINT for React:
Our default export contains all of our ESLint rules, including
ECMAScript 6+ and React. It requires eslint, eslint-plugin-import,
eslint-plugin-react, and…
)}
Somehow ESLint flags the line "you're free" with error error HTML entities must be escaped react/no-unescaped-entities
However, from what I can see,…
I installed jest v24.7.1in my project with:
npm install jest -D
Then I start writing some test files, However I got these eslint errors:
'describe' is not defined. eslint (no-undef)
'it' is not defined. eslint (no-undef)
'expect' is not defined.…
I'm getting the following two errors on all TypeScript files using ESLint in VS Code:
Definition for rule 'import/extensions' was not found.eslint(import/extensions)
Definition for rule 'import/no-extraneous-dependencies' was not…
I am trying to use ESLint in WebStrom, but it doesn't work and displays an error:
ESLint: Parsing error: This experimental syntax requires enabling one of the following parser plugin(s): 'jsx, flow, typescript' (2:9).
Here is my .eslintrc and…
I am using airbnb extension for linting my React Project. Now, in my index.js I have:
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
ReactDOM.render(
,
document.getElementById('root'),
);
linter…
Recently, I've started using Visual Studio Code for my editor and found the Prettier - JavaScript formatter. I think it's a great plugin because it helps me keep my code looking nice.
I set up Airbnb's ESLint config and have found that to be super…
I have been struggling all morning with this issue and couldn't find the solution anywhere. I am new to typescript, and I am trying to set it up properly with Eslint and Prettier to ensure the code is properly formated.
So, the issue I am facing…
This is my original code:
const buildTableContent = (settings) => {
const entries = [];
for (const key in settings) {
for (const subkey in env[key]) {
settings is basically a dictionary of dictionary
{
'env': {'name': 'prod'},
…
I'm using ESLint with the Airbnb plugin (eslint-config-airbnb) and Babel parser. I've just added the extra rule of using Tab characters for indentation instead of spaces.
Here is my .eslintrc:
{
"parser": "babel-eslint",
"extends":…
I've applied eslint airbnb standard to my code, so now this code:
handleSubmit = (event) => {
event.preventDefault();
this.props.onSearch(this.query.value);
event.target.blur();
}
causes this error:
[eslint] Must use destructuring props…
I have the following PropTypes:
SmartTable.propTypes = {
name: React.PropTypes.string.isRequired,
cols: React.PropTypes.array.isRequired,
rows: React.PropTypes.array.isRequired,
};
but the linter says me:
Prop type "array" is forbidden, how…
When using eslint in Visual Studio Code, AirBnB style Ubuntu Linux, no-plusplus is enabled as default so using ++ for example in a for loop will error: [eslint] Unary operator '++' used. (no-plusplus)
How do you disable that setting?
Seems like i am missing something here, it should work without errors but eslint keeps throwing the following:
Unable to resolve path to module 'react'. (import/no-unresolved)
Missing file extension for "react" (import/extensions)
when trying to…