Closed sabrinaluo closed 7 years ago
this error, without seeing the rest of your code, means that you need to do
import React from 'react';
/* or */
const React = require('react');
Pick the one of those that matches the rest of your structure.
EDIT: Ignore me. You probably want to add the following to your .eslintrc
to disable this particular error.
{
"rules": [{"react/react-in-jsx-scope": 0}]
}
The airbnb config enables a lot of rules that will probably conflict with using vue - it might be possible to configure eslint-plugin-react
, however, to use vue, such that you wouldn't have to disable any (including "react in jsx scope"), using eslint-plugin-react's pragma settings.
Either way, the airbnb config does not support, recommend, or allow vue - https://npmjs.com/eslint-config-airbnb-base is for when you're not using React, and https://npmjs.com/eslint-config-airbnb is intended for React, exclusively.
Hi, I'm using vue2 with jsx, and got below error:
Is it possible to use
eslint-plugin-jsx-a11y
without react? how should I configure it? thank you.