Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eslint-plugin-vue v10 #2625

Merged
merged 19 commits into from
Mar 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
31d37e7
Fix detect Nuxt3 defineNuxtComponent (#2311)
sugitata Nov 27, 2024
e406531
Add `vue/block-order` to recommended configs (#2627)
FloEdelmann Nov 30, 2024
afb46b6
Add `vue/no-deprecated-delete-set` to `vue3-essential` config (#2628)
FloEdelmann Nov 30, 2024
ad780b5
Add `vue/no-deprecated-model-definition` to `vue3-essential` config (…
FloEdelmann Nov 30, 2024
2c69975
Remove legacy schema from `vue/custom-event-name-casing` (#2626)
FloEdelmann Nov 30, 2024
31c578f
Add `slots`+`expose` to `vue/order-in-components` default order (#2153)
ota-meshi Dec 1, 2024
e90271c
Add update-resources script (#2171)
ota-meshi Dec 1, 2024
49d5c45
Change Versioning Policy (#2630)
ota-meshi Dec 1, 2024
bd17a5f
Add `vue/no-required-prop-with-default` to recommended configs (#2640)
FloEdelmann Dec 13, 2024
011379f
Remove deprecated rules (#2645)
FloEdelmann Dec 13, 2024
49f3fc8
Rename .eslintrc configs (#2648)
FloEdelmann Dec 16, 2024
ca655c6
Remove setup-compiler-macros environments (#2652)
waynzh Dec 17, 2024
93ae60f
Add `vue/valid-define-options` to `vue3-essential` config (#2653)
waynzh Dec 17, 2024
e1c2830
Remove unused `runOutsideVue` option from `vue/sort-keys` (#2655)
FloEdelmann Dec 19, 2024
5ba1fe4
Change `vue-eslint-parser` to peer dependency (#2670)
ota-meshi Jan 29, 2025
71e3e20
Change legacy base config so that vue-eslint-parser is only used for …
ota-meshi Jan 29, 2025
c600e9f
Drop support for old versions of ESLint and Node.js (#2669)
ota-meshi Jan 30, 2025
05c6709
Remove globals from configs (#2674)
ota-meshi Jan 30, 2025
d0aeed5
Deprecate Vue 2 only rules (#2675)
FloEdelmann Feb 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
142 changes: 0 additions & 142 deletions .circleci/config.yml

This file was deleted.

49 changes: 15 additions & 34 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
- name: Install Packages
run: npm install --legacy-peer-deps
- name: Lint
Expand All @@ -30,58 +30,39 @@ jobs:
name: Test
strategy:
matrix:
node: [18, 20]
eslint: [8, 9]
node: [18, 20, 21, 'lts/*']
eslint: [9]
include:
# On old Node version
- node: 17
# On old ESLint version
- node: 18
eslint: 8

runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Node.js v${{ matrix.node }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Install Packages
run: npm install --legacy-peer-deps
run: npm install -f
- name: Install ESLint v${{ matrix.eslint }}
run: npm install --save-dev eslint@${{ matrix.eslint }} --legacy-peer-deps
- name: Test
run: npm test

test-for-ts-eslint-v5:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install Packages
run: npm install --legacy-peer-deps
- name: Install typescript-eslint v5
run: npm install -D @typescript-eslint/parser
run: npm install --save-dev eslint@${{ matrix.eslint }} -f
- name: Test
run: npm test

test-for-eslint-v8-without-eslint-stylistic:
name: Test
test-without-eslint-stylistic:
name: Test without ESLint Stylistic
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
- name: Install Packages
run: npm install --legacy-peer-deps
run: npm install -f
- name: Uninstall @stylistic/eslint-plugin
run: npm uninstall -D @stylistic/eslint-plugin
- name: Install eslint v8
run: npm install -D eslint@8
- name: Test
run: npm test
30 changes: 30 additions & 0 deletions .github/workflows/check-for-resources-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Check for utils resources update
on:
workflow_dispatch: null
schedule:
- cron: 0 0 * * 0 # At 00:00 on Sunday, see https://crontab.guru/#0_0_*_*_0

permissions:
contents: write
pull-requests: write

jobs:
check-for-resources-update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install Packages
run: npm install
- name: Update
run: npm run update-resources
- uses: peter-evans/create-pull-request@v7
with:
commit-message: Updates resources
branch: update-resources
branch-suffix: timestamp
title: Updates resources
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,14 @@ Please refer to the [official website](https://eslint.vuejs.org).

## :anchor: Versioning Policy

This plugin follows [Semantic Versioning](https://semver.org) and [ESLint's Semantic Versioning Policy](https://github.com/eslint/eslint#semantic-versioning-policy).
This plugin follows [Semantic Versioning].
However, please note that we do not follow [ESLint's Semantic Versioning Policy].
In minor version releases, this plugin may change the sharable configs provided by the plugin or the default behavior of the plugin's rules in order to add features to the plugin. Because we want to add many features to the plugin soon, so that users can easily take advantage of new features in Vue and Nuxt.

According to our policy, any minor update may report more linting errors than the previous release. As such, we recommend using the [tilde (`~`)](https://semver.npmjs.com/#syntax-examples) in `package.json` to guarantee the results of your builds.

[Semantic Versioning]: https://semver.org/
[ESLint's Semantic Versioning Policy]: https://github.com/eslint/eslint#semantic-versioning-policy

## :newspaper: Releases

Expand Down
9 changes: 8 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@ ESLint editor integrations are useful to check your code in real-time.

## :traffic_light: Versioning policy

This plugin is following [Semantic Versioning](https://semver.org/) and [ESLint's Semantic Versioning Policy](https://github.com/eslint/eslint#semantic-versioning-policy).
This plugin follows [Semantic Versioning].
However, please note that we do not follow [ESLint's Semantic Versioning Policy].
In minor version releases, this plugin may change the sharable configs provided by the plugin or the default behavior of the plugin's rules in order to add features to the plugin. Because we want to add many features to the plugin soon, so that users can easily take advantage of new features in Vue and Nuxt.

According to our policy, any minor update may report more linting errors than the previous release. As such, we recommend using the [tilde (`~`)](https://semver.npmjs.com/#syntax-examples) in `package.json` to guarantee the results of your builds.

[Semantic Versioning]: https://semver.org/
[ESLint's Semantic Versioning Policy]: https://github.com/eslint/eslint#semantic-versioning-policy

## :newspaper: Changelog

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/attribute-hyphenation.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ since: v3.9.0

> enforce attribute naming style on custom components in template

- :gear: This rule is included in all of `"plugin:vue/vue3-strongly-recommended"`, `*.configs["flat/strongly-recommended"]`, `"plugin:vue/strongly-recommended"`, `*.configs["flat/vue2-strongly-recommended"]`, `"plugin:vue/vue3-recommended"`, `*.configs["flat/recommended"]`, `"plugin:vue/recommended"` and `*.configs["flat/vue2-recommended"]`.
- :gear: This rule is included in all of `"plugin:vue/strongly-recommended"`, `*.configs["flat/strongly-recommended"]`, `"plugin:vue/vue2-strongly-recommended"`, `*.configs["flat/vue2-strongly-recommended"]`, `"plugin:vue/recommended"`, `*.configs["flat/recommended"]`, `"plugin:vue/vue2-recommended"` and `*.configs["flat/vue2-recommended"]`.
- :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fix-problems) can automatically fix some of the problems reported by this rule.

## :book: Rule Details
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/attributes-order.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ since: v4.3.0

> enforce order of attributes

- :gear: This rule is included in all of `"plugin:vue/vue3-recommended"`, `*.configs["flat/recommended"]`, `"plugin:vue/recommended"` and `*.configs["flat/vue2-recommended"]`.
- :gear: This rule is included in all of `"plugin:vue/recommended"`, `*.configs["flat/recommended"]`, `"plugin:vue/vue2-recommended"` and `*.configs["flat/vue2-recommended"]`.
- :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fix-problems) can automatically fix some of the problems reported by this rule.

## :book: Rule Details
Expand Down
1 change: 1 addition & 0 deletions docs/rules/block-order.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ since: v9.16.0

> enforce order of component top-level elements

- :gear: This rule is included in all of `"plugin:vue/recommended"`, `*.configs["flat/recommended"]`, `"plugin:vue/vue2-recommended"` and `*.configs["flat/vue2-recommended"]`.
- :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fix-problems) can automatically fix some of the problems reported by this rule.

## :book: Rule Details
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/comment-directive.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ since: v4.1.0

> support comment-directives in `<template>`

- :gear: This rule is included in all of `"plugin:vue/base"`, `*.configs["flat/base"]`, `"plugin:vue/essential"`, `*.configs["flat/vue2-essential"]`, `"plugin:vue/vue3-essential"`, `*.configs["flat/essential"]`, `"plugin:vue/strongly-recommended"`, `*.configs["flat/vue2-strongly-recommended"]`, `"plugin:vue/vue3-strongly-recommended"`, `*.configs["flat/strongly-recommended"]`, `"plugin:vue/recommended"`, `*.configs["flat/vue2-recommended"]`, `"plugin:vue/vue3-recommended"` and `*.configs["flat/recommended"]`.
- :gear: This rule is included in all of `"plugin:vue/base"`, `*.configs["flat/base"]`, `"plugin:vue/vue2-essential"`, `*.configs["flat/vue2-essential"]`, `"plugin:vue/essential"`, `*.configs["flat/essential"]`, `"plugin:vue/vue2-strongly-recommended"`, `*.configs["flat/vue2-strongly-recommended"]`, `"plugin:vue/strongly-recommended"`, `*.configs["flat/strongly-recommended"]`, `"plugin:vue/vue2-recommended"`, `*.configs["flat/vue2-recommended"]`, `"plugin:vue/recommended"` and `*.configs["flat/recommended"]`.

Sole purpose of this rule is to provide `eslint-disable` functionality in the `<template>` and in the block level.
It supports usage of the following comments:
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/component-definition-name-casing.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ since: v7.0.0

> enforce specific casing for component definition name

- :gear: This rule is included in all of `"plugin:vue/vue3-strongly-recommended"`, `*.configs["flat/strongly-recommended"]`, `"plugin:vue/strongly-recommended"`, `*.configs["flat/vue2-strongly-recommended"]`, `"plugin:vue/vue3-recommended"`, `*.configs["flat/recommended"]`, `"plugin:vue/recommended"` and `*.configs["flat/vue2-recommended"]`.
- :gear: This rule is included in all of `"plugin:vue/strongly-recommended"`, `*.configs["flat/strongly-recommended"]`, `"plugin:vue/vue2-strongly-recommended"`, `*.configs["flat/vue2-strongly-recommended"]`, `"plugin:vue/recommended"`, `*.configs["flat/recommended"]`, `"plugin:vue/vue2-recommended"` and `*.configs["flat/vue2-recommended"]`.
- :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fix-problems) can automatically fix some of the problems reported by this rule.

Define a style for component definition name casing for consistency purposes.
Expand Down
4 changes: 1 addition & 3 deletions docs/rules/component-tags-order.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ since: v6.1.0

> enforce order of component top-level elements

- :no_entry_sign: This rule was **deprecated** and replaced by [vue/block-order](block-order.md) rule.
- :gear: This rule is included in all of `"plugin:vue/vue3-recommended"`, `*.configs["flat/recommended"]`, `"plugin:vue/recommended"` and `*.configs["flat/vue2-recommended"]`.
- :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fix-problems) can automatically fix some of the problems reported by this rule.
- :no_entry: This rule was **removed** in eslint-plugin-vue v10.0.0 and replaced by [vue/block-order](block-order.md) rule.

## :book: Rule Details

Expand Down
2 changes: 1 addition & 1 deletion docs/rules/first-attribute-linebreak.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ since: v8.0.0

> enforce the location of first attribute

- :gear: This rule is included in all of `"plugin:vue/vue3-strongly-recommended"`, `*.configs["flat/strongly-recommended"]`, `"plugin:vue/strongly-recommended"`, `*.configs["flat/vue2-strongly-recommended"]`, `"plugin:vue/vue3-recommended"`, `*.configs["flat/recommended"]`, `"plugin:vue/recommended"` and `*.configs["flat/vue2-recommended"]`.
- :gear: This rule is included in all of `"plugin:vue/strongly-recommended"`, `*.configs["flat/strongly-recommended"]`, `"plugin:vue/vue2-strongly-recommended"`, `*.configs["flat/vue2-strongly-recommended"]`, `"plugin:vue/recommended"`, `*.configs["flat/recommended"]`, `"plugin:vue/vue2-recommended"` and `*.configs["flat/vue2-recommended"]`.
- :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fix-problems) can automatically fix some of the problems reported by this rule.

## :book: Rule Details
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/html-closing-bracket-newline.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ since: v4.1.0

> require or disallow a line break before tag's closing brackets

- :gear: This rule is included in all of `"plugin:vue/vue3-strongly-recommended"`, `*.configs["flat/strongly-recommended"]`, `"plugin:vue/strongly-recommended"`, `*.configs["flat/vue2-strongly-recommended"]`, `"plugin:vue/vue3-recommended"`, `*.configs["flat/recommended"]`, `"plugin:vue/recommended"` and `*.configs["flat/vue2-recommended"]`.
- :gear: This rule is included in all of `"plugin:vue/strongly-recommended"`, `*.configs["flat/strongly-recommended"]`, `"plugin:vue/vue2-strongly-recommended"`, `*.configs["flat/vue2-strongly-recommended"]`, `"plugin:vue/recommended"`, `*.configs["flat/recommended"]`, `"plugin:vue/vue2-recommended"` and `*.configs["flat/vue2-recommended"]`.
- :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fix-problems) can automatically fix some of the problems reported by this rule.

People have their own preference about the location of closing brackets.
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/html-closing-bracket-spacing.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ since: v4.1.0

> require or disallow a space before tag's closing brackets

- :gear: This rule is included in all of `"plugin:vue/vue3-strongly-recommended"`, `*.configs["flat/strongly-recommended"]`, `"plugin:vue/strongly-recommended"`, `*.configs["flat/vue2-strongly-recommended"]`, `"plugin:vue/vue3-recommended"`, `*.configs["flat/recommended"]`, `"plugin:vue/recommended"` and `*.configs["flat/vue2-recommended"]`.
- :gear: This rule is included in all of `"plugin:vue/strongly-recommended"`, `*.configs["flat/strongly-recommended"]`, `"plugin:vue/vue2-strongly-recommended"`, `*.configs["flat/vue2-strongly-recommended"]`, `"plugin:vue/recommended"`, `*.configs["flat/recommended"]`, `"plugin:vue/vue2-recommended"` and `*.configs["flat/vue2-recommended"]`.
- :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fix-problems) can automatically fix some of the problems reported by this rule.

## :book: Rule Details
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/html-end-tags.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ since: v3.0.0

> enforce end tag style

- :gear: This rule is included in all of `"plugin:vue/vue3-strongly-recommended"`, `*.configs["flat/strongly-recommended"]`, `"plugin:vue/strongly-recommended"`, `*.configs["flat/vue2-strongly-recommended"]`, `"plugin:vue/vue3-recommended"`, `*.configs["flat/recommended"]`, `"plugin:vue/recommended"` and `*.configs["flat/vue2-recommended"]`.
- :gear: This rule is included in all of `"plugin:vue/strongly-recommended"`, `*.configs["flat/strongly-recommended"]`, `"plugin:vue/vue2-strongly-recommended"`, `*.configs["flat/vue2-strongly-recommended"]`, `"plugin:vue/recommended"`, `*.configs["flat/recommended"]`, `"plugin:vue/vue2-recommended"` and `*.configs["flat/vue2-recommended"]`.
- :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fix-problems) can automatically fix some of the problems reported by this rule.

## :book: Rule Details
Expand Down
2 changes: 1 addition & 1 deletion docs/rules/html-indent.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ since: v3.14.0

> enforce consistent indentation in `<template>`

- :gear: This rule is included in all of `"plugin:vue/vue3-strongly-recommended"`, `*.configs["flat/strongly-recommended"]`, `"plugin:vue/strongly-recommended"`, `*.configs["flat/vue2-strongly-recommended"]`, `"plugin:vue/vue3-recommended"`, `*.configs["flat/recommended"]`, `"plugin:vue/recommended"` and `*.configs["flat/vue2-recommended"]`.
- :gear: This rule is included in all of `"plugin:vue/strongly-recommended"`, `*.configs["flat/strongly-recommended"]`, `"plugin:vue/vue2-strongly-recommended"`, `*.configs["flat/vue2-strongly-recommended"]`, `"plugin:vue/recommended"`, `*.configs["flat/recommended"]`, `"plugin:vue/vue2-recommended"` and `*.configs["flat/vue2-recommended"]`.
- :wrench: The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fix-problems) can automatically fix some of the problems reported by this rule.

## :book: Rule Details
Expand Down
Loading
Loading