Files
espurna/code/eslint.config.mjs
Maxim Prokhorov 289fea4f3d webui: separate sources per module
* migrate to esbuild from terser, since now js source needs bundling
* (temporary?) hijack inline-source object handling to inline html files
* get rid of legacy removeIf comments in source in favour of explicit
  removal either through bundling tree-shaking and / or manual module-*
  class element removal w/ jsdom
* get rid of multi-layered custom checkboxes in favour of
  `appearance: none` directly styling the `input` elem
  also removes scripting part that was supposed to adjust for=... labels
* update to html-minifier-terser, up-to-date html-minifier fork
* update to iro.js 5.5.x, using npm to manage dependencies
* build script can now update resulting html output
  (called after bundling stage, before minification)
2024-06-22 19:49:59 +03:00

43 lines
1.4 KiB
JavaScript

import globals from 'globals';
import js from '@eslint/js';
export default [
{
files: ['html/src/**/*.mjs'],
languageOptions: {
"globals": {
...globals.es2021,
...globals.browser,
"MODULE_API": "readonly",
"MODULE_CMD": "readonly",
"MODULE_CURTAIN": "readonly",
"MODULE_DBG": "readonly",
"MODULE_DCZ": "readonly",
"MODULE_GARLAND": "readonly",
"MODULE_HA": "readonly",
"MODULE_LED": "readonly",
"MODULE_LIGHT": "readonly",
"MODULE_LIGHTFOX": "readonly",
"MODULE_LOCAL": "readonly",
"MODULE_OTA": "readonly",
"MODULE_RELAY": "readonly",
"MODULE_RELAY": "readonly",
"MODULE_RELAY": "readonly",
"MODULE_RFB": "readonly",
"MODULE_RFM69": "readonly",
"MODULE_RPN": "readonly",
"MODULE_SCH": "readonly",
"MODULE_SNS": "readonly",
"MODULE_THERMOSTAT": "readonly",
"MODULE_TSPK": "readonly",
}
},
rules: {
...js.configs.recommended.rules,
"no-invalid-this": "error",
"eqeqeq": "error",
"prefer-arrow-callback": "error"
}
}
];