@fullstacksjs/eslint-config 6.7.1 → 6.8.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/README.md CHANGED
@@ -69,6 +69,7 @@ It reads your root `package.json` dependencies and includes necessary rules.
69
69
  "@fullstacksjs/eslint-config/typescript",
70
70
  "@fullstacksjs/eslint-config/strict",
71
71
  "@fullstacksjs/eslint-config/cypress",
72
+ "@fullstacksjs/eslint-config/esm", // for native ESM modules
72
73
  "@fullstacksjs/eslint-config/typecheck" // ⚠️ Needs configurations (not included in default config)
73
74
  ]
74
75
  }
package/cypress.js ADDED
@@ -0,0 +1,12 @@
1
+ module.exports = {
2
+ overrides: [
3
+ {
4
+ files: ['**/cypress/**/*.js', '**/cypress/**/*.ts'],
5
+ plugins: ['cypress'],
6
+ env: {
7
+ 'cypress/globals': true,
8
+ },
9
+ extends: ['./rules/cypress'],
10
+ },
11
+ ],
12
+ };
package/esm.js ADDED
@@ -0,0 +1,13 @@
1
+ module.exports = {
2
+ rules: {
3
+ 'import/extensions': 'off',
4
+ },
5
+ overrides: [
6
+ {
7
+ files: ['*.ts', '*.tsx'],
8
+ rules: {
9
+ 'import/no-unresolved': [2, { ignore: ['.js$'], caseSensitiveStrict: true }],
10
+ },
11
+ },
12
+ ],
13
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fullstacksjs/eslint-config",
3
- "version": "6.7.1",
3
+ "version": "6.8.2",
4
4
  "license": "MIT",
5
5
  "author": "fullstacks <fullstacksjs@gmail.com>",
6
6
  "description": "fullstacks eslint config",
@@ -16,9 +16,11 @@
16
16
  "base.js",
17
17
  "index.js",
18
18
  "jest.js",
19
+ "cypress.js",
19
20
  "react.js",
20
21
  "typescript.js",
21
- "typecheck.js"
22
+ "typecheck.js",
23
+ "esm.js"
22
24
  ],
23
25
  "scripts": {
24
26
  "lint": "eslint .",
@@ -42,7 +44,7 @@
42
44
  "eslint-import-resolver-typescript": "2.5.0",
43
45
  "eslint-plugin-cypress": "2.12.1",
44
46
  "eslint-plugin-fp": "2.3.0",
45
- "eslint-plugin-import": "2.24.2",
47
+ "eslint-plugin-import": "2.25.2",
46
48
  "eslint-plugin-jest": "24.4.0",
47
49
  "eslint-plugin-jsx-a11y": "6.4.1",
48
50
  "eslint-plugin-node": "11.1.0",
@@ -66,11 +68,11 @@
66
68
  "typescript": "4.4.3"
67
69
  },
68
70
  "peerDependencies": {
69
- "eslint": ">=7",
70
- "prettier": ">=1",
71
+ "eslint": "7",
72
+ "prettier": "2",
71
73
  "react": ">=16",
72
- "typescript": ">=4",
73
- "cypress": ">=8"
74
+ "typescript": "4",
75
+ "cypress": "8"
74
76
  },
75
77
  "peerDependenciesMeta": {
76
78
  "typescript": {
package/rules/import.js CHANGED
@@ -35,7 +35,7 @@ module.exports = {
35
35
  'import/no-restricted-paths': 'off',
36
36
  'import/no-self-import': 'error',
37
37
  'import/no-unassigned-import': 'off',
38
- 'import/no-unresolved': 'error',
38
+ 'import/no-unresolved': ['error', { caseSensitiveStrict: true }],
39
39
  'import/no-unused-modules': 'off',
40
40
  'import/no-useless-path-segments': 'off',
41
41
  'import/no-webpack-loader-syntax': 'error',
package/rules/strict.js CHANGED
@@ -9,6 +9,7 @@ module.exports = {
9
9
  'fp/no-this': 'error',
10
10
  'fp/no-throw': 'error',
11
11
  'fp/no-unused-expression': ['error', { allowUseStrict: true }],
12
+ '@typescript-eslint/no-non-null-assertion': 'warn',
12
13
  '@typescript-eslint/naming-convention': [
13
14
  'warn',
14
15
  {
@@ -53,7 +53,7 @@ module.exports = {
53
53
  '@typescript-eslint/no-namespace': 'error',
54
54
  '@typescript-eslint/no-non-null-asserted-nullish-coalescing': 'error',
55
55
  '@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
56
- '@typescript-eslint/no-non-null-assertion': 'warn',
56
+ '@typescript-eslint/no-non-null-assertion': 'off',
57
57
  '@typescript-eslint/no-parameter-properties': 'off',
58
58
  '@typescript-eslint/no-redeclare': ['off', { ignoreDeclarationMerge: true }], // useful in FP.
59
59
  '@typescript-eslint/no-require-imports': 'error',