-
-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add & configure ESlint; incl. plugins
Issue 2096
- Loading branch information
Showing
3 changed files
with
1,656 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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), | ||
]; |
Oops, something went wrong.