Skip to content

Commit e8f3e52

Browse files
authored
feat: support eslint 9 (#107)
Closes #93
1 parent 3647335 commit e8f3e52

27 files changed

+1832
-545
lines changed

Diff for: .eslintrc.js

-25
This file was deleted.

Diff for: README.md

+16-3
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,27 @@ This package is for migrating from Vuetify v2 to v3, use [eslint-plugin-vuetify@
1515

1616
## 💿 Install
1717

18-
You should have [`eslint`](https://eslint.org/docs/user-guide/getting-started) and [`eslint-plugin-vue`](https://eslint.vuejs.org/user-guide/#installation) set up first.
18+
You should have [`eslint`](https://eslint.org/docs/latest/use/getting-started) and [`eslint-plugin-vue`](https://eslint.vuejs.org/user-guide/#installation) set up first.
1919

2020
```bash
2121
yarn add eslint-plugin-vuetify -D
2222
# OR
2323
npm install eslint-plugin-vuetify --save-dev
2424
```
2525

26+
```js
27+
// eslint.config.js
28+
import vue from 'eslint-plugin-vue'
29+
import vuetify from 'eslint-plugin-vuetify'
30+
31+
export default [
32+
...vue.configs['flat/base'],
33+
...vuetify.configs['flat/base'],
34+
]
35+
```
36+
37+
Eslint 8 can alternatively use the older configuration format:
38+
2639
```js
2740
// .eslintrc.js
2841
module.exports = {
@@ -40,7 +53,7 @@ module.exports = {
4053

4154
### Deprecations
4255

43-
These rules will help you avoid deprecated components, props, and classes. They are included in the `plugin:vuetify/base` preset.
56+
These rules will help you avoid deprecated components, props, and classes. They are included in the `base` preset.
4457

4558
- Prevent the use of components that have been removed from Vuetify ([`no-deprecated-components`])
4659
- Prevent the use of props that have been removed from Vuetify ([`no-deprecated-props`])
@@ -52,7 +65,7 @@ These rules will help you avoid deprecated components, props, and classes. They
5265

5366
### Grid system
5467

55-
These rules are designed to help migrate to the new grid system in Vuetify v2. They are included in the `plugin:vuetify/recommended` preset.
68+
These rules are designed to help migrate to the new grid system in Vuetify v2. They are included in the `recommended` preset.
5669

5770
- Warn about unknown attributes not being converted to classes on new grid components ([`grid-unknown-attributes`])
5871

Diff for: eslint.config.js

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
const neostandard = require('neostandard')
2+
3+
module.exports = [
4+
...neostandard(),
5+
{
6+
rules: {
7+
'no-template-curly-in-string': 'off',
8+
9+
'@stylistic/quotes': ['error', 'single', {
10+
allowTemplateLiterals: true,
11+
}],
12+
'@stylistic/comma-dangle': ['error', {
13+
arrays: 'always-multiline',
14+
objects: 'always-multiline',
15+
imports: 'always-multiline',
16+
exports: 'always-multiline',
17+
functions: 'only-multiline',
18+
}],
19+
}
20+
}
21+
]

Diff for: package.json

+9-8
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"scripts": {
1010
"build": "rimraf lib && babel src --out-dir lib",
1111
"test": "mocha tests --recursive --reporter dot",
12+
"test:8": "ESLINT8=true mocha tests --recursive --reporter dot",
1213
"test:coverage": "nyc mocha tests --recursive --reporter dot",
1314
"test:ci": "nyc --reporter=lcov mocha tests --recursive --reporter dot",
1415
"lint": "eslint src tests",
@@ -26,23 +27,23 @@
2627
"@babel/cli": "^7.19.3",
2728
"@babel/core": "^7.19.6",
2829
"@babel/preset-env": "^7.19.4",
30+
"@stylistic/eslint-plugin": "^2.10.1",
2931
"conventional-changelog-cli": "^2.2.2",
3032
"conventional-changelog-vuetify": "^1.1.0",
3133
"conventional-github-releaser": "^3.1.5",
32-
"eslint": "^8.26.0",
33-
"eslint-config-standard": "^17.0.0",
34-
"eslint-plugin-import": "^2.26.0",
35-
"eslint-plugin-n": "^15.3.0",
36-
"eslint-plugin-promise": "^6.1.1",
34+
"eslint": "^9.14.0",
35+
"eslint8": "npm:[email protected]",
3736
"husky": "^8.0.1",
3837
"mocha": "^10.1.0",
38+
"neostandard": "^0.11.8",
3939
"nyc": "^15.1.0",
4040
"rimraf": "^3.0.2",
41-
"vue": "^3.2.41",
42-
"vuetify": "^3.0.0"
41+
"vue": "^3.5.12",
42+
"vue-eslint-parser": "^9.4.3",
43+
"vuetify": "^3.7.4"
4344
},
4445
"peerDependencies": {
45-
"eslint": "^8.0.0",
46+
"eslint": "^8.0.0 || ^9.0.0",
4647
"vuetify": "^3.0.0"
4748
},
4849
"packageManager": "[email protected]"

0 commit comments

Comments
 (0)