Skip to content

Commit

Permalink
feat: support eslint 9 (#107)
Browse files Browse the repository at this point in the history
Closes #93
  • Loading branch information
KaelWD authored Nov 18, 2024
1 parent 3647335 commit e8f3e52
Show file tree
Hide file tree
Showing 27 changed files with 1,832 additions and 545 deletions.
25 changes: 0 additions & 25 deletions .eslintrc.js

This file was deleted.

19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,27 @@ This package is for migrating from Vuetify v2 to v3, use [eslint-plugin-vuetify@

## 💿 Install

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.
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.

```bash
yarn add eslint-plugin-vuetify -D
# OR
npm install eslint-plugin-vuetify --save-dev
```

```js
// eslint.config.js
import vue from 'eslint-plugin-vue'
import vuetify from 'eslint-plugin-vuetify'

export default [
...vue.configs['flat/base'],
...vuetify.configs['flat/base'],
]
```

Eslint 8 can alternatively use the older configuration format:

```js
// .eslintrc.js
module.exports = {
Expand All @@ -40,7 +53,7 @@ module.exports = {

### Deprecations

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

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

### Grid system

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

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

Expand Down
21 changes: 21 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const neostandard = require('neostandard')

module.exports = [
...neostandard(),
{
rules: {
'no-template-curly-in-string': 'off',

'@stylistic/quotes': ['error', 'single', {
allowTemplateLiterals: true,
}],
'@stylistic/comma-dangle': ['error', {
arrays: 'always-multiline',
objects: 'always-multiline',
imports: 'always-multiline',
exports: 'always-multiline',
functions: 'only-multiline',
}],
}
}
]
17 changes: 9 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"scripts": {
"build": "rimraf lib && babel src --out-dir lib",
"test": "mocha tests --recursive --reporter dot",
"test:8": "ESLINT8=true mocha tests --recursive --reporter dot",
"test:coverage": "nyc mocha tests --recursive --reporter dot",
"test:ci": "nyc --reporter=lcov mocha tests --recursive --reporter dot",
"lint": "eslint src tests",
Expand All @@ -26,23 +27,23 @@
"@babel/cli": "^7.19.3",
"@babel/core": "^7.19.6",
"@babel/preset-env": "^7.19.4",
"@stylistic/eslint-plugin": "^2.10.1",
"conventional-changelog-cli": "^2.2.2",
"conventional-changelog-vuetify": "^1.1.0",
"conventional-github-releaser": "^3.1.5",
"eslint": "^8.26.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-n": "^15.3.0",
"eslint-plugin-promise": "^6.1.1",
"eslint": "^9.14.0",
"eslint8": "npm:eslint@8.57.1",
"husky": "^8.0.1",
"mocha": "^10.1.0",
"neostandard": "^0.11.8",
"nyc": "^15.1.0",
"rimraf": "^3.0.2",
"vue": "^3.2.41",
"vuetify": "^3.0.0"
"vue": "^3.5.12",
"vue-eslint-parser": "^9.4.3",
"vuetify": "^3.7.4"
},
"peerDependencies": {
"eslint": "^8.0.0",
"eslint": "^8.0.0 || ^9.0.0",
"vuetify": "^3.0.0"
},
"packageManager": "pnpm@9.13.2"
Expand Down
Loading

0 comments on commit e8f3e52

Please sign in to comment.