Last active
August 10, 2020 14:01
-
-
Save myobie/1b72f2e206caa86551941f6161f3a733 to your computer and use it in GitHub Desktop.
How to setup a hugo repo (or any static website) with eslint and the standard config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
root: true, | |
env: { | |
browser: true, | |
mocha: true | |
}, | |
globals: { | |
expect: true | |
}, | |
plugins: [], | |
extends: [ | |
'eslint-config-standard' | |
], | |
ignorePatterns: [ | |
'.yarn/**', | |
'dist/**', | |
'vendor/**', | |
'node_modules/**', | |
'public/**' | |
], | |
rules: { | |
'no-use-before-define': ['error', { functions: false, classes: true, variables: true }] | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "website", | |
"version": "1.0.0", | |
"description": "The website", | |
"scripts": { | |
"clear": "rm -rf public/*", | |
"dev": "hugo server -w -D --baseUrl=/ --appendPort=false", | |
"fix": "eslint . --ext .js --fix", | |
"lint": "eslint . --ext .js" | |
}, | |
"license": "UNLICENSED", | |
"dependencies": {}, | |
"devDependencies": { | |
"eslint": "^7.6.0", | |
"eslint-config-standard": "^14.1.1", | |
"eslint-plugin-import": "^2.22.0", | |
"eslint-plugin-node": "^11.1.0", | |
"eslint-plugin-promise": "^4.2.1", | |
"eslint-plugin-standard": "^4.0.1", | |
"postcss-cli": "^7.1.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment