@websolutespa/eslint-config 3.0.1-next.0 → 3.1.1

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,10 +1,21 @@
1
1
  # @websolutespa/eslint-config
2
2
 
3
- ## 3.0.1-next.0
3
+ ## 3.1.1
4
4
 
5
- ### Patch Changes
5
+ ## 3.1.0
6
+
7
+ ### Minor Changes
6
8
 
7
- - Add a `no-restricted-imports` rule for `next/headers` outside `src/app` and route handlers.
9
+ - 044732e: - ESLint 10 (@eslint/js 10, typescript-eslint 8.72, react-hooks 7, @stylistic 5.10, globals 17)
10
+ - core formatting rules replaced by their `@stylistic/*` equivalents
11
+ - eslint-plugin-react wrapped with `@eslint/compat` `fixupPluginRules` (it uses context methods removed in ESLint 10)
12
+ - plugin config: no typescript project service (no type-aware rules are enabled)
13
+ - `no-restricted-imports` for `next/headers` outside `src/app`, handlers and tests (as on the bom-next branch)
14
+ - ignore patterns (`dist`, `build`, `.next`, `.turbo`, `.rollup.cache`) match at any depth: ESLint 10 resolves the config from each file's directory, so a parent config no longer ignored nested `dist` folders
15
+ - 3f7c21b: - Payload 3.91.0 and Next.js 16.4.2 (React 19.2.9): peer dependencies are now ranges, `payload` / `@payloadcms/*` `^3.91.0`, `next` `^16.3.3`, `react` / `react-dom` `^19.2.1`
16
+ - payload-plugin-bowl: the mixer context is built only for reads by an authenticated user (payload 3.90+ resolves the jwt user with the request query, populating tenants before `req.user` is set); email options typed with payload `SendEmailOptions`, no direct nodemailer dependency
17
+ - payload-plugin-storage: `AZURE_STORAGE_CONTAINER_ACCESS` (`private` default since payload 3.90, `blob`, `container`) for containers created by the plugin
18
+ - mixer web: `images.qualities` includes `IMAGE_QUALITY` (next 16 defaults to `[75]`)
8
19
 
9
20
  ## 3.0.0
10
21
 
package/base.js CHANGED
@@ -59,10 +59,11 @@ export const base = [
59
59
  },
60
60
  {
61
61
  ignores: [
62
- '.next/**',
63
- '.turbo/**',
64
- 'build/**',
65
- 'dist/**',
62
+ '**/.next/**',
63
+ '**/.rollup.cache/**',
64
+ '**/.turbo/**',
65
+ '**/build/**',
66
+ '**/dist/**',
66
67
  'src/app/(payload)/**',
67
68
  ],
68
69
  },
@@ -70,7 +71,7 @@ export const base = [
70
71
  plugins: { '@stylistic': stylistic },
71
72
  rules: {
72
73
  '@stylistic/quotes': ['error', 'single'],
73
- 'comma-dangle': ['warn', {
74
+ '@stylistic/comma-dangle': ['warn', {
74
75
  'arrays': 'always-multiline',
75
76
  'objects': 'always-multiline',
76
77
  'imports': 'never',
@@ -78,19 +79,18 @@ export const base = [
78
79
  'functions': 'never',
79
80
  }],
80
81
  'for-direction': 'off',
81
- 'indent': ['error', 2, {
82
+ '@stylistic/indent': ['error', 2, {
82
83
  'SwitchCase': 1,
83
84
  }],
84
- 'jsx-quotes': ['error', 'prefer-double'],
85
+ '@stylistic/jsx-quotes': ['error', 'prefer-double'],
85
86
  'no-cond-assign': ['error', 'always'],
86
87
  'no-empty-function': 'off',
87
88
  'no-empty': 'warn',
88
- 'no-extra-semi': 'error',
89
- 'no-multi-spaces': 'error',
89
+ '@stylistic/no-extra-semi': 'error',
90
+ '@stylistic/no-multi-spaces': 'error',
90
91
  'no-unreachable': 'error',
91
92
  'no-unused-vars': 'off',
92
- 'quotes': ['error', 'single'],
93
- 'semi': 'error',
93
+ '@stylistic/semi': 'error',
94
94
  },
95
95
  }, {
96
96
  files: [
package/next.js CHANGED
@@ -1,9 +1,17 @@
1
1
  import nextPlugin from '@next/eslint-plugin-next';
2
- import reactPlugin from 'eslint-plugin-react';
2
+ import { fixupPluginRules } from '@eslint/compat';
3
+ import reactPluginSource from 'eslint-plugin-react';
3
4
  import reactHooks from 'eslint-plugin-react-hooks';
4
5
  import globals from 'globals';
5
6
  import { base } from './base.js';
6
7
 
8
+ // eslint-plugin-react uses context methods removed in eslint 10
9
+ const reactPlugin = fixupPluginRules(reactPluginSource);
10
+ const reactRecommended = {
11
+ ...reactPluginSource.configs.flat.recommended,
12
+ plugins: { react: reactPlugin },
13
+ };
14
+
7
15
  /**
8
16
  * A custom ESLint configuration for libraries that use Next.js.
9
17
  *
@@ -12,9 +20,9 @@ import { base } from './base.js';
12
20
  export const next = [
13
21
  ...base,
14
22
  {
15
- ...reactPlugin.configs.flat.recommended,
23
+ ...reactRecommended,
16
24
  languageOptions: {
17
- ...reactPlugin.configs.flat.recommended.languageOptions,
25
+ ...reactRecommended.languageOptions,
18
26
  globals: {
19
27
  ...globals.serviceworker,
20
28
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@websolutespa/eslint-config",
3
- "version": "3.0.1-next.0",
3
+ "version": "3.1.1",
4
4
  "description": "Eslint shared config of the BOM Repository",
5
5
  "keywords": [
6
6
  "bom",
@@ -15,20 +15,21 @@
15
15
  },
16
16
  "type": "module",
17
17
  "dependencies": {
18
- "@eslint/js": "9.31.0",
19
- "@next/eslint-plugin-next": "16.1.6",
20
- "@stylistic/eslint-plugin": "5.2.3",
21
- "eslint": "9.31.0",
22
- "eslint-config-prettier": "10.1.1",
23
- "eslint-plugin-only-warn": "1.1.0",
18
+ "@eslint/compat": "2.1.1",
19
+ "@eslint/js": "10.0.1",
20
+ "@next/eslint-plugin-next": "16.4.2",
21
+ "@stylistic/eslint-plugin": "5.10.0",
22
+ "eslint": "10.13.0",
23
+ "eslint-config-prettier": "10.1.8",
24
+ "eslint-plugin-only-warn": "1.2.1",
24
25
  "eslint-plugin-react": "7.37.5",
25
- "eslint-plugin-react-hooks": "5.2.0",
26
- "eslint-plugin-turbo": "2.5.0",
27
- "globals": "16.3.0",
28
- "typescript-eslint": "8.36.0"
26
+ "eslint-plugin-react-hooks": "7.1.1",
27
+ "eslint-plugin-turbo": "2.11.10",
28
+ "globals": "17.13.0",
29
+ "typescript-eslint": "8.72.0"
29
30
  },
30
31
  "devDependencies": {
31
- "typescript": "5.8.3"
32
+ "typescript": "6.0.3"
32
33
  },
33
34
  "main": "./base.js",
34
35
  "exports": {
package/plugin.js CHANGED
@@ -13,15 +13,11 @@ export const plugin = [
13
13
  },
14
14
  {
15
15
  languageOptions: {
16
+ // no type-aware rules are enabled, so no typescript project service is needed
17
+ // (it failed on files outside the tsconfig, e.g. tests and eslint.config.js)
16
18
  parserOptions: {
17
19
  sourceType: 'module',
18
20
  ecmaVersion: 'latest',
19
- projectService: {
20
- maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING: 40,
21
- allowDefaultProject: ['scripts/*.ts', '*.js', '*.mjs', '*.spec.ts', '*.d.ts'],
22
- },
23
- // projectService: true,
24
- tsconfigRootDir: import.meta.dirname,
25
21
  },
26
22
  },
27
23
  },
package/react.js CHANGED
@@ -1,18 +1,26 @@
1
- import reactPlugin from 'eslint-plugin-react';
1
+ import { fixupPluginRules } from '@eslint/compat';
2
+ import reactPluginSource from 'eslint-plugin-react';
2
3
  import reactHooksPlugin from 'eslint-plugin-react-hooks';
3
4
  import globals from 'globals';
4
5
  import { base } from './base.js';
5
6
 
7
+ // eslint-plugin-react uses context methods removed in eslint 10
8
+ const reactPlugin = fixupPluginRules(reactPluginSource);
9
+ const reactRecommended = {
10
+ ...reactPluginSource.configs.flat.recommended,
11
+ plugins: { react: reactPlugin },
12
+ };
13
+
6
14
  /**
7
15
  * A custom ESLint configuration for libraries that use React.
8
16
  *
9
17
  * @type {import("eslint").Linter.Config[]} */
10
18
  export const react = [
11
19
  ...base,
12
- reactPlugin.configs.flat.recommended,
20
+ reactRecommended,
13
21
  {
14
22
  languageOptions: {
15
- ...reactPlugin.configs.flat.recommended.languageOptions,
23
+ ...reactRecommended.languageOptions,
16
24
  globals: {
17
25
  ...globals.serviceworker,
18
26
  ...globals.browser,