@will-stone/eslint-config 0.2.1 → 0.3.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @will-stone/eslint-config
2
2
 
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 7c6172a: Added full support for Astro's recommended rules.
8
+
3
9
  ## 0.2.1
4
10
 
5
11
  ### Patch Changes
package/eslint-config.js CHANGED
@@ -2,6 +2,8 @@ import fs from 'node:fs'
2
2
 
3
3
  import tsPlugin from '@typescript-eslint/eslint-plugin'
4
4
  import tsParser from '@typescript-eslint/parser'
5
+ import astroParser from 'astro-eslint-parser'
6
+ import astroPlugin, { configs } from 'eslint-plugin-astro'
5
7
  import importPlugin from 'eslint-plugin-import'
6
8
  import jestPlugin from 'eslint-plugin-jest'
7
9
  import jsxA11yPlugin from 'eslint-plugin-jsx-a11y'
@@ -101,7 +103,7 @@ export default [
101
103
 
102
104
  // Base
103
105
  {
104
- files: ['**/*.{js,cjs,mjs,jsx,ts,tsx}'],
106
+ files: ['**/*.{js,cjs,mjs,jsx,ts,tsx,astro}'],
105
107
  languageOptions: {
106
108
  globals: {
107
109
  ...globals.browser,
@@ -128,7 +130,7 @@ export default [
128
130
 
129
131
  // TS
130
132
  {
131
- files: ['**/*.{ts,tsx}'],
133
+ files: ['**/*.{ts,tsx,astro}'],
132
134
  languageOptions: {
133
135
  parser: tsParser,
134
136
  },
@@ -138,6 +140,20 @@ export default [
138
140
  rules: tsRules,
139
141
  },
140
142
 
143
+ // Astro
144
+ {
145
+ files: ['**/*.astro'],
146
+ languageOptions: {
147
+ parser: astroParser,
148
+ parserOptions: {
149
+ extraFileExtensions: ['.astro'],
150
+ parser: '@typescript-eslint/parser',
151
+ },
152
+ },
153
+ plugins: { astro: astroPlugin },
154
+ rules: configs.recommended.rules,
155
+ },
156
+
141
157
  // JSX files (React)
142
158
  {
143
159
  files: ['**/*.{jsx,tsx}'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@will-stone/eslint-config",
3
- "version": "0.2.1",
3
+ "version": "0.3.0",
4
4
  "description": "Will Stone's ESLint config, using the Flat Config style.",
5
5
  "keywords": [
6
6
  "ESLint"
@@ -23,7 +23,9 @@
23
23
  "dependencies": {
24
24
  "@typescript-eslint/eslint-plugin": "^6.7.0",
25
25
  "@typescript-eslint/parser": "^6.7.0",
26
+ "astro-eslint-parser": "^0.15.0",
26
27
  "confusing-browser-globals": "^1.0.11",
28
+ "eslint-plugin-astro": "^0.29.0",
27
29
  "eslint-plugin-import": "^2.28.1",
28
30
  "eslint-plugin-jest": "^27.4.0",
29
31
  "eslint-plugin-jsx-a11y": "^6.7.1",