@perfective/eslint-config 0.20.0-alpha → 0.20.0-alpha.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.
package/index.js CHANGED
@@ -107,7 +107,7 @@ module.exports = {
107
107
  '@testing-library/jest-dom/extend-expect',
108
108
  ],
109
109
  }],
110
- 'max-nested-callbacks': ['error', 4],
110
+ 'max-nested-callbacks': ['error', 5],
111
111
  'prefer-arrow/prefer-arrow-functions': 'off',
112
112
  'promise/always-return': 'off',
113
113
  'rxjs/no-topromise': 'off',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@perfective/eslint-config",
3
- "version": "0.20.0-alpha",
3
+ "version": "0.20.0-alpha.2",
4
4
  "description": "ESLint shareable rules configuration",
5
5
  "keywords": ["code quality", "code standard", "code style", "eslint", "eslint-config", "lint", "perfective", "tslint", "tslint-config", "typescript"],
6
6
  "author": "Andrey Mikheychik <a.mikheychik@gmail.com>",
@@ -12,17 +12,17 @@
12
12
  "license": "MIT",
13
13
  "peerDependencies": {
14
14
  "@babel/eslint-parser": "^7.19.1",
15
- "@typescript-eslint/eslint-plugin": "^5.47.1",
16
- "@typescript-eslint/eslint-plugin-tslint": "^5.47.1",
17
- "@typescript-eslint/parser": "^5.47.1",
18
- "eslint": "^8.30.0",
19
- "eslint-import-resolver-typescript": "^3.5.2",
20
- "eslint-plugin-array-func": "^3.1.7",
15
+ "@typescript-eslint/eslint-plugin": "^5.48.2",
16
+ "@typescript-eslint/eslint-plugin-tslint": "^5.48.2",
17
+ "@typescript-eslint/parser": "^5.48.2",
18
+ "eslint": "^8.32.0",
19
+ "eslint-import-resolver-typescript": "^3.5.3",
20
+ "eslint-plugin-array-func": "^3.1.8",
21
21
  "eslint-plugin-cypress": "^2.12.1",
22
22
  "eslint-plugin-deprecation": "^1.3.3",
23
23
  "eslint-plugin-eslint-comments": "^3.2.0",
24
- "eslint-plugin-import": "^2.26.0",
25
- "eslint-plugin-jest": "^27.1.7",
24
+ "eslint-plugin-import": "^2.27.5",
25
+ "eslint-plugin-jest": "^27.2.1",
26
26
  "eslint-plugin-jest-dom": "^4.0.3",
27
27
  "eslint-plugin-jest-formatting": "^3.1.0",
28
28
  "eslint-plugin-jsdoc": "^39.6.4",
@@ -30,8 +30,8 @@
30
30
  "eslint-plugin-prefer-arrow": "^1.2.3",
31
31
  "eslint-plugin-promise": "^6.1.1",
32
32
  "eslint-plugin-rxjs": "^5.0.2",
33
- "eslint-plugin-simple-import-sort": "^8.0.0",
34
- "eslint-plugin-sonarjs": "^0.17.0",
33
+ "eslint-plugin-simple-import-sort": "^9.0.0",
34
+ "eslint-plugin-sonarjs": "^0.18.0",
35
35
  "eslint-plugin-testing-library": "^5.9.1",
36
36
  "eslint-plugin-unicorn": "^45.0.2",
37
37
  "tslint": "^6.1.3"
@@ -65,7 +65,7 @@ module.exports = {
65
65
  allowObjectEnd: false,
66
66
  allowArrayStart: false,
67
67
  allowArrayEnd: false,
68
- allowClassStart: false,
68
+ allowClassStart: true,
69
69
  allowClassEnd: false,
70
70
  }],
