Closed rhettlivingston closed 8 years ago
Fixing the let could be done pretty easily with code like
let generateDataClient;
if (Meteor.isClient) {
...
}
const generateData = Meteor.isClient ? generateDataClient : null;
Closed via #158.
`import React, {PropTypes} from 'react'; import { connect } from 'react-redux'; import { addTodo } from '../actions';
let AddTodo = ({ dispatch }) => { let input;
return (
); };
AddTodo.propTypes = { dispatch: PropTypes.func.isRequired };
AddTodo = connect()(AddTodo);
export default AddTodo;`
Hi, i got this error and I can't figure out what's happening, can you help me? Thanks!
While working on another update, I noted that ESLint isn't reporting unresolved modules in import statements as expected. I could actually change an import such as
and still get a clean report from 'meteor npm run lint'.
After some investigation, I realized that this was due to outdated versions of the devDependencies which when corrected revealed a missing devDependency for eslint-import-resolver-meteor (in addition to one for eslint-plugin-jsx-a11y that is due to a change in eslint-plugin-react's requirements).
After correcting these dependencies, 'meteor npm run lint' reports quite a few problems, partly due to new rules in updated plugins and partly modules that should be in '.meteor/packages' but are only in '.meteor/versions' (i.e. we got away with the imports because a module we are importing them imported them for us).
59 out of the 71 errors are due to a new(ish) rule in airbnb, no-underscore-dangle. Basically, "_" and "_id" are no longer allowed as variable names. We could create a list of those we'd like to allow in the rule configuration,,, but I think we should just disable it.
Other errors are due to unresolved paths to modules including
That leaves
I'm unsure of how to fix the import/no-mutable-exports error and can't fix the "global-require" errors without updating to 1.3.4.1 and using the new conditional imports. My thought is to disable these on those lines only. For now.
I'm submitting a PR shortly that implements all of the above.