@fullstacksjs/eslint-config 12.1.1 → 12.3.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.
@@ -98,4 +98,9 @@ export interface Options extends Linter.Config {
98
98
  ignores?: string[];
99
99
  }
100
100
 
101
- export declare const init: (opts: Options) => import('eslint').Linter.Config[];
101
+ export declare function defineConfig(
102
+ initOptions?: Options,
103
+ ...extend: Linter.Config[]
104
+ ): Linter.Config[];
105
+
106
+ export declare const init: typeof defineConfig;
package/cjs/index.js CHANGED
@@ -30,7 +30,7 @@ const testPackages = ['jest', 'vitest', 'cypress', 'playwright'];
30
30
 
31
31
  /**
32
32
  * @typedef {import('eslint').Linter.Config} Config
33
- * @typedef {import('./option').Options} Options
33
+ * @typedef {import('./index.js').Options} Options
34
34
  * /
35
35
 
36
36
  /** @type {Options} */
@@ -8,7 +8,7 @@ var _globals = _interopRequireDefault(require("globals"));
8
8
  var _conditions = require("../utils/conditions.js");
9
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
10
  /**
11
- * @param { import('../option').Options } options
11
+ * @param { import('../index.js').Options } options
12
12
  * @return { import('eslint').Linter.Config }
13
13
  */
14
14
  function base(options = {}) {
@@ -23,6 +23,7 @@ function cypress() {
23
23
  'cypress/no-unnecessary-waiting': 'error',
24
24
  'cypress/require-data-selectors': 'off',
25
25
  'cypress/unsafe-to-chain-command': 'error',
26
+ 'cypress/no-chained-get': 'error',
26
27
  '@typescript-eslint/no-namespace': 'off'
27
28
  }
28
29
  };
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  var _config = require("eslint/config");
8
8
  var _globs = require("../utils/globs.js");
9
9
  /**
10
- * @param { import('../option').Options } options
10
+ * @param { import('../index.js').Options } options
11
11
  * @return { import('eslint').Linter.Config }
12
12
  */