71
71
  'lines-between-class-members': ['warn', 'always', {
@@ -105,7 +105,7 @@ module.exports = {
105
105
  }],
106
106
  'no-multi-assign': 'error',
107
107
  'no-multi-str': 'error',
108
- 'no-negated-condition': 'error',
108
+ 'no-negated-condition': 'off',
109
109
  'no-nested-ternary': 'error',
110
110
  'no-new': 'error',
111
111
  'no-new-func': 'error',
@@ -3,11 +3,12 @@ const no_extraneous_dependencies_1 = require("./rules/no-extraneous-dependencies
3
3
  module.exports = {
4
4
  rules: {
5
5
  'import/export': 'error',
6
- 'import/no-named-as-default': 'error',
7
- 'import/no-named-as-default-member': 'error',
8
6
  'import/no-deprecated': 'off',
7
+ 'import/no-empty-named-blocks': 'warn',
9
8
  'import/no-extraneous-dependencies': ['error', (0, no_extraneous_dependencies_1.importNoExtraneousDependencies)()],
10
9
  'import/no-mutable-exports': 'error',
10
+ 'import/no-named-as-default': 'error',
11
+ 'import/no-named-as-default-member': 'error',
11
12
  'import/no-unused-modules': 'error',
12
13
  },
13
14
  };
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  module.exports = {
3
3
  rules: {
4
- 'import/unambiguous': 'error',
4
+ 'import/no-amd': 'error',
5
5
  'import/no-commonjs': ['error', {
6
6
  allowConditionalRequire: true,
7
7
  allowPrimitiveModules: true,
8
8
  }],
9
- 'import/no-amd': 'error',
10
- 'import/no-nodejs-modules': 'off',
11
9
  'import/no-import-module-exports': 'error',
10
+ 'import/no-nodejs-modules': 'off',
11
+ 'import/unambiguous': 'error',
12
12
  },
13
13
  };
@@ -1,28 +1,29 @@
1
1
  "use strict";
2
2
  module.exports = {
3
3
  rules: {
4
- 'import/no-unresolved': ['error', {
5
- caseSensitive: true,
6
- caseSensitiveStrict: true,
7
- }],
4
+ 'import/default': 'error',
8
5
  'import/named': ['error', {
9
6
  commonjs: false,
10
7
  }],
11
- 'import/default': 'error',
12
8
  'import/namespace': 'error',
13
- 'import/no-restricted-paths': 'off',
14
9
  'import/no-absolute-path': 'error',
10
+ 'import/no-cycle': ['error', {
11
+ ignoreExternal: true,
12
+ allowUnsafeDynamicCyclicDependency: false,
13
+ }],
15
14
  'import/no-dynamic-require': ['error', {
16
15
  esmodule: true,
17
16
  }],
18
17
  'import/no-internal-modules': 'off',
19
- 'import/no-webpack-loader-syntax': 'error',
18
+ 'import/no-relative-packages': 'warn',
19
+ 'import/no-relative-parent-imports': 'off',
20
+ 'import/no-restricted-paths': 'off',
20
21
  'import/no-self-import': 'error',
21
- 'import/no-cycle': ['error', {
22
- ignoreExternal: true,
22
+ 'import/no-unresolved': ['error', {
23
+ caseSensitive: true,
24
+ caseSensitiveStrict: true,
23
25
  }],
24
26
  'import/no-useless-path-segments': 'warn',
25
- 'import/no-relative-parent-imports': 'off',
26
- 'import/no-relative-packages': 'warn',
27
+ 'import/no-webpack-loader-syntax': 'error',
27
28
  },
28
29
  };
@@ -1,13 +1,26 @@
1
1
  "use strict";
2
2
  module.exports = {
3
3
  rules: {
4
- 'import/first': 'off',
4
+ 'import/consistent-type-specifier-style': ['warn', 'prefer-inline'],
5
+ 'import/dynamic-import-chunkname': 'off',
5
6
  'import/exports-last': 'off',
7
+ 'import/extensions': ['error', 'never'],
8
+ 'import/first': 'off',
9
+ 'import/group-exports': 'off',
10
+ 'import/max-dependencies': 'off',
11
+ 'import/newline-after-import': ['warn', {
12
+ considerComments: true,
13
+ }],
14
+ 'import/no-anonymous-default-export': 'error',
15
+ 'import/no-default-export': 'error',
6
16
  'import/no-duplicates': ['warn', {
7
- considerQueryString: true,
17
+ 'considerQueryString': true,
18
+ 'prefer-inline': true,
8
19
  }],
20
+ 'import/no-named-default': 'error',
21
+ 'import/no-named-export': 'off',
9
22
  'import/no-namespace': 'off',
10
- 'import/extensions': ['error', 'never'],
23
+ 'import/no-unassigned-import': 'error',
11
24
  'import/order': ['off', {
12
25
  'groups': ['unknown', 'builtin', 'external', 'internal', 'parent', 'sibling', 'index'],
13
26
  'newlines-between': 'always',
@@ -16,15 +29,6 @@ module.exports = {
16
29
  caseInsensitive: false,
17
30
  },
18
31
  }],
19
- 'import/newline-after-import': 'warn',
20
32
  'import/prefer-default-export': 'off',
21
- 'import/max-dependencies': 'off',
22
- 'import/no-unassigned-import': 'error',
23
- 'import/no-named-default': 'error',
24
- 'import/no-default-export': 'error',
25
- 'import/no-named-export': 'off',
26
- 'import/no-anonymous-default-export': 'error',
27
- 'import/group-exports': 'off',
28
- 'import/dynamic-import-chunkname': 'off',
29
33
  },
30
34
  };
@@ -49,6 +49,7 @@ module.exports = {
49
49
  'jest/no-standalone-expect': 'error',
50
50
  'jest/no-test-prefixes': 'warn',
51
51
  'jest/no-test-return-statement': 'error',
52
+ 'jest/no-untyped-mock-factory': 'warn',
52
53
  'jest/prefer-called-with': 'error',
53
54
  'jest/prefer-comparison-matcher': 'warn',
54
55
  'jest/prefer-each': 'error',
@@ -1,5 +1,5 @@
1
- export declare type Match = string;
2
- export declare type Group = Match[];
1
+ export type Match = string;
2
+ export type Group = Match[];
3
3
  export interface SimpleImportSortImports {
4
4
  groups: Group[];
5
5
  }
@@ -1,8 +1,8 @@
1
- export declare type TypescriptEslintNamingConventionFormat = 'camelCase' | 'strictCamelCase' | 'PascalCase' | 'StrictPascalCase' | 'snake_case' | 'UPPER_CASE';
2
- export declare type TypescriptEslintNamingConventionIndividualSelector = 'variable' | 'function' | 'parameter' | 'classProperty' | 'objectLiteralProperty' | 'typeProperty' | 'parameterProperty' | 'classMethod' | 'objectLiteralMethod' | 'typeMethod' | 'accessor' | 'enumMember' | 'class' | 'interface' | 'typeAlias' | 'enum' | 'typeParameter';
3
- export declare type TypescriptEslintNamingConventionGroupSelector = 'default' | 'variableLike' | 'memberLike' | 'typeLike' | 'property' | 'method';
4
- export declare type TypescriptEslintNamingConventionSelector = TypescriptEslintNamingConventionIndividualSelector | TypescriptEslintNamingConventionGroupSelector;
5
- export declare type TypescriptEslintNamingConventionUnderscore = 'forbid' | 'require' | 'requireDouble' | 'allow' | 'allowDouble' | 'allowSingleOrDouble';
1
+ export type TypescriptEslintNamingConventionFormat = 'camelCase' | 'strictCamelCase' | 'PascalCase' | 'StrictPascalCase' | 'snake_case' | 'UPPER_CASE';
2
+ export type TypescriptEslintNamingConventionIndividualSelector = 'variable' | 'function' | 'parameter' | 'classProperty' | 'objectLiteralProperty' | 'typeProperty' | 'parameterProperty' | 'classMethod' | 'objectLiteralMethod' | 'typeMethod' | 'accessor' | 'enumMember' | 'class' | 'interface' | 'typeAlias' | 'enum' | 'typeParameter';
3
+ export type TypescriptEslintNamingConventionGroupSelector = 'default' | 'variableLike' | 'memberLike' | 'typeLike' | 'property' | 'method';
4
+ export type TypescriptEslintNamingConventionSelector = TypescriptEslintNamingConventionIndividualSelector | TypescriptEslintNamingConventionGroupSelector;
5
+ export type TypescriptEslintNamingConventionUnderscore = 'forbid' | 'require' | 'requireDouble' | 'allow' | 'allowDouble' | 'allowSingleOrDouble';
6
6
  export interface TypescriptEslintNamingConvention {
7
7
  selector: TypescriptEslintNamingConventionSelector | TypescriptEslintNamingConventionSelector[];
8
8
  format: TypescriptEslintNamingConventionFormat[] | null;
@@ -1,5 +1,5 @@
1
- export declare type TsLintRule = boolean | [boolean, unknown];
2
- export declare type TsLintRules = Record<string, TsLintRule>;
1
+ export type TsLintRule = boolean | [boolean, unknown];
2
+ export type TsLintRules = Record<string, TsLintRule>;
3
3
  export interface TypescriptEslintTslintConfig {
4
4
  rules: TsLintRules;
5
5
  rulesDirectory?: string[];
@@ -1,4 +1,4 @@
1
- export declare type UnicornPreventAbbreviationReplacements = Record<string, boolean | Record<string, boolean>>;
1
+ export type UnicornPreventAbbreviationReplacements = Record<string, boolean | Record<string, boolean>>;
2
2
  export interface UnicornPreventAbbreviations {
3
3
  replacements: UnicornPreventAbbreviationReplacements;
4
4
  extendDefaultReplacements: boolean;