mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-23 00:05:22 +03:00
Migrate ESLint Configuration (#4375)
This commit is contained in:
parent
ebd15590af
commit
9f2efb2843
5 changed files with 99 additions and 53 deletions
58
eslint.config.js
Normal file
58
eslint.config.js
Normal file
|
@ -0,0 +1,58 @@
|
|||
import { defineConfig } from "eslint-define-config";
|
||||
import vuePlugin from "eslint-plugin-vue";
|
||||
import prettierPlugin from "eslint-plugin-prettier";
|
||||
import vueParser from "vue-eslint-parser";
|
||||
|
||||
export default defineConfig([
|
||||
{
|
||||
files: ["**/*.js", "**/*.vue"],
|
||||
languageOptions: {
|
||||
ecmaVersion: "latest",
|
||||
sourceType: "module",
|
||||
globals: {
|
||||
cordova: "readonly",
|
||||
cordovaUI: "readonly",
|
||||
ol: "readonly",
|
||||
wNumb: "readonly",
|
||||
ConfigStorage: "readonly",
|
||||
// start cordova bindings, remove after cordova is removed/replace/modularized
|
||||
cordova_serial: "readonly",
|
||||
fileChooser: "readonly",
|
||||
i18n: "readonly",
|
||||
appReady: "readonly",
|
||||
cordovaChromeapi: "readonly",
|
||||
appAvailability: "readonly",
|
||||
// end cordova bindings
|
||||
|
||||
// globals for vite
|
||||
__APP_PRODUCTNAME__: "readonly",
|
||||
__APP_VERSION__: "readonly",
|
||||
__APP_REVISION__: "readonly",
|
||||
},
|
||||
},
|
||||
plugins: {
|
||||
vue: vuePlugin,
|
||||
prettier: prettierPlugin,
|
||||
},
|
||||
rules: {
|
||||
"no-var": "error",
|
||||
"prefer-template": "error",
|
||||
"comma-dangle": ["error", "always-multiline"],
|
||||
indent: [
|
||||
"error",
|
||||
4,
|
||||
{
|
||||
SwitchCase: 1,
|
||||
},
|
||||
],
|
||||
},
|
||||
ignores: ["dist/", "*.json", "*.html", "*.less", "*.css", "package.json"],
|
||||
},
|
||||
{
|
||||
files: ["**/*.vue"],
|
||||
languageOptions: {
|
||||
parser: vueParser,
|
||||
},
|
||||
processor: "vue/vue",
|
||||
},
|
||||
]);
|
Loading…
Add table
Add a link
Reference in a new issue