generated from MatrixRequirements/matrix-ui-plugin-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
36 lines (35 loc) · 1.27 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
module.exports = {
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended"
],
ignorePatterns: [
"*.js",
],
"rules": {
"@typescript-eslint/triple-slash-reference":"off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-unused-vars":"off",
"no-unused-vars": ['warn', { 'argsIgnorePattern': '.*' }],
// allow that = this
"@typescript-eslint/no-this-alias": [
"error",
{
"allowDestructuring": true, // Allow `const { props, state } = this`; false by default
"allowedNames": ["that"] // Allow `const that= this`; `[]` by default
}
],
// allow empty arrow functions, e.g. ml.UI.addDropdownToValue(something, "Select", options, "w1", weights, false, false, () => { });
"@typescript-eslint/no-empty-function":["error", { 'allow': ["arrowFunctions"] }],
"no-self-assign":"off", // allow stuff like window.location.href = window.location.href
"prefer-const":"off", // allow let rather than enforcing const
"no-empty":"off", // allow empty functions, i.e. () => {}
"@typescript-eslint/no-empty-interface":"off"
}
}