Skip to content

Commit

Permalink
1.9.0 - add eslint
Browse files Browse the repository at this point in the history
Signed-off-by: Reece Dunham <me@rdil.rocks>
  • Loading branch information
RDIL committed Mar 17, 2020
1 parent a41737c commit aa7768c
Show file tree
Hide file tree
Showing 4 changed files with 630 additions and 9 deletions.
11 changes: 11 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
env:
node: true
es6: true
extends: 'eslint:recommended'
globals:
Atomics: readonly
SharedArrayBuffer: readonly
parserOptions:
ecmaVersion: 2020
sourceType: module
rules: {}
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "static-server-rdil",
"version": "1.8.1",
"version": "1.9.0",
"description": "Static web server",
"homepage": "https://github.com/rdilweb/static-server",
"bin": {
Expand Down Expand Up @@ -32,7 +32,8 @@
"scripts": {
"prettier": "prettier --write **/**.{js,json}",
"build": "babel source -d src",
"dev": "yarn build && node src/index.js"
"dev": "yarn build && node src/index.js",
"test": "eslint source/*.js"
},
"devDependencies": {
"@babel/cli": "^7.8.4",
Expand All @@ -42,6 +43,7 @@
"@types/node": "^13.7.7",
"@types/node-emoji": "^1.8.1",
"@types/showdown": "^1.9.3",
"eslint": "^6.8.0",
"prettier": "^1.19.1"
},
"prettier": {
Expand Down
3 changes: 3 additions & 0 deletions source/serverHandling.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { lookup } from "mime-types"
import { join, extname } from "path"
import { stat as _stat, createReadStream, readFile } from "fs"
/* eslint-disable */
// we need this for IDEs to enable intellisense for class members
import http from "http"
/* eslint-enable */
import chalk from "chalk"
import getHeaders from "./headers"
import markdown from "./markdownRendering"
Expand Down
Loading

0 comments on commit aa7768c

Please sign in to comment.