@petbee/eslint-config 2.0.1 → 2.0.3

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.
@@ -1,10 +1,6 @@
1
- declare module '@petbee/eslint-config' {
2
- import type { FlatConfig } from 'eslint'
1
+ import type { FlatConfig } from 'eslint'
3
2
 
4
- // For ESLint v9.x (flat config)
5
- const flatConfig: FlatConfig.Config[]
6
- export default flatConfig
3
+ declare const flatConfig: FlatConfig.Config[]
4
+ export default flatConfig
7
5
 
8
- // For older ESLint versions (.eslintrc)
9
- export const legacyConfig: Record<string, unknown>
10
- }
6
+ export declare const legacyConfig: Record<string, unknown>
package/eslint.config.mjs CHANGED
@@ -1,7 +1,4 @@
1
1
  import js from '@eslint/js'
2
- import parser from '@typescript-eslint/parser'
3
- import tsPlugin from '@typescript-eslint/eslint-plugin'
4
- import globals from 'globals'
5
2
 
6
3
  import prettierConfig from './rules/prettier.js'
7
4
  import errorsConfig from './rules/errors.js'
@@ -25,26 +22,6 @@ const getFlat = (config) => {
25
22
  export default [
26
23
  ignoreConfig,
27
24
  js.configs.recommended,
28
- {
29
- files: ['**/*.ts', '**/*.tsx'],
30
- languageOptions: {
31
- parser,
32
- parserOptions: {
33
- project: './tsconfig.json',
34
- sourceType: 'module',
35
- },
36
- globals: {
37
- ...globals.node,
38
- ...globals.jest,
39
- ...globals.es2015,
40
- __DEV__: true,
41
- },
42
- },
43
- plugins: {
44
- '@typescript-eslint': tsPlugin,
45
- },
46
- settings: {},
47
- },
48
25
  ...getFlat(prettierConfig),
49
26
  ...getFlat(errorsConfig),
50
27
  ...getFlat(nodeConfig),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@petbee/eslint-config",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "Petbee's eslint config",
5
5
  "keywords": [
6
6
  "eslint",
@@ -26,7 +26,7 @@
26
26
  "dump-config": "eslint-config-prettier index.js > config-dump.json",
27
27
  "format": "prettier --ignore-path='.gitignore' --list-different --write .",
28
28
  "format:check": "prettier --ignore-path='.gitignore' --check .",
29
- "lint": "eslint --ignore-path='.gitignore' '{src,tests}/**/*.{ts,tsx}'"
29
+ "lint": "eslint '{src,tests}/**/*.{ts,tsx}'"
30
30
  },
31
31
  "eslintConfig": {
32
32
  "extends": [
@@ -41,6 +41,7 @@
41
41
  "@typescript-eslint/eslint-plugin": "^8.32.1",
42
42
  "@typescript-eslint/parser": "^8.32.1",
43
43
  "confusing-browser-globals": "^1.0.11",
44
+ "eslint": "^9.27.0",
44
45
  "eslint-config-prettier": "^10.1.5",
45
46
  "eslint-plugin-cypress": "^4.3.0",
46
47
  "eslint-plugin-import": "^2.31.0",
@@ -50,13 +51,11 @@
50
51
  "eslint-plugin-react": "7.37.5"
51
52
  },
52
53
  "peerDependencies": {
53
- "eslint": ">=9.0.0",
54
54
  "prettier": ">=3.0.0",
55
55
  "typescript": "^4.0.0 || ^5.0.0"
56
56
  },
57
57
  "devDependencies": {
58
- "@types/react": "19.1.4",
59
- "eslint": "9.27.0",
58
+ "@types/react": "19.1.5",
60
59
  "prettier": "3.5.3",
61
60
  "react": "19.1.0",
62
61
  "typescript": "5.8.3"
@@ -64,5 +63,5 @@
64
63
  "publishConfig": {
65
64
  "access": "public"
66
65
  },
67
- "gitHead": "c901ea99b350dc6619d856ce3dd46960ba5640a9"
66
+ "gitHead": "9dcc3dbf07a400cba432a313965755c24f8f65e7"
68
67
  }
@@ -11,7 +11,7 @@ module.exports = hasTypescript
11
11
  plugins: ['@typescript-eslint'],
12
12
  parser: '@typescript-eslint/parser',
13
13
  parserOptions: {
14
- ecmaVersion: 2019,
14
+ ecmaVersion: 2022,
15
15
  sourceType: 'module',
16
16
  project: [
17
17
  // look in the root
@@ -50,7 +50,8 @@ module.exports = hasTypescript
50
50
  'warn',
51
51
  {
52
52
  ignoreRestSiblings: true,
53
- argsIgnorePattern: '_+',
53
+ argsIgnorePattern: '^_+',
54
+ varsIgnorePattern: '^_',
54
55
  },
55
56
  ],
56
57
 
@@ -286,10 +287,10 @@ if (hasTypescript) {
286
287
  module.exports.flat = [
287
288
  {
288
289
  files: overrides[0]?.files,
289
- languageOptions: {
290
- parser: require.resolve('@typescript-eslint/parser'),
291
- parserOptions: overrides[0]?.parserOptions,
292
- },
290
+ // languageOptions: {
291
+ // parser: overrides[0]?.parserOptions?.parser,
292
+ // parserOptions: overrides[0]?.parserOptions,
293
+ // },
293
294
  plugins: {
294
295
  '@typescript-eslint': require('@typescript-eslint/eslint-plugin'),
295
296
  },