13
13
  function ignores(options = {}) {
@@ -12,7 +12,7 @@ const jsExtensions = ['.mjs', '.js', '.jsx', '.cjs'];
12
12
  const allExtensions = [...jsExtensions, ...tsExtensions];
13
13
 
14
14
  /**
15
- * @param { import('../option').Options } options
15
+ * @param { import('../index.js').Options } options
16
16
  * @return { import('eslint').Linter.Config }
17
17
  */
18
18
  function imports(options = {}) {
@@ -8,7 +8,7 @@ var _eslintPluginJest = _interopRequireDefault(require("eslint-plugin-jest"));
8
8
  var _globs = require("../utils/globs.js");
9
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
10
  /**
11
- * @param { import('../option').Options } options
11
+ * @param { import('../index.js').Options } options
12
12
  * @return { import('eslint').Linter.Config } */
13
13
  function jest() {
14
14
  return {
@@ -8,7 +8,7 @@ var _eslintPluginN = _interopRequireDefault(require("eslint-plugin-n"));
8
8
  var _conditions = require("../utils/conditions.js");
9
9
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
10
  /**
11
- * @param { import('../option').Options } options
11
+ * @param { import('../index.js').Options } options
12
12
  * @return { import('eslint').Linter.Config }
13
13
  */
14
14
  function node(options = {}) {
@@ -38,6 +38,9 @@ function react() {
38
38
  '@eslint-react/dom/no-unsafe-iframe-sandbox': 'warn',
39
39
  '@eslint-react/dom/no-unsafe-target-blank': 'warn',
40
40
  '@eslint-react/ensure-forward-ref-using-ref': 'off',
41
+ '@eslint-react/jsx-key-before-spread': 'error',
42
+ '@eslint-react/jsx-no-undef': 'off',
43
+ '@eslint-react/jsx-uses-react': 'off',
41
44
  '@eslint-react/no-access-state-in-setstate': 'error',
42
45
  '@eslint-react/no-array-index-key': 'warn',
43
46
  '@eslint-react/no-children-count': 'warn',
@@ -57,7 +60,9 @@ function react() {
57
60
  '@eslint-react/no-implicit-key': 'error',
58
61
  '@eslint-react/no-missing-context-display-name': 'off',
59
62
  '@eslint-react/no-missing-key': 'error',
63
+ '@eslint-react/no-misused-capture-owner-stack': 'error',
60
64
  '@eslint-react/no-nested-component-definitions': 'warn',
65
+ '@eslint-react/no-nested-lazy-component-declarations': 'error',
61
66
  '@eslint-react/no-redundant-should-component-update': 'error',
62
67
  '@eslint-react/no-set-state-in-component-did-mount': 'warn',
63
68
  '@eslint-react/no-set-state-in-component-did-update': 'warn',
@@ -74,7 +79,9 @@ function react() {
74
79
  '@eslint-react/no-useless-fragment': 'warn',
75
80
  '@eslint-react/prefer-destructuring-assignment': 'warn',
76
81
  '@eslint-react/prefer-shorthand-boolean': 'warn',
82
+ '@eslint-react/avoid-shorthand-boolean': 'off',
77
83
  '@eslint-react/prefer-shorthand-fragment': 'warn',
84
+ '@eslint-react/avoid-shorthand-fragment': 'off',
78
85
  '@eslint-react/hooks-extra/ensure-custom-hooks-using-other-hooks': 'warn',
79
86
  '@eslint-react/hooks-extra/ensure-use-memo-has-non-empty-deps': 'warn',
80
87
  '@eslint-react/hooks-extra/prefer-use-state-lazy-initialization': 'warn',
@@ -19,6 +19,7 @@ function storybook() {
19
19
  'storybook/context-in-play-function': 'error',
20
20
  'storybook/default-exports': 'error',
21
21
  'storybook/hierarchy-separator': 'warn',
22
+ 'storybook/meta-satisfies-type': 'warn',
22
23
  'storybook/no-redundant-story-name': 'warn',
23
24
  'storybook/no-uninstalled-addons': 'error',
24
25
  'storybook/prefer-pascal-case': 'warn',
@@ -26,9 +27,9 @@ function storybook() {
26
27
  'storybook/use-storybook-expect': 'error',
27
28
  'storybook/use-storybook-testing-library': 'error',
28
29
  'storybook/csf-component': 'warn',
30
+ 'storybook/meta-inline-properties': 'off',
29
31
  'storybook/no-stories-of': 'warn',
30
32
  'storybook/no-title-property-in-meta': 'off',
31
- 'storybook/meta-inline-properties': 'off',
32
33
  // Conflicts
33
34
  '@typescript-eslint/no-confusing-void-expression': 'off',
34
35
  'react/jsx-no-useless-fragment': 'off',
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  var _eslintPlugin = _interopRequireDefault(require("@stylistic/eslint-plugin"));
8
8
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
9
  /**
10
- * @param { import('../option').Options } options
10
+ * @param { import('../index.js').Options } options
11
11
  * @return { Promise<import('eslint').Linter.Config> }
12
12
  */
13
13
  function stylistic() {
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
 
7
7
  /**
8
- * @param { import('../option').Options } options
8
+ * @param { import('../index.js').Options } options
9
9
  * @return { Promise<import('eslint').Linter.Config> }
10
10
  */
11
11
  async function tailwind(options = {}) {
@@ -10,7 +10,7 @@ var _conditions = require("../utils/conditions.js");
10
10
  var _globs = require("../utils/globs.js");
11
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
12
  /**
13
- * @param { import('../option').Options } options
13
+ * @param { import('../index.js').Options } options
14
14
  * @return { import('eslint').Linter.Config }
15
15
  */
16
16
  function tests(options = {}) {
@@ -9,7 +9,7 @@ var _conditions = require("../utils/conditions.js");
9
9
  var _globs = require("../utils/globs.js");
10
10
  var _namingConvention = require("../utils/naming-convention.js");
11
11
  /**
12
- * @param { import('../option').Options } options
12
+ * @param { import('../index.js').Options } options
13
13
  * @return { import('eslint').Linter.Config }
14
14
  */
15
15
  function typescript(options = {}) {
@@ -194,7 +194,7 @@ function typescript(options = {}) {
194
194
  '@typescript-eslint/no-misused-spread': 'error',
195
195
  '@typescript-eslint/no-mixed-enums': 'error',
196
196
  '@typescript-eslint/no-redundant-type-constituents': 'warn',
197
- // '@typescript-eslint/no-throw-literal': ['warn', { allowThrowingUnknown: false }],
197
+ '@typescript-eslint/no-unnecessary-type-conversion': 'error',
198
198
  '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
199
199
  '@typescript-eslint/no-unsafe-enum-comparison': 'warn',
200
200
  '@typescript-eslint/no-unnecessary-condition': ['warn', {
@@ -207,6 +207,9 @@ function typescript(options = {}) {
207
207
  '@typescript-eslint/no-unnecessary-type-assertion': 'error',
208
208
  '@typescript-eslint/no-unsafe-unary-minus': 'error',
209
209
  '@typescript-eslint/non-nullable-type-assertion-style': 'warn',
210
+ '@typescript-eslint/only-throw-error': ['warn', {
211
+ allowRethrowing: true
212
+ }],
210
213
  '@typescript-eslint/prefer-includes': 'warn',
211
214
  '@typescript-eslint/prefer-optional-chain': 'warn',
212
215
  '@typescript-eslint/prefer-reduce-type-parameter': 'warn',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fullstacksjs/eslint-config",
3
- "version": "12.1.1",
3
+ "version": "12.3.0",
4
4
  "license": "MIT",
5
5
  "author": "fullstacks <fullstacksjs@gmail.com>",
6
6
  "description": "fullstacks eslint config",
@@ -30,48 +30,49 @@
30
30
  "exports": {
31
31
  ".": {
32
32
  "import": "./src/index.mjs",
33
- "require": "./cjs/index.js"
33
+ "require": "./cjs/index.js",
34
+ "types": "./src/index.d.ts"
34
35
  }
35
36
  },
36
37
  "dependencies": {
37
- "@eslint-react/eslint-plugin": "1.37.3",
38
- "@next/eslint-plugin-next": "15.2.3",
39
- "@stylistic/eslint-plugin": "4.2.0",
38
+ "@eslint-react/eslint-plugin": "1.50.0",
39
+ "@next/eslint-plugin-next": "15.3.2",
40
+ "@stylistic/eslint-plugin": "4.4.0",
40
41
  "deepmerge": "4.3.1",
41
- "eslint-plugin-cypress": "4.2.0",
42
- "eslint-plugin-import-x": "4.9.1",
42
+ "eslint-plugin-cypress": "4.3.0",
43
+ "eslint-plugin-import-x": "4.13.3",
43
44
  "eslint-plugin-jest": "28.11.0",
44
45
  "eslint-plugin-jest-formatting": "3.1.0",
45
46
  "eslint-plugin-jsx-a11y": "6.10.2",
46
- "eslint-plugin-n": "17.16.2",
47
- "eslint-plugin-perfectionist": "4.10.1",
47
+ "eslint-plugin-n": "17.18.0",
48
+ "eslint-plugin-perfectionist": "4.13.0",
48
49
  "eslint-plugin-playwright": "2.2.0",
49
- "eslint-plugin-prettier": "5.2.3",
50
+ "eslint-plugin-prettier": "5.4.0",
50
51
  "eslint-plugin-promise": "7.2.1",
51
52
  "eslint-plugin-react-hooks": "5.2.0",
52
- "eslint-plugin-storybook": "0.11.6",
53
+ "eslint-plugin-storybook": "0.12.0",
53
54
  "eslint-plugin-tailwindcss": "3.18.0",
54
55
  "eslint-plugin-vitest": "0.5.4",
55
- "globals": "16.0.0",
56
+ "globals": "16.2.0",
56
57
  "local-pkg": "1.1.1",
57
- "typescript-eslint": "8.29.1"
58
+ "typescript-eslint": "8.32.1"
58
59
  },
59
60
  "devDependencies": {
60
61
  "@eslint/eslintrc": "3.3.1",
61
- "@eslint/js": "9.23.0",
62
- "@semantic-release/github": "11.0.1",
62
+ "@eslint/js": "9.27.0",
63
+ "@semantic-release/github": "11.0.3",
63
64
  "@semantic-release/npm": "12.0.1",
64
65
  "@semantic-release/release-notes-generator": "14.0.3",
65
66
  "@types/eslint": "9.6.1",
66
- "cspell": "8.18.1",
67
- "eslint": "9.24.0",
67
+ "cspell": "9.0.2",
68
+ "eslint": "9.27.0",
68
69
  "husky": "9.1.7",
69
70
  "jest": "29.7.0",
70
- "lint-staged": "15.5.1",
71
+ "lint-staged": "16.0.0",
71
72
  "np": "10.2.0",
72
73
  "pinst": "3.0.0",
73
74
  "prettier": "3.5.3",
74
- "semantic-release": "24.2.3",
75
+ "semantic-release": "24.2.5",
75
76
  "typescript": "5.8.3",
76
77
  "unbuild": "3.5.0"
77
78
  },
@@ -98,4 +98,9 @@ export interface Options extends Linter.Config {
98
98
  ignores?: string[];
99
99
  }
100
100
 
101
- export declare const init: (opts: Options) => import('eslint').Linter.Config[];
101
+ export declare function defineConfig(
102
+ initOptions?: Options,
103
+ ...extend: Linter.Config[]
104
+ ): Linter.Config[];
105
+
106
+ export declare const init: typeof defineConfig;
package/src/index.mjs CHANGED
@@ -24,7 +24,7 @@ const testPackages = ['jest', 'vitest', 'cypress', 'playwright'];
24
24
 
25
25
  /**
26
26
  * @typedef {import('eslint').Linter.Config} Config
27
- * @typedef {import('./option').Options} Options
27
+ * @typedef {import('.').Options} Options
28
28
  * /
29
29
 
30
30
  /** @type {Options} */
@@ -3,7 +3,7 @@ import globals from 'globals';
3
3
  import { strict } from '../utils/conditions.mjs';
4
4
 
5
5
  /**
6
- * @param { import('../option').Options } options
6
+ * @param { import('..').Options } options
7
7
  * @return { import('eslint').Linter.Config }
8
8
  */
9
9
  function base(options = {}) {
@@ -16,6 +16,7 @@ function cypress() {
16
16
  'cypress/no-unnecessary-waiting': 'error',
17
17
  'cypress/require-data-selectors': 'off',
18
18
  'cypress/unsafe-to-chain-command': 'error',
19
+ 'cypress/no-chained-get': 'error',
19
20
  '@typescript-eslint/no-namespace': 'off',
20
21
  },
21
22
  };
@@ -2,7 +2,7 @@ import { globalIgnores } from 'eslint/config';
2
2
 
3
3
  import { ignoreGlobs } from '../utils/globs.mjs';
4
4
  /**
5
- * @param { import('../option').Options } options
5
+ * @param { import('..').Options } options
6
6
  * @return { import('eslint').Linter.Config }
7
7
  */
8
8
  function ignores(options = {}) {
@@ -7,7 +7,7 @@ const jsExtensions = ['.mjs', '.js', '.jsx', '.cjs'];
7
7
  const allExtensions = [...jsExtensions, ...tsExtensions];
8
8
 
9
9
  /**
10
- * @param { import('../option').Options } options
10
+ * @param { import('..').Options } options
11
11
  * @return { import('eslint').Linter.Config }
12
12
  */
13
13
  function imports(options = {}) {
@@ -3,7 +3,7 @@ import plugin from 'eslint-plugin-jest';
3
3
  import { globs } from '../utils/globs.mjs';
4
4
 
5
5
  /**
6
- * @param { import('../option').Options } options
6
+ * @param { import('..').Options } options
7
7
  * @return { import('eslint').Linter.Config } */
8
8
  function jest() {
9
9
  return {
@@ -3,7 +3,7 @@ import plugin from 'eslint-plugin-n';
3
3
  import { strict } from '../utils/conditions.mjs';
4
4
 
5
5
  /**
6
- * @param { import('../option').Options } options
6
+ * @param { import('..').Options } options
7
7
  * @return { import('eslint').Linter.Config }
8
8
  */
9
9
  function node(options = {}) {
@@ -32,6 +32,9 @@ function react() {
32
32
  '@eslint-react/dom/no-unsafe-iframe-sandbox': 'warn',
33
33
  '@eslint-react/dom/no-unsafe-target-blank': 'warn',
34
34
  '@eslint-react/ensure-forward-ref-using-ref': 'off',
35
+ '@eslint-react/jsx-key-before-spread': 'error',
36
+ '@eslint-react/jsx-no-undef': 'off',
37
+ '@eslint-react/jsx-uses-react': 'off',
35
38
  '@eslint-react/no-access-state-in-setstate': 'error',
36
39
  '@eslint-react/no-array-index-key': 'warn',
37
40
  '@eslint-react/no-children-count': 'warn',
@@ -51,7 +54,9 @@ function react() {
51
54
  '@eslint-react/no-implicit-key': 'error',
52
55
  '@eslint-react/no-missing-context-display-name': 'off',
53
56
  '@eslint-react/no-missing-key': 'error',
57
+ '@eslint-react/no-misused-capture-owner-stack': 'error',
54
58
  '@eslint-react/no-nested-component-definitions': 'warn',
59
+ '@eslint-react/no-nested-lazy-component-declarations': 'error',
55
60
  '@eslint-react/no-redundant-should-component-update': 'error',
56
61
  '@eslint-react/no-set-state-in-component-did-mount': 'warn',
57
62
  '@eslint-react/no-set-state-in-component-did-update': 'warn',
@@ -67,8 +72,12 @@ function react() {
67
72
  '@eslint-react/no-useless-forward-ref': 'warn',
68
73
  '@eslint-react/no-useless-fragment': 'warn',
69
74
  '@eslint-react/prefer-destructuring-assignment': 'warn',
75
+
70
76
  '@eslint-react/prefer-shorthand-boolean': 'warn',
77
+ '@eslint-react/avoid-shorthand-boolean': 'off',
78
+
71
79
  '@eslint-react/prefer-shorthand-fragment': 'warn',
80
+ '@eslint-react/avoid-shorthand-fragment': 'off',
72
81
 
73
82
  '@eslint-react/hooks-extra/ensure-custom-hooks-using-other-hooks': 'warn',
74
83
  '@eslint-react/hooks-extra/ensure-use-memo-has-non-empty-deps': 'warn',
@@ -12,6 +12,7 @@ function storybook() {
12
12
  'storybook/context-in-play-function': 'error',
13
13
  'storybook/default-exports': 'error',
14
14
  'storybook/hierarchy-separator': 'warn',
15
+ 'storybook/meta-satisfies-type': 'warn',
15
16
  'storybook/no-redundant-story-name': 'warn',
16
17
  'storybook/no-uninstalled-addons': 'error',
17
18
  'storybook/prefer-pascal-case': 'warn',
@@ -20,9 +21,9 @@ function storybook() {
20
21
  'storybook/use-storybook-testing-library': 'error',
21
22
 
22
23
  'storybook/csf-component': 'warn',
24
+ 'storybook/meta-inline-properties': 'off',
23
25
  'storybook/no-stories-of': 'warn',
24
26
  'storybook/no-title-property-in-meta': 'off',
25
- 'storybook/meta-inline-properties': 'off',
26
27
 
27
28
  // Conflicts
28
29
  '@typescript-eslint/no-confusing-void-expression': 'off',
@@ -1,7 +1,7 @@
1
1
  import stylisticPlugin from '@stylistic/eslint-plugin';
2
2
 
3
3
  /**
4
- * @param { import('../option').Options } options
4
+ * @param { import('..').Options } options
5
5
  * @return { Promise<import('eslint').Linter.Config> }
6
6
  */
7
7
  function stylistic() {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @param { import('../option').Options } options
2
+ * @param { import('..').Options } options
3
3
  * @return { Promise<import('eslint').Linter.Config> }
4
4
  */
5
5
  async function tailwind(options = {}) {
@@ -5,7 +5,7 @@ import { predicate } from '../utils/conditions.mjs';
5
5
  import { globs } from '../utils/globs.mjs';
6
6
 
7
7
  /**
8
- * @param { import('../option').Options } options
8
+ * @param { import('..').Options } options
9
9
  * @return { import('eslint').Linter.Config }
10
10
  */
11
11
  function tests(options = {}) {
@@ -5,7 +5,7 @@ import { globs } from '../utils/globs.mjs';
5
5
  import { namingConvention } from '../utils/naming-convention.mjs';
6
6
 
7
7
  /**
8
- * @param { import('../option').Options } options
8
+ * @param { import('..').Options } options
9
9
  * @return { import('eslint').Linter.Config }
10
10
  */
11
11
  function typescript(options = {}) {
@@ -168,7 +168,7 @@ function typescript(options = {}) {
168
168
  '@typescript-eslint/no-misused-spread': 'error',
169
169
  '@typescript-eslint/no-mixed-enums': 'error',
170
170
  '@typescript-eslint/no-redundant-type-constituents': 'warn',
171
- // '@typescript-eslint/no-throw-literal': ['warn', { allowThrowingUnknown: false }],
171
+ '@typescript-eslint/no-unnecessary-type-conversion': 'error',
172
172
  '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
173
173
  '@typescript-eslint/no-unsafe-enum-comparison': 'warn',
174
174
  '@typescript-eslint/no-unnecessary-condition': [
@@ -184,6 +184,7 @@ function typescript(options = {}) {
184
184
  '@typescript-eslint/no-unnecessary-type-assertion': 'error',
185
185
  '@typescript-eslint/no-unsafe-unary-minus': 'error',
186
186
  '@typescript-eslint/non-nullable-type-assertion-style': 'warn',
187
+ '@typescript-eslint/only-throw-error': ['warn', { allowRethrowing: true }],
187
188
  '@typescript-eslint/prefer-includes': 'warn',
188
189
  '@typescript-eslint/prefer-optional-chain': 'warn',
189
190
  '@typescript-eslint/prefer-reduce-type-parameter': 'warn',