forked from FOSS/BangleApps
Improve eslint config for modules
parent
22a43725ef
commit
c077a24512
|
@ -1,7 +1,8 @@
|
|||
{
|
||||
module.exports = {
|
||||
"env": {
|
||||
// TODO: "espruino": false
|
||||
// TODO: "banglejs": false
|
||||
// For a prototype of the above, see https://github.com/espruino/BangleApps/pull/3237
|
||||
},
|
||||
"extends": "eslint:recommended",
|
||||
"globals": {
|
||||
|
@ -58,8 +59,10 @@
|
|||
"Uint32Array": "readonly",
|
||||
"Uint8Array": "readonly",
|
||||
"Uint8ClampedArray": "readonly",
|
||||
"Unistroke": "readonly",
|
||||
"Waveform": "readonly",
|
||||
// Methods and Fields at https://banglejs.com/reference
|
||||
"__FILE__": "readonly",
|
||||
"analogRead": "readonly",
|
||||
"analogWrite": "readonly",
|
||||
"arguments": "readonly",
|
||||
|
@ -129,35 +132,49 @@
|
|||
"VIBRATE": "readonly",
|
||||
// Aliases and not defined at https://banglejs.com/reference
|
||||
"g": "readonly",
|
||||
"WIDGETS": "readonly"
|
||||
"WIDGETS": "readonly",
|
||||
"module": "readonly",
|
||||
"exports": "writable",
|
||||
"D0": "readonly",
|
||||
"D1": "readonly",
|
||||
"D2": "readonly",
|
||||
"D3": "readonly",
|
||||
"D4": "readonly",
|
||||
"D5": "readonly",
|
||||
"D6": "readonly",
|
||||
"D7": "readonly",
|
||||
"D8": "readonly",
|
||||
"D9": "readonly",
|
||||
"D10": "readonly",
|
||||
"D11": "readonly",
|
||||
"D12": "readonly",
|
||||
"D13": "readonly",
|
||||
"D14": "readonly",
|
||||
"D15": "readonly",
|
||||
"D16": "readonly",
|
||||
"D17": "readonly",
|
||||
"D18": "readonly",
|
||||
"D19": "readonly",
|
||||
"D20": "readonly",
|
||||
"D21": "readonly",
|
||||
"D22": "readonly",
|
||||
"D23": "readonly",
|
||||
"D24": "readonly",
|
||||
"D25": "readonly",
|
||||
"D26": "readonly",
|
||||
"D27": "readonly",
|
||||
"D28": "readonly",
|
||||
"D29": "readonly",
|
||||
"D30": "readonly",
|
||||
"D31": "readonly",
|
||||
},
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 11
|
||||
"ecmaVersion": 11,
|
||||
},
|
||||
"rules": {
|
||||
"indent": [
|
||||
"off",
|
||||
2,
|
||||
{
|
||||
"SwitchCase": 1
|
||||
}
|
||||
],
|
||||
"no-case-declarations": "off",
|
||||
"no-constant-condition": "off",
|
||||
"no-delete-var": "off",
|
||||
"no-empty": "off",
|
||||
"no-global-assign": "off",
|
||||
"no-inner-declarations": "off",
|
||||
"no-octal": "off",
|
||||
"no-prototype-builtins": "off",
|
||||
"no-redeclare": "off",
|
||||
"no-unreachable": "warn",
|
||||
"no-cond-assign": "warn",
|
||||
"no-useless-catch": "warn",
|
||||
// TODO: "no-undef": "warn",
|
||||
"no-undef": "off",
|
||||
"no-unused-vars": "off",
|
||||
"no-useless-escape": "off",
|
||||
"no-control-regex" : "off"
|
||||
}
|
||||
"no-inner-declarations": "off", // TODO: remove this after upgrade to ESLint 9
|
||||
"no-control-regex": "off",
|
||||
},
|
||||
}
|
Loading…
Reference in New Issue