eslint-config-tamia 8.0.2 → 8.0.4

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "eslint-config-tamia",
3
3
  "description": "Tâmia ESLint config",
4
- "version": "8.0.2",
4
+ "version": "8.0.4",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "pretest": "npm run lint",
@@ -33,14 +33,14 @@
33
33
  },
34
34
  "homepage": "https://github.com/tamiadev/eslint-config-tamia",
35
35
  "devDependencies": {
36
- "@babel/eslint-parser": "^7.17.0",
37
- "@babel/preset-react": "^7.16.7",
38
- "@typescript-eslint/eslint-plugin": "^5.21.0",
39
- "@typescript-eslint/parser": "^5.21.0",
36
+ "@babel/eslint-parser": "^7.21.8",
37
+ "@babel/preset-react": "^7.18.6",
38
+ "@typescript-eslint/eslint-plugin": "^5.59.7",
39
+ "@typescript-eslint/parser": "^5.59.7",
40
40
  "eslint": "^8.14.0",
41
- "eslint-plugin-react": "^7.29.4",
41
+ "eslint-plugin-react": "^7.32.2",
42
42
  "jest": "^28.0.2",
43
- "react": "^18.1.0"
43
+ "react": "^18.2.0"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "eslint": ">=8"
@@ -1,43 +1,41 @@
1
1
  module.exports = {
2
2
  rules: {
3
3
  // Enforces return statements in callbacks of array’s methods
4
- 'array-callback-return': 2,
4
+ 'array-callback-return': 'error',
5
5
  // Treat var statements as if they were block scoped
6
- 'block-scoped-var': 2,
7
- // Specify the maximum cyclomatic complexity allowed in a program
8
- complexity: [0, 11],
6
+ 'block-scoped-var': 'error',
9
7
  // Require return statements to either always or never specify values
10
- 'consistent-return': 2,
8
+ 'consistent-return': 'error',
11
9
  // Require curly braces for all control statements
12
- curly: [2, 'all'],
10
+ curly: ['error', 'all'],
13
11
  // Encourages use of dot notation whenever possible
14
12
  'dot-notation': [
15
- 2,
13
+ 'error',
16
14
  {
17
15
  allowKeywords: true,
18
16
  },
19
17
  ],
20
18
  // Require the use of === and !==
21
- eqeqeq: [2, 'allow-null'],
19
+ eqeqeq: ['error', 'allow-null'],
22
20
  // Disallow the use of alert, confirm, and prompt
23
- 'no-alert': 2,
21
+ 'no-alert': 'error',
24
22
  // Disallow using an async function as a Promise executor
25
- 'no-async-promise-executor': 2,
23
+ 'no-async-promise-executor': 'error',
26
24
  // Disallow use of arguments.caller or arguments.callee
27
- 'no-caller': 2,
25
+ 'no-caller': 'error',
28
26
  // Disallow else after a return in an if
29
- 'no-else-return': 0,
27
+ 'no-else-return': 'off',
30
28
  // Disallow use of eval()
31
- 'no-eval': 2,
29
+ 'no-eval': 'error',
32
30
  // Disallow adding to native types
33
- 'no-extend-native': 2,
31
+ 'no-extend-native': 'error',
34
32
  // Disallow unnecessary function binding
35
- 'no-extra-bind': 2,
33
+ 'no-extra-bind': 'error',
36
34
  // Disallow the use of leading or trailing decimal points in numeric literals
37
- 'no-floating-decimal': 2,
35
+ 'no-floating-decimal': 'error',
38
36
  // Disallow the type conversions with shorter notations
39
37
  'no-implicit-coercion': [
40
- 2,
38
+ 'error',
41
39
  {
42
40
  boolean: false,
43
41
  number: true,
@@ -45,64 +43,69 @@ module.exports = {
45
43
  },
46
44
  ],
47
45
  // Disallow use of eval()-like methods
48
- 'no-implied-eval': 2,
46
+ 'no-implied-eval': 'error',
49
47
  // Disallow usage of __iterator__ property
50
- 'no-iterator': 2,
48
+ 'no-iterator': 'error',
51
49
  // Disallow use of labels for anything other then loops and switches
52
50
  'no-labels': [
53
- 2,
51
+ 'error',
54
52
  {
55
53
  allowLoop: true,
56
54
  allowSwitch: true,
57
55
  },
58
56
  ],
59
57
  // Disallow unnecessary nested blocks
60
- 'no-lone-blocks': 2,
58
+ 'no-lone-blocks': 'error',
61
59
  // Disallow creation of functions within loops
62
- 'no-loop-func': 2,
60
+ 'no-loop-func': 'error',
63
61
  // Disallow characters which are made with multiple code points in character class syntax
64
- 'no-misleading-character-class': 2,
62
+ 'no-misleading-character-class': 'error',
65
63
  // Disallow use of multiline strings
66
- 'no-multi-str': 2,
64
+ 'no-multi-str': 'error',
67
65
  // Disallow use of new operator for Function object
68
- 'no-new-func': 2,
66
+ 'no-new-func': 'error',
69
67
  // Disallows creating new instances of String, Number, and Boolean
70
- 'no-new-wrappers': 2,
68
+ 'no-new-wrappers': 'error',
71
69
  // Disallow use of octal escape sequences in string literals, such as var foo = 'Copyright \251';
72
- 'no-octal-escape': 2,
70
+ 'no-octal-escape': 'error',
73
71
  // Disallow usage of __proto__ property
74
- 'no-proto': 2,
72
+ 'no-proto': 'error',
75
73
  // Disallow use of assignment in return statement
76
- 'no-return-assign': 2,
74
+ 'no-return-assign': 'error',
77
75
  // Disallow use of `javascript:` urls.
78
- 'no-script-url': 2,
76
+ 'no-script-url': 'error',
79
77
  // Disallow comparisons where both sides are exactly the same
80
- 'no-self-compare': 2,
78
+ 'no-self-compare': 'error',
81
79
  // Disallow use of comma operator
82
- 'no-sequences': 2,
80
+ 'no-sequences': 'error',
83
81
  // Restrict what can be thrown as an exception
84
- 'no-throw-literal': 2,
82
+ 'no-throw-literal': 'error',
85
83
  // Disallow unmodified conditions of loops
86
- 'no-unmodified-loop-condition': 2,
84
+ 'no-unmodified-loop-condition': 'error',
87
85
  // Disallow usage of expressions in statement position
88
- 'no-unused-expressions': 2,
86
+ 'no-unused-expressions': 'error',
89
87
  // Disallow unnecessary .call() and .apply()
90
- 'no-useless-call': 2,
88
+ 'no-useless-call': 'error',
91
89
  // Disallow unnecessary catch clauses
92
- 'no-useless-catch': 2,
90
+ 'no-useless-catch': 'error',
93
91
  // Disallow unnecessary concatenation of literals or template literals
94
- 'no-useless-concat': 2,
92
+ 'no-useless-concat': 'error',
95
93
  // Disallow redundant return statements
96
- 'no-useless-return': 2,
94
+ 'no-useless-return': 'error',
97
95
  // Disallow use of void operator
98
- 'no-void': 2,
96
+ 'no-void': [
97
+ 'error',
98
+ {
99
+ allowAsStatement: true,
100
+ },
101
+ ],
99
102
  // Disallow use of the with statement
100
- 'no-with': 2,
103
+ 'no-with': 'error',
101
104
  // Disallow async functions which have no await expression
102
- 'require-await': 2,
105
+ 'require-await': 'error',
103
106
  // Require or disallow Yoda conditions
104
107
  yoda: [
105
- 2,
108
+ 'error',
106
109
  'never',
107
110
  {
108
111
  exceptRange: true,
@@ -48,6 +48,7 @@ module.exports = {
48
48
  '@typescript-eslint/no-unused-expressions': 'error',
49
49
  '@typescript-eslint/no-use-before-define': 'error',
50
50
  '@typescript-eslint/no-var-requires': 'error',
51
+ '@typescript-eslint/no-shadow': 'error',
51
52
  '@typescript-eslint/prefer-namespace-keyword': 'error',
52
53
  },
53
54
  overrides: [
@@ -60,6 +61,7 @@ module.exports = {
60
61
  'no-unused-vars': 'off',
61
62
  'no-unused-expressions': 'off',
62
63
  'no-use-before-define': 'off',
64
+ 'no-shadow': 'off',
63
65
 
64
66
  //Checked by Typescript - ts(2378)
65
67
  'getter-return': 'off',