eser 2.1.9 → 3.0.0-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/defterdar.js +13 -0
  2. package/deno.json +6 -0
  3. package/deno.lock +52 -0
  4. package/hizli-api.js +78 -0
  5. package/main.js +5 -0
  6. package/mod.js +3 -0
  7. package/mod_test.js +5 -0
  8. package/package.json +12 -37
  9. package/.editorconfig +0 -14
  10. package/.gitattributes +0 -11
  11. package/.github/FUNDING.yml +0 -5
  12. package/LICENSE +0 -22
  13. package/README.md +0 -3794
  14. package/css-in-javascript/README.md +0 -432
  15. package/linters/.eslintrc +0 -6
  16. package/linters/.markdownlint.json +0 -154
  17. package/packages/eslint-config-eser/.editorconfig +0 -14
  18. package/packages/eslint-config-eser/.eslintrc +0 -3
  19. package/packages/eslint-config-eser/README.md +0 -19
  20. package/packages/eslint-config-eser/index.js +0 -20
  21. package/packages/eslint-config-eser/package.json +0 -49
  22. package/packages/eslint-config-eser/rules/best-practices.js +0 -381
  23. package/packages/eslint-config-eser/rules/errors.js +0 -146
  24. package/packages/eslint-config-eser/rules/es6.js +0 -203
  25. package/packages/eslint-config-eser/rules/imports.js +0 -291
  26. package/packages/eslint-config-eser/rules/node.js +0 -43
  27. package/packages/eslint-config-eser/rules/strict.js +0 -5
  28. package/packages/eslint-config-eser/rules/style.js +0 -597
  29. package/packages/eslint-config-eser/rules/variables.js +0 -53
  30. package/packages/eslint-config-eser-react/.editorconfig +0 -14
  31. package/packages/eslint-config-eser-react/.eslintrc +0 -3
  32. package/packages/eslint-config-eser-react/README.md +0 -19
  33. package/packages/eslint-config-eser-react/index.js +0 -11
  34. package/packages/eslint-config-eser-react/package.json +0 -59
  35. package/packages/eslint-config-eser-react/rules/react-a11y.js +0 -275
  36. package/packages/eslint-config-eser-react/rules/react-hooks.js +0 -21
  37. package/packages/eslint-config-eser-react/rules/react.js +0 -600
  38. package/react/README.md +0 -717
