@dmitryrechkin/eslint-standard 1.4.8 → 1.5.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.
Files changed (2) hide show
  1. package/eslint.config.mjs +25 -2
  2. package/package.json +1 -1
package/eslint.config.mjs CHANGED
@@ -1,4 +1,13 @@
1
1
  // eslint.config.mjs
2
+ //
3
+ // ESLint 9.x Flat Config for @dmitryrechkin/eslint-standard
4
+ //
5
+ // For optimal compatibility, pass the prettier plugin from your consuming project:
6
+ //
7
+ // import eslintConfig from "@dmitryrechkin/eslint-standard";
8
+ // import prettierPlugin from "eslint-plugin-prettier";
9
+ //
10
+ // export default eslintConfig({ prettierPlugin });
2
11
  import tsParser from '@typescript-eslint/parser';
3
12
  import tsPlugin from '@typescript-eslint/eslint-plugin';
4
13
  import unusedImportsPlugin from 'eslint-plugin-unused-imports';
@@ -27,8 +36,12 @@ export default function ({
27
36
  ignores = [],
28
37
  files = [],
29
38
  plugins = {},
30
- rules = {}
39
+ rules = {},
40
+ prettierPlugin: externalPrettierPlugin = undefined
31
41
  } = {}) {
42
+ // Use external prettier plugin if provided, otherwise fallback to bundled one
43
+ const activePrettierPlugin = externalPrettierPlugin || prettierPlugin;
44
+
32
45
  return [
33
46
  {
34
47
  ignores: ['node_modules/**', 'dist/**', ...ignores],
@@ -64,7 +77,7 @@ export default function ({
64
77
  'no-secrets': noSecretsPlugin,
65
78
  'regexp': regexpPlugin,
66
79
  'functional': functionalPlugin,
67
- 'prettier': prettierPlugin,
80
+ 'prettier': activePrettierPlugin,
68
81
  ...plugins,
69
82
  },
70
83
  settings: {
@@ -130,12 +143,16 @@ export default function ({
130
143
  'index-signature',
131
144
  'static-property',
132
145
  'property',
146
+ 'protected-static-property',
133
147
  'protected-property',
148
+ 'private-static-property',
134
149
  'private-property',
135
150
  'constructor',
136
151
  'static-method',
137
152
  'method',
153
+ 'protected-static-method',
138
154
  'protected-method',
155
+ 'private-static-method',
139
156
  'private-method'
140
157
  ]
141
158
  }
@@ -796,6 +813,9 @@ export default function ({
796
813
  // Prettier config for TypeScript/JavaScript files with Allman brace style
797
814
  {
798
815
  files: ['**/*.{tsx,jsx,ts,js}'],
816
+ plugins: {
817
+ 'prettier': activePrettierPlugin
818
+ },
799
819
  rules: {
800
820
  'prettier/prettier': [
801
821
  'error',
@@ -815,6 +835,9 @@ export default function ({
815
835
  // Prettier config for Astro files
816
836
  {
817
837
  files: ['**/*.astro'],
838
+ plugins: {
839
+ 'prettier': activePrettierPlugin
840
+ },
818
841
  rules: {
819
842
  'prettier/prettier': [
820
843
  'error',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dmitryrechkin/eslint-standard",
3
3
  "description": "This package provides a shared ESLint configuration which includes TypeScript support and a set of specific linting rules designed to ensure high-quality and consistent code style across projects.",
4
- "version": "1.4.8",
4
+ "version": "1.5.0",
5
5
  "main": "eslint.config.mjs",
6
6
  "exports": {
7
7
  ".": "./eslint.config.mjs"