@aliexme/eslint-config 3.0.0 → 3.1.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.
package/README.md CHANGED
@@ -15,9 +15,9 @@ Extend your ESLint config file:
15
15
  ```js
16
16
  import eslintConfigRecommended from '@aliexme/eslint-config'
17
17
 
18
- export default [
19
- ...eslintConfigRecommended, // <--
20
- ]
18
+ export default defineConfig([
19
+ eslintConfigRecommended, // <--
20
+ ])
21
21
  ```
22
22
 
23
23
  ### React
@@ -33,10 +33,10 @@ And add the following lines to your ESLint config file:
33
33
  ```js
34
34
  import eslintConfigReact from '@aliexme/eslint-config/react'
35
35
 
36
- export default [
37
- ...eslintConfigRecommended,
38
- ...eslintConfigReact, // <--
39
- ]
36
+ export default defineConfig([
37
+ eslintConfigRecommended,
38
+ eslintConfigReact, // <--
39
+ ])
40
40
  ```
41
41
 
42
42
  ### React Native
@@ -52,10 +52,10 @@ And add the following lines to your ESLint config file:
52
52
  ```js
53
53
  import eslintConfigReactNative from '@aliexme/eslint-config/react-native'
54
54
 
55
- export default [
56
- ...eslintConfigRecommended,
57
- ...eslintConfigReactNative, // <--
58
- ]
55
+ export default defineConfig([
56
+ eslintConfigRecommended,
57
+ eslintConfigReactNative, // <--
58
+ ])
59
59
  ```
60
60
 
61
61
  ### Vue
@@ -71,10 +71,10 @@ And add the following lines to your ESLint config file:
71
71
  ```js
72
72
  import eslintConfigVue from '@aliexme/eslint-config/vue'
73
73
 
74
- export default [
75
- ...eslintConfigRecommended,
76
- ...eslintConfigVue, // <--
77
- ]
74
+ export default defineConfig([
75
+ eslintConfigRecommended,
76
+ eslintConfigVue, // <--
77
+ ])
78
78
  ```
79
79
 
80
80
  ### Prettier
@@ -90,8 +90,8 @@ And add the following lines to your ESLint config file:
90
90
  ```js
91
91
  import eslintConfigPrettier from '@aliexme/eslint-config/prettier'
92
92
 
93
- export default [
94
- ...eslintConfigRecommended,
95
- ...eslintConfigPrettier, // <--
96
- ]
93
+ export default defineConfig([
94
+ eslintConfigRecommended,
95
+ eslintConfigPrettier, // <--
96
+ ])
97
97
  ```
package/configs/import.js CHANGED
@@ -13,7 +13,19 @@ export default /** @type {import('eslint').Linter.Config[]} */ (
13
13
  createNodeResolver({ modules: ['src/', 'node_modules'] }),
14
14
  createTypeScriptImportResolver(),
15
15
  ],
16
- 'import-x/extensions': ['.js', '.cjs', '.mjs', '.jsx', '.ts', '.tsx', '.vue', '.astro'],
16
+ 'import-x/extensions': [
17
+ '.js',
18
+ '.cjs',
19
+ '.mjs',
20
+ '.jsx',
21
+ '.ts',
22
+ '.cts',
23
+ '.mts',
24
+ '.tsx',
25
+ '.vue',
26
+ '.svelte',
27
+ '.astro',
28
+ ],
17
29
  'import-x/ignore': ['node_modules'],
18
30
  },
