Skip to content

Commit 8cf0d7d

Browse files
committed
Update eslint config. Trigger eslint on server restart.
1 parent 7734943 commit 8cf0d7d

File tree

4 files changed

+5
-13
lines changed

4 files changed

+5
-13
lines changed

.eslintrc

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,9 @@
3030
2,
3131
"nofunc"
3232
],
33-
// TODO: turning off for now
33+
// TODO: turning on later
3434
"comma-dangle": [
3535
0
36-
],
37-
"one-var": [
38-
0
39-
],
40-
"func-names": [
41-
0
42-
],
43-
"no-else-return": [
44-
0
4536
]
4637
},
4738
"env": {

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This is a starter kit for building REST APIs with ES6 and Express. Helps you sta
1212
|----------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
1313
| ES2015 via Babel | ES2015 support using [Babel](https://babeljs.io/). |
1414
| Code Linting | JavaScript code linting is done using [ESLint](http://eslint.org) - a pluggable linter tool for identifying and reporting on patterns in JavaScript. Uses ESLint with [eslint-config-airbnb](https://github.com/airbnb/javascript/tree/master/packages/eslint-config-airbnb), which tries to follow the Airbnb JavaScript style guide. |
15-
| Auto server restart | Restart the server using [nodemon](https://github.com/remy/nodemon) in real-time anytime an edit is made, with babel compilation. |
15+
| Auto server restart | Restart the server using [nodemon](https://github.com/remy/nodemon) in real-time anytime an edit is made, with babel compilation and eslint. |
1616
| Environment variables | Supports setting env variable using .env file at the root. Uses [dot-env](https://www.npmjs.com/package/dotenv) to enable this feature. |
1717

1818
## Getting Started

config/express.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ app.use(methodOverride());
2222
// Enable CORS - Cross Origin Resource Sharing
2323
app.use(cors());
2424

25+
// mount all routes on /api path
2526
app.use('/api', routes);
2627

2728
// catch different types of error

gulpfile.babel.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ gulp.task('eslint', () =>
4949
);
5050

5151
// Start server with restart on file changes
52-
gulp.task('nodemon', ['babel'], () =>
52+
gulp.task('nodemon', ['eslint', 'babel'], () =>
5353
plugins.nodemon({
5454
script: path.join('dist', 'index.js'),
5555
ext: 'js',
5656
ignore: ['node_modules/**/*.js', 'dist/**/*.js'],
57-
tasks: ['babel']
57+
tasks: ['eslint', 'babel']
5858
})
5959
);
6060

0 commit comments

Comments
 (0)