eslint-config-yenz 5.0.0 → 5.2.0

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.
@@ -14,24 +14,24 @@ const baseConfig = {
14
14
  '@stylistic',
15
15
  'perfectionist',
16
16
  'import',
17
- 'no-loops',
18
17
  'yenz',
19
18
  'jest'
20
19
  ],
21
- 'parser': '@typescript-eslint/parser',
22
- 'parserOptions': {
23
- 'ecmaVersion': 2020,
24
- 'sourceType': 'module',
25
- 'project': './tsconfig.json'
20
+ parser: '@typescript-eslint/parser',
21
+ parserOptions: {
22
+ ecmaVersion: 2020,
23
+ sourceType: 'module',
24
+ project: './tsconfig.json'
26
25
  },
27
26
  rules: {
28
27
  'yenz/type-ordering': 'error',
28
+ 'yenz/no-loops': 'error',
29
29
  'dot-notation': 'error',
30
30
  'indent': ['error', 2],
31
31
  'linebreak-style': ['error', 'unix'],
32
- 'no-console': ['error', {'allow': ['error', 'warn']}],
32
+ 'no-console': ['error', { allow: ['error', 'warn'] }],
33
33
  'no-loops/no-loops': 'error',
34
- 'no-magic-numbers': ['error', {'ignoreArrayIndexes': true, 'ignore': [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]}],
34
+ 'no-magic-numbers': ['error', { ignoreArrayIndexes: true, ignore: [-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] }],
35
35
  'no-use-before-define': 'off',
36
36
  'quotes': ['error', 'single'],
37
37
  'semi': ['error', 'never'],
@@ -48,21 +48,22 @@ const baseConfig = {
48
48
  '@typescript-eslint/prefer-find': 'error',
49
49
  '@typescript-eslint/no-floating-promises': 'off',
50
50
  '@typescript-eslint/no-misused-promises': 'off',
51
+ '@typescript-eslint/unbound-method': 'off',
51
52
  '@stylistic/no-multiple-empty-lines': 'off',
52
53
  '@stylistic/comma-dangle': 'off',
53
54
  '@stylistic/indent': 'off',
54
55
  'padding-line-between-statements': [
55
56
  'error',
56
- { 'blankLine': 'always', 'prev': 'function', 'next': '*' },
57
- { 'blankLine': 'always', 'prev': '*', 'next': 'function' },
57
+ { blankLine: 'always', prev: 'function', next: '*' },
58
+ { blankLine: 'always', prev: '*', next: 'function' },
58
59
  ],
59
60
  'import/order': [
60
61
  'error',
61
62
  {
62
- groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
63
- pathGroupsExcludedImportTypes: ['builtin'],
63
+ 'groups': ['builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
64
+ 'pathGroupsExcludedImportTypes': ['builtin'],
64
65
  'newlines-between': 'always',
65
- alphabetize: {
66
+ 'alphabetize': {
66
67
  order: 'asc',
67
68
  caseInsensitive: true
68
69
  }
@@ -72,10 +73,10 @@ const baseConfig = {
72
73
  },
73
74
  overrides: [
74
75
  {
75
- 'files': ['test/**'],
76
- 'plugins': ['jest'],
77
- 'extends': ['plugin:jest/recommended', 'plugin:jest/style'],
78
- 'rules': {
76
+ files: ['test/**'],
77
+ plugins: ['jest'],
78
+ extends: ['plugin:jest/recommended', 'plugin:jest/style'],
79
+ rules: {
79
80
  'jest/prefer-called-with': 'error',
80
81
  'jest/prefer-equality-matcher': 'error',
81
82
  'jest/prefer-spy-on': 'error'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-yenz",
3
- "version": "5.0.0",
3
+ "version": "5.2.0",
4
4
  "description": "Jens' ESLint Configuration",
5
5
  "main": "eslint-config-base.js",
6
6
  "keywords": [
@@ -16,9 +16,8 @@
16
16
  "@eslint/js": "^9.3.0",
17
17
  "eslint-plugin-import": "^2.29.1",
18
18
  "eslint-plugin-jest": "^28.5.0",
19
- "eslint-plugin-no-loops": "^0.3.0",
20
19
  "eslint-plugin-perfectionist": "^2.9.0",
21
- "eslint-plugin-yenz": "^1.0.0",
20
+ "eslint-plugin-yenz": "^1.1.0",
22
21
  "typescript": "^5.4.5",
23
22
  "typescript-eslint": "^7.10.0"
24
23
  },
package/testFiles/file.ts CHANGED
@@ -1,9 +1,19 @@
1
+ import * as console from 'node:console'
2
+
1
3
  const x: null | number = null
2
4
 
3
5
  function test():number{
4
6
  return x
5
7
  }
6
8
 
9
+ for (const x of [1, 2, 4]) {
10
+ console.log(x)
11
+ }
12
+
13
+ for (let i = 0; i < 10; i++) {
14
+ console.log(i)
15
+ }
16
+
7
17
  test()
8
18
 
9
19
  const response = alert('test')
package/tsconfig.json CHANGED
@@ -23,7 +23,8 @@
23
23
  "esm": true
24
24
  },
25
25
  "include": [
26
- "./testFiles/**/*.ts"
26
+ "./testFiles/**/*.ts",
27
+ ".eslintrc.js"
27
28
  ],
28
29
  "exclude": [
29
30
  "node_modules",