Skip to content

Commit

Permalink
Add name to flat configs. (#2476)
Browse files Browse the repository at this point in the history
  • Loading branch information
ota-meshi committed Jun 19, 2024
1 parent e95b7bb commit ab88141
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/configs/flat/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
const globals = require('globals')
module.exports = [
{
name: 'vue:base:setup',
plugins: {
get vue() {
return require('../../index')
Expand All @@ -17,6 +18,7 @@ module.exports = [
}
},
{
name: 'vue:base:setup-for-vue',
files: ['*.vue', '**/*.vue'],
plugins: {
get vue() {
Expand Down
1 change: 1 addition & 0 deletions lib/configs/flat/vue2-essential.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const config = require('./base.js')
module.exports = [
...config,
{
name: 'vue:vue2-essential:rules',
rules: {
'vue/multi-word-component-names': 'error',
'vue/no-arrow-functions-in-watch': 'error',
Expand Down
1 change: 1 addition & 0 deletions lib/configs/flat/vue2-recommended.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const config = require('./vue2-strongly-recommended.js')
module.exports = [
...config,
{
name: 'vue:vue2-recommended:rules',
rules: {
'vue/attributes-order': 'warn',
'vue/component-tags-order': 'warn',
Expand Down
1 change: 1 addition & 0 deletions lib/configs/flat/vue2-strongly-recommended.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const config = require('./vue2-essential.js')
module.exports = [
...config,
{
name: 'vue:vue2-strongly-recommended:rules',
rules: {
'vue/attribute-hyphenation': 'warn',
'vue/component-definition-name-casing': 'warn',
Expand Down
1 change: 1 addition & 0 deletions lib/configs/flat/vue3-essential.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const config = require('./base.js')
module.exports = [
...config,
{
name: 'vue:essential:rules',
rules: {
'vue/multi-word-component-names': 'error',
'vue/no-arrow-functions-in-watch': 'error',
Expand Down
1 change: 1 addition & 0 deletions lib/configs/flat/vue3-recommended.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const config = require('./vue3-strongly-recommended.js')
module.exports = [
...config,
{
name: 'vue:recommended:rules',
rules: {
'vue/attributes-order': 'warn',
'vue/component-tags-order': 'warn',
Expand Down
1 change: 1 addition & 0 deletions lib/configs/flat/vue3-strongly-recommended.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const config = require('./vue3-essential.js')
module.exports = [
...config,
{
name: 'vue:strongly-recommended:rules',
rules: {
'vue/attribute-hyphenation': 'warn',
'vue/component-definition-name-casing': 'warn',
Expand Down
3 changes: 3 additions & 0 deletions tools/update-lib-flat-configs.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ function formatCategory(category) {
const globals = require('globals')
module.exports = [
{
name: 'vue:base:setup',
plugins: {
get vue() {
return require('../../index')
Expand All @@ -69,6 +70,7 @@ module.exports = [
}
},
{
name: 'vue:base:setup-for-vue',
files: ['*.vue', '**/*.vue'],
plugins: {
get vue() {
Expand Down Expand Up @@ -97,6 +99,7 @@ const config = require('./${extendsCategoryId}.js')
module.exports = [
...config,
{
name: 'vue:${category.categoryId.replace(/^vue3-/u, '')}:rules',
rules: ${formatRules(category.rules, category.categoryId)},
}
]
Expand Down

0 comments on commit ab88141

Please sign in to comment.