@fullstacksjs/eslint-config 13.11.0 → 13.11.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/cjs/index.d.ts CHANGED
@@ -56,7 +56,7 @@ export interface Options extends Linter.Config {
56
56
  esm?: boolean;
57
57
  /**
58
58
  * Controls [test plugin](https://www.npmjs.com/package/eslint-plugin-jest-formatting).
59
- * @default true - If you have one of `jest`, `vitest`, `cypress`, `playwright`, `storybook`, `prettier` in your dependencies.
59
+ * @default true - If you have one of `jest`, `vitest`, `cypress`, `@playwright/test` in your dependencies.
60
60
  */
61
61
  test?: boolean;
62
62
  /**
@@ -86,7 +86,7 @@ export interface Options extends Linter.Config {
86
86
  prettier?: boolean;
87
87
  /**
88
88
  * Controls [Playwright plugin](https://www.npmjs.com/package/eslint-plugin-playwright).
89
- * @default true - If you have `playwright` in your dependencies.
89
+ * @default true - If you have `@playwright/test` in your dependencies.
90
90
  */
91
91
  playwright?: boolean;
92
92
  /**
package/cjs/index.js CHANGED
@@ -26,7 +26,7 @@ var _tests = _interopRequireDefault(require("./modules/tests.js"));
26
26
  var _typescript = _interopRequireDefault(require("./modules/typescript.js"));
27
27
  var _vitest = _interopRequireDefault(require("./modules/vitest.js"));
28
28
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
29
- const testPackages = ['jest', 'vitest', 'cypress', 'playwright'];
29
+ const testPackages = ['jest', 'vitest', 'cypress', '@playwright/test'];
30
30
 
31
31
  /**
32
32
  * @typedef {import('eslint').Linter.Config} Config
@@ -45,7 +45,7 @@ const defaultOptions = {
45
45
  next: (0, _localPkg.isPackageExists)('next'),
46
46
  node: false,
47
47
  sort: true,
48
- playwright: (0, _localPkg.isPackageExists)('playwright'),
48
+ playwright: (0, _localPkg.isPackageExists)('@playwright/test'),
49
49
  prettier: (0, _localPkg.isPackageExists)('prettier'),
50
50
  react: (0, _localPkg.isPackageExists)('react'),
51
51
  storybook: (0, _localPkg.isPackageExists)('storybook'),
@@ -147,7 +147,8 @@ function typescript(options = {}) {
147
147
  '@typescript-eslint/prefer-readonly': 'off',
148
148
  '@typescript-eslint/prefer-readonlysemi': 'off',
149
149
  // Annoying with auto-fix on save.
150
- '@typescript-eslint/promise-function-async': 'error',
150
+ '@typescript-eslint/promise-function-async': 'off',
151
+ // Breaks react component when return type is React.ReactNode
151
152
  '@typescript-eslint/restrict-plus-operands': 'warn',
152
153
  '@typescript-eslint/strict-boolean-expressions': 'off',
153
154
  // Annoying
@@ -272,7 +273,8 @@ function typescript(options = {}) {
272
273
  'dot-notation': 'off',
273
274
  'no-throw-literal': 'off',
274
275
  'require-await': 'off',
275
- 'no-undef': 'off'
276
+ 'no-undef': 'off',
277
+ 'no-duplicate-imports': 'off'
276
278
  }
277
279
  };
278
280
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fullstacksjs/eslint-config",
3
- "version": "13.11.0",
3
+ "version": "13.11.2",
4
4
  "license": "MIT",
5
5
  "author": "fullstacks <fullstacksjs@gmail.com>",
6
6
  "description": "fullstacks eslint config",
package/src/index.d.ts CHANGED
@@ -56,7 +56,7 @@ export interface Options extends Linter.Config {
56
56
  esm?: boolean;
57
57
  /**
58
58
  * Controls [test plugin](https://www.npmjs.com/package/eslint-plugin-jest-formatting).
59
- * @default true - If you have one of `jest`, `vitest`, `cypress`, `playwright`, `storybook`, `prettier` in your dependencies.
59
+ * @default true - If you have one of `jest`, `vitest`, `cypress`, `@playwright/test` in your dependencies.
60
60
  */
61
61
  test?: boolean;
62
62
  /**
@@ -86,7 +86,7 @@ export interface Options extends Linter.Config {
86
86
  prettier?: boolean;
87
87
  /**
88
88
  * Controls [Playwright plugin](https://www.npmjs.com/package/eslint-plugin-playwright).
89
- * @default true - If you have `playwright` in your dependencies.
89
+ * @default true - If you have `@playwright/test` in your dependencies.
90
90
  */
91
91
  playwright?: boolean;
92
92
  /**
package/src/index.mjs CHANGED
@@ -21,7 +21,7 @@ import tests from './modules/tests.mjs';
21
21
  import typescript from './modules/typescript.mjs';
22
22
  import vitest from './modules/vitest.mjs';
23
23
 
24
- const testPackages = ['jest', 'vitest', 'cypress', 'playwright'];
24
+ const testPackages = ['jest', 'vitest', 'cypress', '@playwright/test'];
25
25
 
26
26
  /**
27
27
  * @typedef {import('eslint').Linter.Config} Config
@@ -40,7 +40,7 @@ const defaultOptions = {
40
40
  next: isPackageExists('next'),
41
41
  node: false,
42
42
  sort: true,
43
- playwright: isPackageExists('playwright'),
43
+ playwright: isPackageExists('@playwright/test'),
44
44
  prettier: isPackageExists('prettier'),
45
45
  react: isPackageExists('react'),
46
46
  storybook: isPackageExists('storybook'),
@@ -131,7 +131,7 @@ function typescript(options = {}) {
131
131
  ], // I'm not sure...
132
132
  '@typescript-eslint/prefer-readonly': 'off',
133
133
  '@typescript-eslint/prefer-readonlysemi': 'off', // Annoying with auto-fix on save.
134
- '@typescript-eslint/promise-function-async': 'error',
134
+ '@typescript-eslint/promise-function-async': 'off', // Breaks react component when return type is React.ReactNode
135
135
  '@typescript-eslint/restrict-plus-operands': 'warn',
136
136
  '@typescript-eslint/strict-boolean-expressions': 'off', // Annoying
137
137
  '@typescript-eslint/space-before-blocks': 'off',
@@ -243,6 +243,7 @@ function typescript(options = {}) {
243
243
  'no-throw-literal': 'off',
244
244
  'require-await': 'off',
245
245
  'no-undef': 'off',
246
+ 'no-duplicate-imports': 'off',
246
247
  },
247
248
  };
248
249
  }