forked from instructure/canvas-lms
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
52 lines (50 loc) · 1.39 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
module.exports = {
env: {
es6: true,
amd: true,
browser: true
},
extends: "airbnb",
parserOptions: {
ecmaVersion: 7,
ecmaFeatures: {
experimentalObjectRestSpread: true,
jsx: true
},
sourceType: "module"
},
parser: "babel-eslint",
globals: {
ENV: true,
INST: true,
},
plugins: [
"promise",
"import"
],
// 0 - off, 1 - warning, 2 - error
rules: {
"camelcase": [0], // because we have a ton of `const $user_name = $('#user_name')`
"class-methods-use-this": [0],
"comma-dangle": [2, "only-multiline"],
"func-names": [0],
"max-len": [1, {"code": 140}],
"no-continue": [0],
"no-else-return": [0],
"no-plusplus": [0],
"no-underscore-dangle": [0],
"no-unused-vars": [2, { "argsIgnorePattern": "^_"}],
"object-curly-spacing": [0],
"padded-blocks": [0], // so we can have space between the define([... and the callback
"semi": [0],
"space-before-function-paren": [2, "always"],
"import/no-extraneous-dependencies": [0], // allows 'i18n!webzip_exports' and 'compiled/foo/bar'
"import/named": [2],
"import/no-unresolved": [0],
"import/no-webpack-loader-syntax": [0],
"import/no-commonjs": [2],
"react/jsx-filename-extension": [2, { "extensions": [".js"] }],
"import/extensions": [1, { "js": "never", "jsx": "never", "json": "always" }],
"promise/avoid-new": [0],
}
}