Skip to content

Commit

Permalink
Add & configure ESlint; incl. plugins
Browse files Browse the repository at this point in the history
Issue 2096
  • Loading branch information
robyngit committed May 14, 2024
1 parent f33bf9e commit e76bafd
Show file tree
Hide file tree
Showing 3 changed files with 1,656 additions and 17 deletions.
30 changes: 30 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import globals from "globals";
import pluginJs from "@eslint/js";
import prettierConfig from "eslint-config-prettier";
import requirejs from "eslint-plugin-requirejs";

export default [
{
name: "ignore-external-dependencies",
ignores: ["src/components/"]
},
{
name: "lint-views-models-and-collections",
files: ["src/**/*.js"],
plugins: {
requirejs
},
languageOptions: {
sourceType: "commonjs",
ecmaVersion: 2020,
globals: {
...globals.browser,
...globals.amd,
MetacatUI: "readonly",
}
},
rules: requirejs.configs.recommended.rules
},
pluginJs.configs.recommended,
...[].concat(prettierConfig),
];
Loading

0 comments on commit e76bafd

Please sign in to comment.