@shelf/eslint-config 2.30.0 → 3.0.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 3.0.0
2
+
3
+ Override recommended no explicit type any in tests
4
+
1
5
  ## 2.0.0
2
6
 
3
7
  Removed separate file for testing-library, added testing-library rules to `frontend-typescript.js`.
@@ -1,9 +1,12 @@
1
1
  module.exports = {
2
- noExplicitReturnTypeInTests: {
2
+ noExplicitsInTests: {
3
3
  files: ['**/*.test.ts'],
4
- // it's a bit annoying, there is no need to specify return types for test case function body it('...', fn)
4
+ // It's a bit annoying
5
5
  rules: {
6
+ // There is no need to specify return types for test case function body it('...', fn)
6
7
  '@typescript-eslint/explicit-function-return-type': 0,
8
+ // There is no mandatory to specify types in tests
9
+ '@typescript-eslint/no-explicit-any': 0,
7
10
  },
8
11
  },
9
12
  allowRequireInConfigs: {
@@ -1,4 +1,4 @@
1
- const {allowRequireInConfigs, noExplicitReturnTypeInTests} = require('./common/overrides');
1
+ const {allowRequireInConfigs, noExplicitsInTests} = require('./common/overrides');
2
2
  const consistentTypeAssertions = require('./rules/consistent-type-assertions.json');
3
3
  const consistentTypeImports = require('./rules/consistent-type-imports.json');
4
4
  const vueConfig = require('./frontend-vue');
@@ -23,5 +23,5 @@ module.exports = {
23
23
  '@typescript-eslint/explicit-member-accessibility': 0,
24
24
  ...typescriptRules,
25
25
  },
26
- overrides: [allowRequireInConfigs, noExplicitReturnTypeInTests],
26
+ overrides: [allowRequireInConfigs, noExplicitsInTests],
27
27
  };
@@ -3,7 +3,7 @@ const commonPlugins = require('./common/plugins');
3
3
  const tsParser = require('./common/ts-parser');
4
4
  const {
5
5
  allowRequireInConfigs,
6
- noExplicitReturnTypeInTests,
6
+ noExplicitsInTests,
7
7
  noCastWithJestMock,
8
8
  } = require('./common/overrides');
9
9
  const consistentTypeImports = require('./rules/consistent-type-imports.json');
@@ -43,7 +43,7 @@ module.exports = {
43
43
  },
44
44
  overrides: [
45
45
  allowRequireInConfigs,
46
- noExplicitReturnTypeInTests,
46
+ noExplicitsInTests,
47
47
  noCastWithJestMock,
48
48
  {
49
49
  files: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shelf/eslint-config",
3
- "version": "2.30.0",
3
+ "version": "3.0.0",
4
4
  "description": "ESLint Config for Shelf Projects",
5
5
  "license": "MIT",
6
6
  "repository": "shelfio/eslint-config",
package/typescript.js CHANGED
@@ -9,7 +9,7 @@ const sortImports = require('./rules/sort-imports.json');
9
9
  const tsParser = require('./common/ts-parser');
10
10
  const {
11
11
  allowRequireInConfigs,
12
- noExplicitReturnTypeInTests,
12
+ noExplicitsInTests,
13
13
  noCastWithJestMock,
14
14
  } = require('./common/overrides');
15
15
  const consistentTypeAssertions = require('./rules/consistent-type-assertions.json');
@@ -58,5 +58,5 @@ module.exports = {
58
58
  ...typescriptRules,
59
59
  ...restrictedPackagesImportRules,
60
60
  },
61
- overrides: [allowRequireInConfigs, noExplicitReturnTypeInTests, noCastWithJestMock],
61
+ overrides: [allowRequireInConfigs, noExplicitsInTests, noCastWithJestMock],
62
62
  };