@will-stone/eslint-config 0.2.1 → 0.4.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 +16 -0
- package/eslint-config.js +21 -8
- package/package.json +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @will-stone/eslint-config
|
|
2
2
|
|
|
3
|
+
## 0.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 12d89b6: Ignore files using gitignore.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 9a4fc4b: Internal refactor to use parsers in a consistent manner.
|
|
12
|
+
|
|
13
|
+
## 0.3.0
|
|
14
|
+
|
|
15
|
+
### Minor Changes
|
|
16
|
+
|
|
17
|
+
- 7c6172a: Added full support for Astro's recommended rules.
|
|
18
|
+
|
|
3
19
|
## 0.2.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/eslint-config.js
CHANGED
|
@@ -2,6 +2,9 @@ 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 gitignore from 'eslint-config-flat-gitignore'
|
|
7
|
+
import astroPlugin, { configs } from 'eslint-plugin-astro'
|
|
5
8
|
import importPlugin from 'eslint-plugin-import'
|
|
6
9
|
import jestPlugin from 'eslint-plugin-jest'
|
|
7
10
|
import jsxA11yPlugin from 'eslint-plugin-jsx-a11y'
|
|
@@ -84,6 +87,8 @@ const isNode =
|
|
|
84
87
|
isNodeEngine || fs.existsSync('.nvmrc') || fs.existsSync('.node-version')
|
|
85
88
|
|
|
86
89
|
export default [
|
|
90
|
+
gitignore(),
|
|
91
|
+
|
|
87
92
|
// Global
|
|
88
93
|
{
|
|
89
94
|
settings: {
|
|
@@ -93,15 +98,9 @@ export default [
|
|
|
93
98
|
},
|
|
94
99
|
},
|
|
95
100
|
|
|
96
|
-
// Global ignore patterns
|
|
97
|
-
{
|
|
98
|
-
// Common build folders
|
|
99
|
-
ignores: ['**/.webpack', '**/dist', '**/.astro', '**/.next'],
|
|
100
|
-
},
|
|
101
|
-
|
|
102
101
|
// Base
|
|
103
102
|
{
|
|
104
|
-
files: ['**/*.{js,cjs,mjs,jsx,ts,tsx}'],
|
|
103
|
+
files: ['**/*.{js,cjs,mjs,jsx,ts,tsx,astro}'],
|
|
105
104
|
languageOptions: {
|
|
106
105
|
globals: {
|
|
107
106
|
...globals.browser,
|
|
@@ -128,7 +127,7 @@ export default [
|
|
|
128
127
|
|
|
129
128
|
// TS
|
|
130
129
|
{
|
|
131
|
-
files: ['**/*.{ts,tsx}'],
|
|
130
|
+
files: ['**/*.{ts,tsx,astro}'],
|
|
132
131
|
languageOptions: {
|
|
133
132
|
parser: tsParser,
|
|
134
133
|
},
|
|
@@ -138,6 +137,20 @@ export default [
|
|
|
138
137
|
rules: tsRules,
|
|
139
138
|
},
|
|
140
139
|
|
|
140
|
+
// Astro
|
|
141
|
+
{
|
|
142
|
+
files: ['**/*.astro'],
|
|
143
|
+
languageOptions: {
|
|
144
|
+
parser: astroParser,
|
|
145
|
+
parserOptions: {
|
|
146
|
+
extraFileExtensions: ['.astro'],
|
|
147
|
+
parser: tsParser,
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
plugins: { astro: astroPlugin },
|
|
151
|
+
rules: configs.recommended.rules,
|
|
152
|
+
},
|
|
153
|
+
|
|
141
154
|
// JSX files (React)
|
|
142
155
|
{
|
|
143
156
|
files: ['**/*.{jsx,tsx}'],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@will-stone/eslint-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Will Stone's ESLint config, using the Flat Config style.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ESLint"
|
|
@@ -23,7 +23,10 @@
|
|
|
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-config-flat-gitignore": "^0.1.0",
|
|
29
|
+
"eslint-plugin-astro": "^0.29.0",
|
|
27
30
|
"eslint-plugin-import": "^2.28.1",
|
|
28
31
|
"eslint-plugin-jest": "^27.4.0",
|
|
29
32
|
"eslint-plugin-jsx-a11y": "^6.7.1",
|