Skip to content

Commit 3edcbc0

Browse files
kazuponvhoyer
andauthored
feat: support flat config and eslint v9 (#1073)
* feat: support flat config * refactor: tweak test context * fix: update docs & tweak vitepress * fix: remove * fix: add name for eslint inspector debugging * test: eslint v9 testing * fix: support eslint v8.x and v9 compatibility * 🙈 Add .eslintignore file to skip test fixtures * 🚚 Move fixtures to a separate __fixtures__ folder * 🚨 Fix prettier warnings * 🐛 Prettier broke @ts-expect-error --------- Co-authored-by: Vinícius Hoyer <[email protected]>
1 parent d9a8cb7 commit 3edcbc0

28 files changed

+373
-104
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
__fixtures__/
2+
dist/

.github/workflows/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ jobs:
1919
- name: Lint and test
2020
run: |
2121
yarn install --frozen-lockfile
22-
yarn prepublishOnly
22+
yarn build
2323
yarn lint
2424
yarn prettier --check '**/*'
2525
yarn test
26+
yarn test:integration

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/.husky/
33
/.idea/
44
/dist/
5-
/node_modules/
5+
node_modules
66
/docs/.vitepress/dist
77
/docs/.vitepress/cache
88
yarn-error.log

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
.eslintcache
2+
.eslintignore
23
.gitignore
34
.husky
45
.npmignore
56
.prettierignore
67
LICENSE
78
yarn.lock
89
dist
10+
__fixtures__
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<template>
2+
<div>
3+
<img src="foo" />
4+
</div>
5+
</template>
6+
7+
<script>
8+
import { ref } from "vue";
9+
const counter = ref(0);
10+
console.log("counter", counter);
11+
</script>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import plugin from "eslint-plugin-vuejs-accessibility";
2+
3+
export default [
4+
...plugin.configs["flat/recommended"],
5+
{
6+
rules: {
7+
"vuejs-accessibility/alt-text": "warn"
8+
}
9+
}
10+
];
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"private": true,
3+
"name": "integration-test-for-flat-config",
4+
"type": "module",
5+
"version": "1.0.0",
6+
"description": "Integration test for flat config",
7+
"dependencies": {
8+
"eslint": "^9.0.0",
9+
"eslint-plugin-vuejs-accessibility": "file:../../../.."
10+
}
11+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"root": true,
3+
"extends": ["plugin:vuejs-accessibility/recommended"],
4+
"plugins": ["vuejs-accessibility"],
5+
"parser": "vue-eslint-parser",
6+
"parserOptions": {
7+
"sourceType": "module",
8+
"ecmaVersion": 2019
9+
},
10+
"rules": {
11+
"vuejs-accessibility/alt-text": "warn"
12+
}
13+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

0 commit comments

Comments
 (0)