mirror of https://github.com/espruino/BangleApps
For apps, add eslint with baseline .eslintrc.json
Add also npm run target "lint-apps".pull/450/head
parent
3eb150792c
commit
cb90425fdf
|
@ -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"
|
||||
}
|
||||
}
|
|
@ -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"
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue