Skip to content

Commit

Permalink
Build: Update ESLint
Browse files Browse the repository at this point in the history
  • Loading branch information
stephendade committed Nov 11, 2024
1 parent 986b02e commit 1a177b1
Show file tree
Hide file tree
Showing 4 changed files with 138 additions and 321 deletions.
40 changes: 0 additions & 40 deletions .eslintrc.json

This file was deleted.

42 changes: 42 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import globals from "globals";
import pluginJs from "@eslint/js";
import pluginReact from "eslint-plugin-react";
import mochaPlugin from 'eslint-plugin-mocha';

export default [
{
files: ["src/*.js"],
languageOptions: {
sourceType: 'module',
}
},
{
files: ["server/*.js", "mavlink/*.js"], languageOptions: {
sourceType: "commonjs",
}
},
{
languageOptions: {
globals: {
...globals.browser, ...globals.node
}
}
},
{
settings : {
react: {
version: 'detect', // Automatically detect the version of React
},
}
},
{
ignores : [
"node_modules/",
"build/"
],
},
pluginJs.configs.recommended,
pluginReact.configs.flat.recommended,
pluginReact.configs.flat['jsx-runtime'],
mochaPlugin.configs.flat.recommended
];
Loading

0 comments on commit 1a177b1

Please sign in to comment.