# Using eslint-config-freecodecamp for fcc projects

**URL:** <https://forum.freecodecamp.org/t/using-eslint-config-freecodecamp-for-fcc-projects/161003>\
**Category:** General\
**Created:** [November 27, 2017, 1:25am UTC](https://forum.freecodecamp.org/t/using-eslint-config-freecodecamp-for-fcc-projects/161003 "2017-11-27T01:25:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nikrb](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/nikrb/32/18397_2.png) [@nikrb](https://forum.freecodecamp.org/u/nikrb)\
**Post date:** [November 27, 2017, 1:25am UTC](https://forum.freecodecamp.org/t/using-eslint-config-freecodecamp-for-fcc-projects/161003/1 "2017-11-27T01:25:13Z")

</div>

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](https://www.fullstackreact.com/articles/using-create-react-app-with-a-server/) fullstack (tutorial) setup for fcc backend dev projects with following structure:

```auto
/...
/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:

```auto
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?

---

<div class="post-metadata">

**Author:** ![honmanyau](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/honmanyau/32/45787_2.png) [@honmanyau](https://forum.freecodecamp.org/u/honmanyau)\
**Post date:** [November 27, 2017, 11:39am UTC](https://forum.freecodecamp.org/t/using-eslint-config-freecodecamp-for-fcc-projects/161003/2 "2017-11-27T11:39:49Z")

</div>

If you are following the guide exactly then I suspect the problem is potentially because `create-react-app` works a little differently because everything it’s supposed to be opinionated.

[This link](https://github.com/facebookincubator/create-react-app/tree/master/packages/eslint-config-react-app) will likely solve your problems—I’ve only dabbled with it enough to get the default linting rules in CRA working in Atom, but they do mention that you can override CRA settings by editing `.eslintrc`.

I hope that helps. 🙂

---

<div class="post-metadata">

**Author:** ![nikrb](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/nikrb/32/18397_2.png) [@nikrb](https://forum.freecodecamp.org/u/nikrb)\
**Post date:** [November 27, 2017, 3:57pm UTC](https://forum.freecodecamp.org/t/using-eslint-config-freecodecamp-for-fcc-projects/161003/3 "2017-11-27T15:57:15Z")

</div>

yes the default works a treat, but I’m specifically trying to get freecodecamp working. thanx for taking the time to respond dude, appreciate it 🙂

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 17, 2021, 8:33pm UTC](https://forum.freecodecamp.org/t/using-eslint-config-freecodecamp-for-fcc-projects/161003/4 "2021-01-17T20:33:49Z")

</div>

Closed on January 17, 2021, 8:33pm UTC


