Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
{
2
  "env": {
3
    "browser": true,
4
    "amd": true
5
  },
6
  "globals": {
7
    "M": true,
8
    "Y": true,
9
    "H5PIntegration": true,
10
    "H5PEditor": true,
11
    "H5P": true
12
  },
13
  "rules": {
14
    "comma-dangle": "off",
15
    "no-compare-neg-zero": "error",
16
    "no-cond-assign": "error",
17
    "no-console": ["error", {"allow": ["warn", "error"]}],
18
    "no-constant-condition": "error",
19
    "no-control-regex": "error",
20
    "no-debugger": "error",
21
    "no-dupe-args": "error",
22
    "no-dupe-keys": "error",
23
    "no-duplicate-case": "error",
24
    "no-empty": "warn",
25
    "no-empty-character-class": "error",
26
    "no-ex-assign": "error",
27
    "no-extra-boolean-cast": "error",
28
    "no-extra-parens": "off",
29
    "no-extra-semi": "error",
30
    "no-func-assign": "error",
31
    "no-inner-declarations": "error",
32
    "no-invalid-regexp": "error",
33
    "no-irregular-whitespace": "error",
34
    "no-obj-calls": "error",
35
    "no-prototype-builtins": "off",
36
    "no-regex-spaces": "error",
37
    "no-sparse-arrays": "error",
38
    "no-unexpected-multiline": "error",
39
    "no-unreachable": "warn",
40
    "no-unsafe-finally": "error",
41
    "no-unsafe-negation": "error",
42
    "use-isnan": "error",
43
    "valid-jsdoc": ["warn", { "requireReturn": false, "requireParamDescription": false, "requireReturnDescription": false }],
44
    "valid-typeof": "error",
45
    "array-callback-return": "warn",
46
    "block-scoped-var": "warn",
47
    "complexity": "warn",
48
    "consistent-return": "warn",
49
    "curly": "error",
50
    "dot-notation": "warn",
51
    "no-alert": "warn",
52
    "no-caller": "error",
53
    "no-case-declarations": "error",
54
    "no-div-regex": "error",
55
    "no-empty-pattern": "error",
56
    "no-empty-function": "warn",
57
    "no-eq-null": "error",
58
    "no-eval": "error",
59
    "no-extend-native": "error",
60
    "no-extra-bind": "warn",
61
    "no-fallthrough": "error",
62
    "no-floating-decimal": "warn",
63
    "no-global-assign": "warn",
64
    "no-implied-eval": "error",
65
    "no-invalid-this": "error",
66
    "no-iterator": "error",
67
    "no-labels": "error",
68
    "no-loop-func": "error",
69
    "no-multi-spaces": "warn",
70
    "no-multi-str": "error",
71
    "no-new-func": "error",
72
    "no-new-wrappers": "error",
73
    "no-octal": "error",
74
    "no-octal-escape": "error",
75
    "no-proto": "error",
76
    "no-redeclare": "warn",
77
    "no-return-assign": "error",
78
    "no-script-url": "error",
79
    "no-self-assign": "error",
80
    "no-self-compare": "error",
81
    "no-sequences": "warn",
82
    "no-throw-literal": "warn",
83
    "no-unmodified-loop-condition": "error",
84
    "no-unused-expressions": "error",
85
    "no-unused-labels": "error",
86
    "no-useless-call": "warn",
87
    "no-useless-escape": "warn",
88
    "no-with": "error",
89
    "wrap-iife": ["error", "any"],
90
 
91
    "no-delete-var": "error",
92
    "no-undef": "error",
93
    "no-undef-init": "error",
94
    "no-unused-vars": ["error", { "caughtErrors": "none" }],
95
 
96
    "array-bracket-spacing": "warn",
97
    "block-spacing": "warn",
98
    "brace-style": ["warn", "1tbs"],
99
    "camelcase": "warn",
100
    "capitalized-comments": ["warn", "always", { "ignoreConsecutiveComments": true }],
101
    "comma-spacing": ["warn", { "before": false, "after": true }],
102
    "comma-style": ["warn", "last"],
103
    "computed-property-spacing": "error",
104
    "consistent-this": "off",
105
    "eol-last": "off",
106
    "func-call-spacing": ["warn", "never"],
107
    "func-names": "off",
108
    "func-style": "off",
109
    "indent": ["off", 4, { "SwitchCase": 1 }],
110
    "key-spacing": ["warn", { "beforeColon": false, "afterColon": true, "mode": minimum }],
111
    "keyword-spacing": "warn",
112
    "linebreak-style": ["error", "unix"],
113
    "lines-around-comment": "off",
114
    "max-len": ["error", 132],
115
    "max-lines": "off",
116
    "max-depth": "warn",
117
    "max-nested-callbacks": ["warn", 5],
118
    "max-params": "off",
119
    "max-statements": "off",
120
    "max-statements-per-line": ["warn", { max: 2 }],
121
    "new-cap": ["warn", { "properties": false }],
122
    "new-parens": "warn",
123
    "newline-after-var": "off",
124
    "newline-before-return": "off",
125
    "newline-per-chained-call": "off",
126
    "no-array-constructor": "off",
127
    "no-bitwise": "error",
128
    "no-continue": "off",
129
    "no-inline-comments": "off",
130
    "no-lonely-if": "off",
131
    "no-mixed-operators": "off",
132
    "no-mixed-spaces-and-tabs": "error",
133
    "no-multiple-empty-lines": "warn",
134
    "no-negated-condition": "off",
135
    "no-nested-ternary": "warn",
136
    "no-new-object": "off",
137
    "no-plusplus": "off",
138
    "no-tabs": "error",
139
    "no-ternary": "off",
140
    "no-trailing-spaces": "error",
141
    "no-underscore-dangle": "off",
142
    "no-unneeded-ternary": "off",
143
    "no-whitespace-before-property": "warn",
144
    "object-curly-newline": "off",
145
    "object-curly-spacing": "warn",
146
    "object-property-newline": "off",
147
    "one-var": "off",
148
    "one-var-declaration-per-line": ["warn", "initializations"],
149
    "operator-assignment": "off",
150
    "operator-linebreak": "off",
151
    "padded-blocks": "off",
152
    "quote-props": ["warn", "as-needed", {"unnecessary": false, "keywords": true, "numbers": true}],
153
    "quotes": "off",
154
    "require-jsdoc": "warn",
155
    "semi": "error",
156
    "semi-spacing": ["warn", {"before": false, "after": true}],
157
    "sort-vars": "off",
158
    "space-before-blocks": "warn",
159
    "space-before-function-paren": ["warn", "never"],
160
    "space-in-parens": "warn",
161
    "space-infix-ops": "warn",
162
    "space-unary-ops": "warn",
163
    "spaced-comment": "warn",
164
    "unicode-bom": "error",
165
    "wrap-regex": "off",
166
 
167
    "no-restricted-properties": ["warn", {
168
        "object": "M",
169
        "property": "str",
170
        "message": "Use AMD module 'core/str' or M.util.get_string()"
171
    }],
172
 
173
  },
174
  overrides: [
175
    {
176
      files: ["**/yui/src/**/*.js"],
177
 
178
      rules: {
179
        "no-undef": "off",
180
        "no-unused-vars": "off",
181
        "no-unused-expressions": "off"
182
      }
183
    },
184
    {
185
      files: ["**/amd/src/*.js"],
186
      rules: {
187
        "no-unused-vars": "error",
188
        "no-implicit-globals": "error"
189
      }
190
    }
191
  ]
192
}