forked from discourse/lint-configs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
117 lines (115 loc) · 2.7 KB
/
index.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
"use strict";
/* eslint-env node */
module.exports = {
root: true,
parser: "@babel/eslint-parser",
env: {
browser: true,
builtin: true,
es6: true,
node: true,
},
parserOptions: {
ecmaVersion: 2018,
sourceType: "module",
requireConfigFile: false,
babelOptions: {
plugins: [["@babel/plugin-proposal-decorators", { legacy: true }]],
},
},
plugins: ["ember", "discourse-ember", "sort-class-members"],
globals: {
$: true,
Blob: true,
define: true,
File: true,
globalThis: true,
moment: true,
require: true,
requirejs: true,
pauseTest: true,
},
rules: {
"block-scoped-var": 2,
"dot-notation": 0,
eqeqeq: [2, "allow-null"],
"guard-for-in": 2,
"no-alert": 2,
"no-bitwise": 2,
"no-caller": 2,
"no-cond-assign": 0,
"no-console": 2,
"no-debugger": 2,
"no-empty": 0,
"no-eval": 2,
"no-extend-native": 2,
"no-extra-parens": 0,
"no-inner-declarations": 2,
"no-irregular-whitespace": 2,
"no-iterator": 2,
"no-loop-func": 2,
"no-mixed-spaces-and-tabs": 2,
"no-multi-str": 2,
"no-new": 2,
"no-plusplus": 0,
"no-proto": 2,
"no-restricted-globals": [2, "Promise"],
"no-script-url": 2,
"no-sequences": 2,
"no-shadow": 2,
"no-this-before-super": 2,
"no-trailing-spaces": 2,
"no-undef": 2,
"no-unused-vars": 2,
"no-with": 2,
"no-var": 2,
radix: 2,
semi: 2,
strict: 0,
"valid-typeof": 2,
"wrap-iife": [2, "inside"],
curly: 2,
"no-duplicate-imports": 2,
"sort-imports": [
"error",
{
ignoreDeclarationSort: true,
},
],
"object-shorthand": ["error", "properties"],
"no-dupe-class-members": 2,
"sort-class-members/sort-class-members": [
2,
{
order: [
"[static-properties]",
"[static-methods]",
"[injected-services]",
"[injected-controllers]",
"[tracked-properties]",
"[properties]",
"[private-properties]",
"constructor",
"[everything-else]",
],
groups: {
"injected-services": [
{ groupByDecorator: "service", type: "property" },
],
"injected-controllers": [
{ groupByDecorator: "controller", type: "property" },
],
"tracked-properties": [
{ groupByDecorator: "tracked", type: "property" },
],
"private-properties": [
{ type: "property", private: true },
{ type: "property", name: "/_.+/" },
],
},
accessorPairPositioning: "getThenSet",
stopAfterFirstProblem: false,
},
],
},
};