1
0
Fork 0

For apps, add eslint with baseline .eslintrc.json

Add also npm run target "lint-apps".
master
Tuukka Ikkala 2020-05-23 23:34:16 +03:00
parent 3eb150792c
commit cb90425fdf
2 changed files with 50 additions and 1 deletions

47
apps/.eslintrc.json Normal file
View File

@ -0,0 +1,47 @@
{
"env": {
"shared-node-browser": true
},
"extends": "eslint:recommended",
"globals": {
"require": "readonly",
"process": "readonly",
"g": "writable",
"E": "readonly",
"Bangle": "readonly",
"Modules": "readonly",
"clearWatch": "readonly",
"setWatch": "readonly",
"getTime": "readonly",
"setTime": "readonly",
"atob": "readonly",
"load": "readonly",
"save": "readonly",
"BTN1": "readonly",
"BTN2": "readonly",
"BTN3": "readonly",
"BTN4": "readonly",
"BTN5": "readonly",
"NRF": "readonly",
"WIDGETS": "readonly"
},
"parserOptions": {
"ecmaVersion": 11
},
"rules": {
"linebreak-style": "off",
"no-case-declarations": "off",
"no-constant-condition": "off",
"no-delete-var": "off",
"no-empty": "off",
"no-extra-semi": "off",
"no-inner-declarations": "off",
"no-mixed-spaces-and-tabs": "off",
"no-octal": "off",
"no-prototype-builtins": "off",
"no-redeclare": "off",
"no-undef": "off",
"no-unused-vars": "off",
"no-useless-escape": "off"
}
}

View File

@ -4,9 +4,11 @@
"author": "Gordon Williams <gw@pur3.co.uk> (http://espruino.com)",
"version": "0.0.1",
"devDependencies": {
"acorn": ""
"acorn": "",
"eslint": "7.1.0"
},
"scripts": {
"lint-apps": "eslint ./apps --ext .js",
"test": "node bin/sanitycheck.js",
"start": "npx http-server"
},