19
31
  rules: {
@@ -22,7 +34,7 @@ export default /** @type {import('eslint').Linter.Config[]} */ (
22
34
  {
23
35
  groups: ['builtin', 'external', 'internal', ['parent', 'sibling'], 'index', 'object'],
24
36
  pathGroups: [
25
- { pattern: '{react*,vue*,astro*}', group: 'external', position: 'before' },
37
+ { pattern: '{react*,vue*,svelte*,astro*}', group: 'external', position: 'before' },
26
38
  { pattern: '{next*,nuxt*}', group: 'external', position: 'before' },
27
39
  { pattern: '@aliexme/**', group: 'external', position: 'after' },
28
40
  { pattern: '#*', group: 'external', position: 'after' },
@@ -0,0 +1,12 @@
1
+ import { defineConfig } from 'eslint/config'
2
+ import packageJson from 'eslint-plugin-package-json'
3
+
4
+ export default defineConfig([
5
+ packageJson.configs.recommended,
6
+ {
7
+ files: ['**/package.json'],
8
+ rules: {
9
+ 'package-json/sort-collections': ['error', ['dependencies', 'devDependencies', 'peerDependencies', 'overrides']],
10
+ },
11
+ },
12
+ ])
@@ -4,5 +4,6 @@ import baseConfig from './base.js'
4
4
  import typescriptConfig from './typescript.js'
5
5
  import stylisticConfig from './stylistic.js'
6
6
  import importConfig from './import.js'
7
+ import packageJsonConfig from './package-json.js'
7
8
 
8
- export default defineConfig([baseConfig, typescriptConfig, stylisticConfig, importConfig])
9
+ export default defineConfig([baseConfig, typescriptConfig, stylisticConfig, importConfig, packageJsonConfig])
@@ -3,6 +3,7 @@ import tseslint from 'typescript-eslint'
3
3
  export default /** @type {import('eslint').Linter.Config[]} */ (
4
4
  tseslint.config(tseslint.configs.strict, tseslint.configs.stylistic, {
5
5
  name: '@aliexme/eslint-config/typescript',
6
+ files: ['**/*.ts', '**/*.cts', '**/*.mts', '**/*.tsx', '**/*.vue', '**/*.svelte', '**/*.astro'],
6
7
  languageOptions: {
7
8
  parserOptions: {
8
9
  parser: tseslint.parser,
package/package.json CHANGED
@@ -1,9 +1,12 @@
1
1
  {
2
2
  "name": "@aliexme/eslint-config",
3
- "version": "3.0.0",
4
- "description": "Set of configs for ESLint",
3
+ "version": "3.1.0",
5
4
  "private": false,
6
- "author": "Alexander Smirnov <al.smirnov996@gmail.com>",
5
+ "description": "Set of configs for ESLint",
6
+ "keywords": [
7
+ "eslint",
8
+ "eslintconfig"
9
+ ],
7
10
  "homepage": "https://github.com/aliexme/web-shared/tree/main/packages/eslint-config",
8
11
  "repository": {
9
12
  "type": "git",
@@ -11,15 +14,9 @@
11
14
  "directory": "packages/eslint-config"
12
15
  },
13
16
  "license": "MIT",
14
- "keywords": [
15
- "eslint",
16
- "eslintconfig"
17
- ],
17
+ "author": "Alexander Smirnov <al.smirnov996@gmail.com>",
18
+ "sideEffects": false,
18
19
  "type": "module",
19
- "files": [
20
- "index.js",
21
- "configs"
22
- ],
23
20
  "exports": {
24
21
  ".": "./index.js",
25
22
  "./recommended": "./configs/recommended.js",
@@ -27,15 +24,17 @@
27
24
  "./typescript": "./configs/typescript.js",
28
25
  "./stylistic": "./configs/stylistic.js",
29
26
  "./import": "./configs/import.js",
27
+ "./package-json": "./configs/package-json.js",
30
28
  "./prettier": "./configs/prettier.js",
31
29
  "./react": "./configs/react.js",
32
30
  "./react-native": "./configs/react-native.js",
33
31
  "./vue": "./configs/vue.js"
34
32
  },
35
- "sideEffects": false,
36
- "publishConfig": {
37
- "access": "public"
38
- },
33
+ "types": "./index.d.ts",
34
+ "files": [
35
+ "index.js",
36
+ "configs"
37
+ ],
39
38
  "dependencies": {
40
39
  "@eslint/compat": "^1.3.0",
41
40
  "@eslint/eslintrc": "^3.3.1",
@@ -43,6 +42,7 @@
43
42
  "@stylistic/eslint-plugin": "^4.4.1",
44
43
  "eslint-import-resolver-typescript": "^4.4.3",
45
44
  "eslint-plugin-import-x": "^4.15.2",
45
+ "eslint-plugin-package-json": "^0.39.0",
46
46
  "globals": "^16.2.0",
47
47
  "typescript-eslint": "^8.34.0"
48
48
  },
@@ -79,5 +79,8 @@
79
79
  "optional": true
80
80
  }
81
81
  },
82
- "gitHead": "321970688f8f10ed7dade8a34bdc39bee724f4c8"
82
+ "publishConfig": {
83
+ "access": "public"
84
+ },
85
+ "gitHead": "b0b64c6bea3f7d5a2dcf2db3372b4ba29025d0bc"
83
86
  }