@fullstacksjs/eslint-config 7.0.0 → 7.1.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/README.md CHANGED
@@ -115,7 +115,7 @@ If you need more advanced `typescript-eslint` rules, then you can extend from `"
115
115
  * eslint-plugin-simple-import-sort
116
116
  * eslint-plugin-fp
117
117
  * eslint-plugin-node
118
- * ~~eslint-plugin-promise~~ ⚠️ Disabled in v7-beta, because it's not currently supports eslint@8 ([Issue](https://github.com/xjamundx/eslint-plugin-promise/issues/218))
118
+ * eslint-plugin-promise
119
119
 
120
120
  That's all. Feel free to use 💛
121
121
 
package/base.js CHANGED
@@ -1,12 +1,5 @@
1
1
  module.exports = {
2
- plugins: [
3
- 'prettier',
4
- 'import',
5
- 'simple-import-sort',
6
- // 'promise' PENDING: https://github.com/xjamundx/eslint-plugin-promise/issues/218
7
- 'node',
8
- 'fp',
9
- ],
2
+ plugins: ['prettier', 'import', 'simple-import-sort', 'promise', 'node', 'fp'],
10
3
  parserOptions: {
11
4
  ecmaVersion: 2020,
12
5
  sourceType: 'module',
@@ -34,7 +27,7 @@ module.exports = {
34
27
  './rules/style',
35
28
  './rules/variables',
36
29
  './rules/fp',
37
- // './rules/promise', PENDING: https://github.com/xjamundx/eslint-plugin-promise/issues/218
30
+ './rules/promise',
38
31
  './rules/node',
39
32
  'prettier',
40
33
  ],
package/jest.js CHANGED
@@ -1,7 +1,15 @@
1
+ const exts = '(js|jsx|ts|tsx)';
2
+ const dirs = '(test|tests|__test__|__tests__|spec|specs)';
3
+
1
4
  module.exports = {
2
- plugins: ['jest', 'jest-formatting'],
3
- env: {
4
- 'jest/globals': true,
5
- },
6
- extends: ['./rules/jest'],
5
+ overrides: [
6
+ {
7
+ files: [`**/${dirs}/**/*.${exts}`, `**/**/*.(spec|test).${exts}`],
8
+ plugins: ['jest', 'jest-formatting'],
9
+ env: {
10
+ 'jest/globals': true,
11
+ },
12
+ extends: ['./rules/jest'],
13
+ },
14
+ ],
7
15
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fullstacksjs/eslint-config",
3
- "version": "7.0.0",
3
+ "version": "7.1.0",
4
4
  "license": "MIT",
5
5
  "author": "fullstacks <fullstacksjs@gmail.com>",
6
6
  "description": "fullstacks eslint config",
@@ -45,34 +45,35 @@
45
45
  "eslint-plugin-cypress": "2.12.1",
46
46
  "eslint-plugin-fp": "2.3.0",
47
47
  "eslint-plugin-import": "2.25.3",
48
- "eslint-plugin-jest-formatting": "3.1.0",
49
48
  "eslint-plugin-jest": "25.3.0",
49
+ "eslint-plugin-jest-formatting": "3.1.0",
50
50
  "eslint-plugin-jsx-a11y": "6.5.1",
51
51
  "eslint-plugin-node": "11.1.0",
52
52
  "eslint-plugin-prettier": "4.0.0",
53
- "eslint-plugin-react-hooks": "4.3.0",
53
+ "eslint-plugin-promise": "6.0.0",
54
54
  "eslint-plugin-react": "7.27.1",
55
+ "eslint-plugin-react-hooks": "4.3.0",
55
56
  "eslint-plugin-simple-import-sort": "7.0.0",
56
57
  "lodash.has": "4.5.2",
57
58
  "read-pkg-up": "7.0.1"
58
59
  },
59
60
  "devDependencies": {
60
- "eslint": "8.4.1",
61
+ "eslint": "8.5.0",
61
62
  "eslint-find-rules": "4.0.0",
62
63
  "husky": "7.0.4",
63
- "lint-staged": "12.1.2",
64
+ "lint-staged": "12.1.3",
64
65
  "np": "7.6.0",
65
66
  "npm-run-all": "4.1.5",
66
67
  "pinst": "2.1.6",
67
68
  "prettier": "2.5.1",
68
- "typescript": "4.5.2"
69
+ "typescript": "4.5.4"
69
70
  },
70
71
  "peerDependencies": {
72
+ "cypress": ">=8",
71
73
  "eslint": ">=7",
72
74
  "prettier": "2",
73
75
  "react": ">=16",
74
- "typescript": "4",
75
- "cypress": ">=8"
76
+ "typescript": "4"
76
77
  },
77
78
  "peerDependenciesMeta": {
78
79
  "typescript": {
package/rules/es2015.js CHANGED
@@ -25,5 +25,6 @@ module.exports = {
25
25
  'prefer-template': 'error',
26
26
  'require-yield': 'error',
27
27
  'symbol-description': 'error',
28
+ 'prefer-object-has-own': 'warn',
28
29
  },
29
30
  };
package/rules/jest.js CHANGED
@@ -47,12 +47,11 @@ module.exports = {
47
47
  'jest/require-top-level-describe': 'off',
48
48
  'jest/unbound-method': 'error',
49
49
  'jest/valid-describe-callback': 'error',
50
- 'jest/valid-describe': 'error',
51
50
  'jest/valid-expect-in-promise': 'error',
52
51
  'jest/valid-expect': 'error',
53
52
  'jest/valid-title': 'warn',
54
53
 
55
- // jest-formatiing
54
+ // jest-formatting
56
55
  'jest-formatting/padding-around-after-all-blocks': 'warn',
57
56
  'jest-formatting/padding-around-after-each-blocks': 'warn',
58
57
  'jest-formatting/padding-around-all': 'warn',
@@ -1,6 +1,7 @@
1
1
  module.exports = {
2
2
  rules: {
3
3
  '@typescript-eslint/await-thenable': 'error',
4
+ '@typescript-eslint/consistent-type-exports': 'warn',
4
5
  '@typescript-eslint/dot-notation': [
5
6
  'warn',
6
7
  { allowPrivateClassPropertyAccess: false, allowProtectedClassPropertyAccess: false, allowIndexSignaturePropertyAccess: true },
@@ -58,7 +58,6 @@ module.exports = {
58
58
  '@typescript-eslint/no-require-imports': 'error',
59
59
  '@typescript-eslint/no-restricted-imports': 'off',
60
60
  '@typescript-eslint/consistent-type-imports': ['warn', { prefer: 'type-imports', disallowTypeAnnotations: false }],
61
- '@typescript-eslint/consistent-type-exports': 'warn',
62
61
  '@typescript-eslint/no-shadow': 'error',
63
62
  '@typescript-eslint/no-this-alias': 'error',
64
63
  '@typescript-eslint/no-type-alias': 'off',
@@ -80,7 +79,7 @@ module.exports = {
80
79
  '@typescript-eslint/no-useless-constructor': 'error',
81
80
  '@typescript-eslint/no-var-requires': 'error',
82
81
  '@typescript-eslint/object-curly-spacing': 'warn',
83
- '@typescript-eslint/padding-line-between-statements': ['warn', { blankLine: 'always', prev: ['return', 'export'], next: 'export' }],
82
+ '@typescript-eslint/padding-line-between-statements': ['warn', { blankLine: 'always', prev: ['return'], next: ['export'] }],
84
83
  '@typescript-eslint/prefer-as-const': 'warn',
85
84
  '@typescript-eslint/prefer-enum-initializers': 'off',
86
85
  '@typescript-eslint/prefer-for-of': 'warn',