I have fcc running locally and linting works fine in Atom editor.
I thought I would add linting into my projects to get used to fcc style.
I’m using this fullstack (tutorial) setup for fcc backend dev projects with following structure:
/...
/client/src/App.js
/server/index.js
/package.json
/...
I copied .eslintrc
and .eslintignore
from fcc local and installed eslint and eslint-config-freecodecamp (locally) to a test project with above structure.
I get the following error for (client) react app.js and (server) index.js:
Error while running ESLint: ImportDeclaration should appear when the mode is ES6 and in the module context.
Top line of files where error appears:
app.js: import React from 'react';
index.js:
if (process.env.NODE_ENV !== 'production') {
require( 'dotenv').config();
}
Desperation lead me to try copying the .babelrc
and .jshintrc
files but no luck.
any suggestions?