@@ -32,34 +32,99 @@ module.exports = {
32
32
rules : {
33
33
'no-use-extend-native/no-use-extend-native' : 'error' ,
34
34
35
- // TODO: Enable this again in the next XO release.
36
- // Start with just a manual list of some non-contreversial abbreviations.
37
- //
38
35
// TODO: Remove this override at some point.
39
36
// It's just here to ease users into readable variable names.
40
- // 'unicorn/prevent-abbreviations': [
41
- // 'error',
42
- // {
43
- // checkFilenames: false,
44
- // replacements: {
45
- // args: false,
46
- // application: {
47
- // app: true
48
- // },
49
- // applications: {
50
- // apps: true
51
- // }
52
- // }
53
- // }
54
- // ],
55
- 'unicorn/prevent-abbreviations' : 'off' ,
37
+ 'unicorn/prevent-abbreviations' : [
38
+ 'error' ,
39
+ {
40
+ checkFilenames : false ,
41
+ checkDefaultAndNamespaceImports : false ,
42
+ checkShorthandImports : false ,
43
+ extendDefaultReplacements : false ,
44
+ replacements : {
45
+ // Not part of `eslint-plugin-unicorn`
46
+ application : {
47
+ app : true
48
+ } ,
49
+ applications : {
50
+ apps : true
51
+ } ,
52
+
53
+ // Part of `eslint-plugin-unicorn`
54
+ arr : {
55
+ array : true
56
+ } ,
57
+ e : {
58
+ error : true ,
59
+ event : true
60
+ } ,
61
+ el : {
62
+ element : true
63
+ } ,
64
+ elem : {
65
+ element : true
66
+ } ,
67
+ len : {
68
+ length : true
69
+ } ,
70
+ msg : {
71
+ message : true
72
+ } ,
73
+ num : {
74
+ number : true
75
+ } ,
76
+ obj : {
77
+ object : true
78
+ } ,
79
+ opts : {
80
+ options : true
81
+ } ,
82
+ param : {
83
+ parameter : true
84
+ } ,
85
+ params : {
86
+ parameters : true
87
+ } ,
88
+ prev : {
89
+ previous : true
90
+ } ,
91
+ req : {
92
+ request : true
93
+ } ,
94
+ res : {
95
+ response : true ,
96
+ result : true
97
+ } ,
98
+ ret : {
99
+ returnValue : true
100
+ } ,
101
+ str : {
102
+ string : true
103
+ } ,
104
+ temp : {
105
+ temporary : true
106
+ } ,
107
+ tmp : {
108
+ temporary : true
109
+ } ,
110
+ val : {
111
+ value : true
112
+ }
113
+ }
114
+ }
115
+ ] ,
116
+
117
+ // The character class sorting is a bit buggy at the moment.
118
+ 'unicorn/better-regex' : [
119
+ 'error' ,
120
+ {
121
+ sortCharacterClasses : false
122
+ }
123
+ ] ,
56
124
57
125
// TODO: Remove this override when the rule is more stable.
58
126
'unicorn/consistent-function-scoping' : 'off' ,
59
127
60
- // TODO: Enable it again when the bugs are fixed.
61
- 'unicorn/regex-shorthand' : 'off' ,
62
-
63
128
// TODO: Temporarily disabled as the rule is buggy.
64
129
'function-call-argument-newline' : 'off' ,
65
130
0 commit comments