@@ -1,381 +0,0 @@
1
- module.exports = {
2
- rules: {
3
- // enforces getter/setter pairs in objects
4
- 'accessor-pairs': 'off',
5
-
6
- // enforces return statements in callbacks of array's methods
7
- // https://eslint.org/docs/rules/array-callback-return
8
- 'array-callback-return': [ 'error', { allowImplicit: true } ],
9
-
10
- // treat var statements as if they were block scoped
11
- 'block-scoped-var': 'error',
12
-
13
- // specify the maximum cyclomatic complexity allowed in a program
14
- 'complexity': [ 'off', 11 ],
15
-
16
- // enforce that class methods use "this"
17
- // https://eslint.org/docs/rules/class-methods-use-this
18
- 'class-methods-use-this': [ 'error', { exceptMethods: [] } ],
19
-
20
- // require return statements to either always or never specify values
21
- 'consistent-return': 'error',
22
-
23
- // specify curly brace conventions for all control statements
24
- 'curly': [ 'error', 'all' ],
25
-
26
- // require default case in switch statements
27
- 'default-case': [ 'error', { commentPattern: '^no default$' } ],
28
-
29
- // https://eslint.org/docs/rules/default-param-last
30
- 'default-param-last': 'error',
31
-
32
- // encourages use of dot notation whenever possible
33
- 'dot-notation': [ 'error', { allowKeywords: true } ],
34
-
35
- // enforces consistent newlines before or after dots
36
- // https://eslint.org/docs/rules/dot-location
37
- 'dot-location': [ 'error', 'property' ],
38
-
39
- // require the use of === and !==
40
- // https://eslint.org/docs/rules/eqeqeq
41
- 'eqeqeq': [ 'error', 'always', { 'null': 'ignore' } ],
42
-
43
- // make sure for-in loops have an if statement
44
- 'guard-for-in': 'warn',
45
-
46
- // enforce a maximum number of classes per file
47
- // https://eslint.org/docs/rules/max-classes-per-file
48
- 'max-classes-per-file': [ 'error', 1 ],
49
-
50
- // disallow the use of alert, confirm, and prompt
51
- 'no-alert': 'warn',
52
-
53
- // disallow use of arguments.caller or arguments.callee
54
- 'no-caller': 'error',
55
-
56
- // disallow lexical declarations in case/default clauses
57
- // https://eslint.org/docs/rules/no-case-declarations.html
58
- 'no-case-declarations': 'error',
59
-
60
- // disallow division operators explicitly at beginning of regular expression
61
- // https://eslint.org/docs/rules/no-div-regex
62
- 'no-div-regex': 'off',
63
-
64
- // disallow else after a return in an if
65
- // https://eslint.org/docs/rules/no-else-return
66
- 'no-else-return': [ 'error', { allowElseIf: false } ],
67
-
68
- // disallow empty functions, except for standalone funcs/arrows
69
- // https://eslint.org/docs/rules/no-empty-function
70
- 'no-empty-function': [
71
- 'error',
72
- {
73
- allow: [
74
- 'arrowFunctions',
75
- 'functions',
76
- 'methods',
77
- ],
78
- },
79
- ],
80
-
81
- // disallow empty destructuring patterns
82
- // https://eslint.org/docs/rules/no-empty-pattern
83
- 'no-empty-pattern': 'error',
84
-
85
- // disallow comparisons to null without a type-checking operator
86
- 'no-eq-null': 'off',
87
-
88
- // disallow use of eval()
89
- 'no-eval': 'error',
90
-
91
- // disallow adding to native types
92
- 'no-extend-native': 'error',
93
-
94
- // disallow unnecessary function binding
95
- 'no-extra-bind': 'error',
96
-
97
- // disallow Unnecessary Labels
98
- // https://eslint.org/docs/rules/no-extra-label
99
- 'no-extra-label': 'error',
100
-
101
- // disallow fallthrough of case statements
102
- 'no-fallthrough': 'error',
103
-
104
- // disallow the use of leading or trailing decimal points in numeric literals
105
- 'no-floating-decimal': 'error',
106
-
107
- // disallow reassignments of native objects or read-only globals
108
- // https://eslint.org/docs/rules/no-global-assign
109
- 'no-global-assign': [ 'error', { exceptions: [] } ],
110
- // deprecated in favor of no-global-assign
111
- 'no-native-reassign': 'off',
112
-
113
- // disallow implicit type conversions
114
- // https://eslint.org/docs/rules/no-implicit-coercion
115
- 'no-implicit-coercion': [
116
- 'off',
117
- {
118
- 'boolean': false,
119
- 'number': true,
120
- 'string': true,
121
- 'allow': [],
122
- },
123
- ],
124
-
125
- // disallow var and named functions in global scope
126
- // https://eslint.org/docs/rules/no-implicit-globals
127
- 'no-implicit-globals': 'off',
128
-
129
- // disallow use of eval()-like methods
130
- 'no-implied-eval': 'error',
131
-
132
- // disallow this keywords outside of classes or class-like objects
133
- 'no-invalid-this': 'off',
134
-
135
- // disallow usage of __iterator__ property
136
- 'no-iterator': 'error',
137
-
138
- // disallow use of labels for anything other then loops and switches
139
- 'no-labels': [ 'error', { allowLoop: false, allowSwitch: false } ],
140
-
141
- // disallow unnecessary nested blocks
142
- 'no-lone-blocks': 'error',
143
-
144
- // disallow creation of functions within loops
145
- 'no-loop-func': 'error',
146
-
147
- // disallow magic numbers
148
- // https://eslint.org/docs/rules/no-magic-numbers
149
- 'no-magic-numbers': [
150
- 'off',
151
- {
152
- ignore: [],
153
- ignoreArrayIndexes: true,
154
- enforceConst: true,
155
- detectObjects: false,
156
- },
157
- ],
158
-
159
- // disallow use of multiple spaces
160
- 'no-multi-spaces': [
161
- 'warn',
162
- {
163
- ignoreEOLComments: false,
164
- },
165
- ],
166
-
167
- // disallow use of multiline strings
168
- 'no-multi-str': 'warn',
169
-
170
- // disallow use of new operator when not part of the assignment or comparison
171
- 'no-new': 'error',
172
-
173
- // disallow use of new operator for Function object
174
- 'no-new-func': 'error',
175
-
176
- // disallows creating new instances of String, Number, and Boolean
177
- 'no-new-wrappers': 'error',
178
-
179
- // disallow use of (old style) octal literals
180
- 'no-octal': 'error',
181
-
182
- // disallow use of octal escape sequences in string literals, such as
183
- // var foo = 'Copyright \251';
184
- 'no-octal-escape': 'error',
185
-
186
- // disallow reassignment of function parameters
187
- // disallow parameter object manipulation except for specific exclusions
188
- // rule: https://eslint.org/docs/rules/no-param-reassign.html
189
- 'no-param-reassign': [
190
- 'warn',
191
- {
192
- props: true,
193
- ignorePropertyModificationsFor: [
194
- 'acc', // for reduce accumulators
195
- 'accumulator', // for reduce accumulators
196
- 'e', // for e.returnvalue
197
- 'ctx', // for Koa routing
198
- 'req', // for Express requests
199
- 'request', // for Express requests
200
- 'res', // for Express responses
201
- 'response', // for Express responses
202
- '$scope', // for Angular 1 scopes
203
- 'staticContext', // for ReactRouter context
204
- ],
205
- },
206
- ],
207
-
208
- // disallow usage of __proto__ property
209
- 'no-proto': 'error',
210
-
211
- // disallow declaring the same variable more then once
212
- 'no-redeclare': 'error',
213
-
214
- // disallow certain object properties
215
- // https://eslint.org/docs/rules/no-restricted-properties
216
- 'no-restricted-properties': [
217
- 'error',
218
- {
219
- object: 'arguments',
220
- property: 'callee',
221
- message: 'arguments.callee is deprecated',
222
- },
223
- {
224
- object: 'global',
225
- property: 'isFinite',
226
- message: 'Please use Number.isFinite instead',
227
- },
228
- {
229
- object: 'self',
230
- property: 'isFinite',
231
- message: 'Please use Number.isFinite instead',
232
- },
233
- {
234
- object: 'window',
235
- property: 'isFinite',
236
- message: 'Please use Number.isFinite instead',
237
- },
238
- {
239
- object: 'global',
240
- property: 'isNaN',
241
- message: 'Please use Number.isNaN instead',
242
- },
243
- {
244
- object: 'self',
245
- property: 'isNaN',
246
- message: 'Please use Number.isNaN instead',
247
- },
248
- {
249
- object: 'window',
250
- property: 'isNaN',
251
- message: 'Please use Number.isNaN instead',
252
- },
253
- {
254
- property: '__defineGetter__',
255
- message: 'Please use Object.defineProperty instead.',
256
- },
257
- {
258
- property: '__defineSetter__',
259
- message: 'Please use Object.defineProperty instead.',
260
- },
261
- {
262
- object: 'Math',
263
- property: 'pow',
264
- message: 'Use the exponentiation operator (**) instead.',
265
- },
266
- ],
267
-
268
- // disallow use of assignment in return statement
269
- 'no-return-assign': [ 'error', 'always' ],
270
-
271
- // disallow redundant `return await`
272
- 'no-return-await': 'error',
273
-
274
- // disallow use of `javascript:` urls.
275
- 'no-script-url': 'error',
276
-
277
- // disallow self assignment
278
- // https://eslint.org/docs/rules/no-self-assign
279
- 'no-self-assign': [
280
- 'error',
281
- {
282
- props: true,
283
- },
284
- ],
285
-
286
- // disallow comparisons where both sides are exactly the same
287
- 'no-self-compare': 'error',
288
-
289
- // disallow use of comma operator
290
- 'no-sequences': 'error',
291
-
292
- // restrict what can be thrown as an exception
293
- 'no-throw-literal': 'error',
294
-
295
- // disallow unmodified conditions of loops
296
- // https://eslint.org/docs/rules/no-unmodified-loop-condition
297
- 'no-unmodified-loop-condition': 'off',
298
-
299
- // disallow usage of expressions in statement position
300
- 'no-unused-expressions': [
301
- 'error',
302
- {
303
- allowShortCircuit: false,
304
- allowTernary: false,
305
- allowTaggedTemplates: false,
306
- },
307
- ],
308
-
309
- // disallow unused labels
310
- // https://eslint.org/docs/rules/no-unused-labels
311
- 'no-unused-labels': 'error',
312
-
313
- // disallow unnecessary .call() and .apply()
314
- 'no-useless-call': 'off',
315
-
316
- // Disallow unnecessary catch clauses
317
- // https://eslint.org/docs/rules/no-useless-catch
318
- 'no-useless-catch': 'error',
319
-
320
- // disallow useless string concatenation
321
- // https://eslint.org/docs/rules/no-useless-concat
322
- 'no-useless-concat': 'error',
323
-
324
- // disallow unnecessary string escaping
325
- // https://eslint.org/docs/rules/no-useless-escape
326
- 'no-useless-escape': 'error',
327
-
328
- // disallow redundant return; keywords
329
- // https://eslint.org/docs/rules/no-useless-return
330
- 'no-useless-return': 'error',
331
-
332
- // disallow use of void operator
333
- // https://eslint.org/docs/rules/no-void
334
- 'no-void': 'error',
335
-
336
- // disallow usage of configurable warning terms in comments: e.g. todo
337
- 'no-warning-comments': [
338
- 'off',
339
- {
340
- terms: [ 'todo', 'fixme', 'xxx' ],
341
- location: 'start',
342
- },
343
- ],
344
-
345
- // disallow use of the with statement
346
- 'no-with': 'error',
347
-
348
- // require using Error objects as Promise rejection reasons
349
- // https://eslint.org/docs/rules/prefer-promise-reject-errors
350
- 'prefer-promise-reject-errors': [ 'error', { allowEmptyReject: true } ],
351
-
352
- // Suggest using named capture group in regular expression
353
- // https://eslint.org/docs/rules/prefer-named-capture-group
354
- 'prefer-named-capture-group': 'off',
355
-
356
- // https://eslint.org/docs/rules/prefer-regex-literals
357
- 'prefer-regex-literals': 'error',
358
-
359
- // require use of the second argument for parseInt()
360
- 'radix': 'error',
361
-
362
- // require `await` in `async function
363
- // (note: this is a horrible rule that should never be used)
364
- // https://eslint.org/docs/rules/require-await
365
- 'require-await': 'off',
366
-
367
- // Enforce the use of u flag on RegExp
368
- // https://eslint.org/docs/rules/require-unicode-regexp
369
- 'require-unicode-regexp': 'off',
370
-
371
- // requires to declare all vars on top of their containing scope
372
- 'vars-on-top': 'error',
373
-
374
- // require immediate function invocation to be wrapped in parentheses
375
- // https://eslint.org/docs/rules/wrap-iife.html
376
- 'wrap-iife': [ 'error', 'outside', { functionPrototypeMethods: false } ],
377
-
378
- // require or disallow Yoda conditions
379
- 'yoda': [ 'error', 'never', { exceptRange: false, onlyEquality: false } ],
380
- },
381
- };
@@ -1,146 +0,0 @@
1
- module.exports = {
2
- rules: {
3
- // Enforce “for” loop update clause moving the counter in the right direction
4
- // https://eslint.org/docs/rules/for-direction
5
- 'for-direction': 'error',
6
-
7
- // Enforces that a return statement is present in property getters
8
- // https://eslint.org/docs/rules/getter-return
9
- 'getter-return': [ 'error', { allowImplicit: false } ],
10
-
11
- // disallow using an async function as a Promise executor
12
- // https://eslint.org/docs/rules/no-async-promise-executor
13
- 'no-async-promise-executor': 'error',
14
-
15
- // Disallow await inside of loops
16
- // https://eslint.org/docs/rules/no-await-in-loop
17
- 'no-await-in-loop': 'error',
18
-
19
- // Disallow comparisons to negative zero
20
- // https://eslint.org/docs/rules/no-compare-neg-zero
21
- 'no-compare-neg-zero': 'error',
22
-
23
- // disallow assignment in conditional expressions
24
- 'no-cond-assign': [ 'error', 'always' ],
25
-
26
- // disallow use of console
27
- 'no-console': 'warn',
28
-
29
- // disallow use of constant expressions in conditions
30
- 'no-constant-condition': 'warn',
31
-
32
- // disallow control characters in regular expressions
33
- 'no-control-regex': 'error',
34
-
35
- // disallow use of debugger
36
- 'no-debugger': 'error',
37
-
38
- // disallow duplicate arguments in functions
39
- 'no-dupe-args': 'error',
40
-
41
- // disallow duplicate keys when creating object literals
42
- 'no-dupe-keys': 'error',
43
-
44
- // disallow a duplicate case label.
45
- 'no-duplicate-case': 'error',
46
-
47
- // disallow empty statements
48
- 'no-empty': 'error',
49
-
50
- // disallow the use of empty character classes in regular expressions
51
- 'no-empty-character-class': 'error',
52
-
53
- // disallow assigning to the exception in a catch block
54
- 'no-ex-assign': 'error',
55
-
56
- // disallow double-negation boolean casts in a boolean context
57
- // https://eslint.org/docs/rules/no-extra-boolean-cast
58
- 'no-extra-boolean-cast': 'error',
59
-
60
- // disallow unnecessary parentheses
61
- // https://eslint.org/docs/rules/no-extra-parens
62
- 'no-extra-parens': [
63
- 'off',
64
- 'all',
65
- {
66
- conditionalAssign: true,
67
- nestedBinaryExpressions: false,
68
- returnAssign: false,
69
- ignoreJSX: 'all', // delegate to eslint-plugin-react
70
- enforceForArrowConditionals: false,
71
- },
72
- ],
73
-
74
- // disallow unnecessary semicolons
75
- 'no-extra-semi': 'error',
76
-
77
- // disallow overwriting functions written as function declarations
78
- 'no-func-assign': 'error',
79
-
80
- // https://eslint.org/docs/rules/no-import-assign
81
- 'no-import-assign': 'error',
82
-
83
- // disallow function or variable declarations in nested blocks
84
- 'no-inner-declarations': 'error',
85
-
86
- // disallow invalid regular expression strings in the RegExp constructor
87
- 'no-invalid-regexp': 'error',
88
-
89
- // disallow irregular whitespace outside of strings and comments
90
- 'no-irregular-whitespace': [ 'error', { skipStrings: true } ],
91
-
92
- // Disallow characters which are made with multiple code points in character class syntax
93
- // https://eslint.org/docs/rules/no-misleading-character-class
94
- 'no-misleading-character-class': 'error',
95
-
96
- // disallow the use of object properties of the global object (Math and JSON) as functions
97
- 'no-obj-calls': 'error',
98
-
99
- // disallow use of Object.prototypes builtins directly
100
- // https://eslint.org/docs/rules/no-prototype-builtins
101
- 'no-prototype-builtins': 'error',
102
-
103
- // disallow multiple spaces in a regular expression literal
104
- 'no-regex-spaces': 'error',
105
-
106
- // disallow sparse arrays
107
- 'no-sparse-arrays': 'error',
108
-
109
- // Disallow template literal placeholder syntax in regular strings
110
- // https://eslint.org/docs/rules/no-template-curly-in-string
111
- 'no-template-curly-in-string': 'error',
112
-
113
- // Avoid code that looks like two expressions but is actually one
114
- // https://eslint.org/docs/rules/no-unexpected-multiline
115
- 'no-unexpected-multiline': 'error',
116
-
117
- // disallow unreachable statements after a return, throw, continue, or break statement
118
- 'no-unreachable': 'error',
119
-
120
- // disallow return/throw/break/continue inside finally blocks
121
- // https://eslint.org/docs/rules/no-unsafe-finally
122
- 'no-unsafe-finally': 'error',
123
-
124
- // disallow negating the left operand of relational operators
125
- // https://eslint.org/docs/rules/no-unsafe-negation
126
- 'no-unsafe-negation': 'error',
127
- // disallow negation of the left operand of an in expression
128
- // deprecated in favor of no-unsafe-negation
129
- 'no-negated-in-lhs': 'off',
130
-
131
- // Disallow assignments that can lead to race conditions due to usage of await or yield
132
- // https://eslint.org/docs/rules/require-atomic-updates
133
- 'require-atomic-updates': 'warn',
134
-
135
- // disallow comparisons with the value NaN
136
- 'use-isnan': 'error',
137
-
138
- // ensure JSDoc comments are valid
139
- // https://eslint.org/docs/rules/valid-jsdoc
140
- 'valid-jsdoc': 'off',
141
-
142
- // ensure that the results of typeof are compared against a valid string
143
- // https://eslint.org/docs/rules/valid-typeof
144
- 'valid-typeof': [ 'error', { requireStringLiterals: true } ],
145
- },
146
- };