@aliexme/eslint-config 3.1.0 → 3.2.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
@@ -77,6 +77,25 @@ export default defineConfig([
77
77
  ])
78
78
  ```
79
79
 
80
+ ### Astro
81
+
82
+ Install additional packages:
83
+
84
+ ```sh
85
+ npm i --save-dev eslint-plugin-astro
86
+ ```
87
+
88
+ And add the following lines to your ESLint config file:
89
+
90
+ ```js
91
+ import eslintConfigAstro from '@aliexme/eslint-config/astro'
92
+
93
+ export default defineConfig([
94
+ eslintConfigRecommended,
95
+ eslintConfigAstro, // <--
96
+ ])
97
+ ```
98
+
80
99
  ### Prettier
81
100
 
82
101
  Install additional packages:
@@ -0,0 +1,21 @@
1
+ import { defineConfig } from 'eslint/config'
2
+ import eslintPluginAstro from 'eslint-plugin-astro'
3
+
4
+ export default defineConfig([
5
+ eslintPluginAstro.configs.recommended,
6
+ {
7
+ files: ['**/*.astro'],
8
+ languageOptions: {
9
+ parserOptions: {
10
+ project: true,
11
+ projectService: false,
12
+ },
13
+ },
14
+ rules: {
15
+ 'astro/no-unused-css-selector': 'error',
16
+ 'astro/prefer-class-list-directive': 'error',
17
+ 'astro/prefer-object-class-list': 'error',
18
+ 'astro/prefer-split-class-list': ['error', { splitLiteral: true }],
19
+ },
20
+ },
21
+ ])
package/index.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ import type { Linter } from 'eslint'
2
+
3
+ declare const config: Linter.Config[]
4
+ export default config
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aliexme/eslint-config",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
4
4
  "private": false,
5
5
  "description": "Set of configs for ESLint",
6
6
  "keywords": [
@@ -28,11 +28,13 @@
28
28
  "./prettier": "./configs/prettier.js",
29
29
  "./react": "./configs/react.js",
30
30
  "./react-native": "./configs/react-native.js",
31
- "./vue": "./configs/vue.js"
31
+ "./vue": "./configs/vue.js",
32
+ "./astro": "./configs/astro.js"
32
33
  },
33
34
  "types": "./index.d.ts",
34
35
  "files": [
35
36
  "index.js",
37
+ "index.d.ts",
36
38
  "configs"
37
39
  ],
38
40
  "dependencies": {
@@ -49,6 +51,7 @@
49
51
  "peerDependencies": {
50
52
  "eslint": "^9.0.0",
51
53
  "eslint-config-prettier": "^10.0.0",
54
+ "eslint-plugin-astro": "^1.3.1",
52
55
  "eslint-plugin-prettier": "^5.0.0",
53
56
  "eslint-plugin-react": "^7.0.0",
54
57
  "eslint-plugin-react-hooks": "^5.0.0",
@@ -60,6 +63,9 @@
60
63
  "eslint-config-prettier": {
61
64
  "optional": true
62
65
  },
66
+ "eslint-plugin-astro": {
67
+ "optional": true
68
+ },
63
69
  "eslint-plugin-prettier": {
64
70
  "optional": true
65
71
  },
@@ -82,5 +88,5 @@
82
88
  "publishConfig": {
83
89
  "access": "public"
84
90
  },
85
- "gitHead": "b0b64c6bea3f7d5a2dcf2db3372b4ba29025d0bc"
91
+ "gitHead": "cc9d76c56daf32599e75306c876793514b523717"
86
92
  }