Skip to content
Permalink
Browse files

Setup ESLint with Airbnb coding style

  • Loading branch information...
bhubr committed Aug 31, 2019
1 parent b79f5fa commit c6b7fef0aa7e21b67d880a4e0b0c3de2b275dc2d
Showing with 585 additions and 23 deletions.
  1. +20 −0 packages/back/.eslintrc.js
  2. +1 −1 packages/back/babel.config.js
  3. +4 −0 packages/back/package.json
  4. +2 −1 packages/back/src/app.js
  5. +558 −21 packages/back/yarn.lock
@@ -0,0 +1,20 @@
module.exports = {
env: {
es6: true,
node: true,
jest: true
},
extends: [
'airbnb-base'
],
globals: {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly'
},
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module'
},
rules: {
}
};
@@ -1,3 +1,3 @@
module.exports = {
presets: [['@babel/preset-env', {targets: {node: 'current'}}]],
presets: [['@babel/preset-env', { targets: { node: 'current' } }]],
};
@@ -5,6 +5,7 @@
"main": "build/index.js",
"scripts": {
"build": "npx babel src -d build",
"lint": "npx eslint --fix *.js src test",
"start": "nodemon --exec ./node_modules/@babel/node/bin/babel-node.js src/index",
"test": "jest"
},
@@ -20,6 +21,9 @@
"@babel/core": "^7.5.5",
"@babel/node": "^7.5.5",
"@babel/preset-env": "^7.5.5",
"eslint": "6.2.2",
"eslint-config-airbnb-base": "^14.0.0",
"eslint-plugin-import": "^2.18.2",
"jest": "^24.9.0",
"nodemon": "^1.19.1",
"prettier": "^1.18.2",
@@ -3,7 +3,8 @@ import express from 'express';
import bodyParser from 'body-parser';

const app = express();
app.use(bodyParser.json());

app.get('/', (req, res) => res.json({ foo: 'bar' }));

module.exports = app;
module.exports = app;

0 comments on commit c6b7fef

Please sign in to comment.
You can’t perform that action at this time.