Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion lib/configs/base.js → lib/configs/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file has been automatically generated,
* in order to update its content execute "npm run update"
*/
module.exports = {
export default {
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module'
Expand Down
11 changes: 7 additions & 4 deletions lib/configs/flat/base.js → lib/configs/flat/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@
* This file has been automatically generated,
* in order to update its content execute "npm run update"
*/
module.exports = [
import plugin from '../../plugin.ts'
import vueParser from 'vue-eslint-parser'

export default [
{
name: 'vue/base/setup',
plugins: {
get vue() {
return require('../../plugin.ts').default
return plugin
}
},
languageOptions: {
Expand All @@ -20,11 +23,11 @@ module.exports = [
files: ['*.vue', '**/*.vue'],
plugins: {
get vue() {
return require('../../plugin.ts').default
return plugin
}
},
languageOptions: {
parser: require('vue-eslint-parser'),
parser: vueParser,
sourceType: 'module'
},
rules: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
* This file has been automatically generated,
* in order to update its content execute "npm run update"
*/
'use strict'
const config = require('./base.js')
import config from './base.ts'

module.exports = [
export default [
...config,
{
name: 'vue/vue2-essential/rules',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
* This file has been automatically generated,
* in order to update its content execute "npm run update"
*/
'use strict'
const config = require('./vue2-strongly-recommended-error.js')
import config from './vue2-strongly-recommended-error.ts'

module.exports = [
export default [
...config,
{
name: 'vue/vue2-recommended-error/rules',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
* This file has been automatically generated,
* in order to update its content execute "npm run update"
*/
'use strict'
const config = require('./vue2-strongly-recommended.js')
import config from './vue2-strongly-recommended.ts'

module.exports = [
export default [
...config,
{
name: 'vue/vue2-recommended/rules',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
* This file has been automatically generated,
* in order to update its content execute "npm run update"
*/
'use strict'
const config = require('./vue2-essential.js')
import config from './vue2-essential.ts'

module.exports = [
export default [
...config,
{
name: 'vue/vue2-strongly-recommended-error/rules',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
* This file has been automatically generated,
* in order to update its content execute "npm run update"
*/
'use strict'
const config = require('./vue2-essential.js')
import config from './vue2-essential.ts'

module.exports = [
export default [
...config,
{
name: 'vue/vue2-strongly-recommended/rules',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
* This file has been automatically generated,
* in order to update its content execute "npm run update"
*/
'use strict'
const config = require('./base.js')
import config from './base.ts'

module.exports = [
export default [
...config,
{
name: 'vue/essential/rules',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
* This file has been automatically generated,
* in order to update its content execute "npm run update"
*/
'use strict'
const config = require('./vue3-strongly-recommended-error.js')
import config from './vue3-strongly-recommended-error.ts'

module.exports = [
export default [
...config,
{
name: 'vue/recommended-error/rules',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
* This file has been automatically generated,
* in order to update its content execute "npm run update"
*/
'use strict'
const config = require('./vue3-strongly-recommended.js')
import config from './vue3-strongly-recommended.ts'

module.exports = [
export default [
...config,
{
name: 'vue/recommended/rules',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
* This file has been automatically generated,
* in order to update its content execute "npm run update"
*/
'use strict'
const config = require('./vue3-essential.js')
import config from './vue3-essential.ts'

module.exports = [
export default [
...config,
{
name: 'vue/strongly-recommended-error/rules',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
* This file has been automatically generated,
* in order to update its content execute "npm run update"
*/
'use strict'
const config = require('./vue3-essential.js')
import config from './vue3-essential.ts'

module.exports = [
export default [
...config,
{
name: 'vue/strongly-recommended/rules',
Expand Down
36 changes: 0 additions & 36 deletions lib/configs/index.js

This file was deleted.

60 changes: 60 additions & 0 deletions lib/configs/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import base from './base.ts'
import vue2Essential from './vue2-essential.ts'
import vue2StronglyRecommended from './vue2-strongly-recommended.ts'
import vue2StronglyRecommendedError from './vue2-strongly-recommended-error.ts'
import vue2Recommended from './vue2-recommended.ts'
import vue2RecommendedError from './vue2-recommended-error.ts'
import vue3Essential from './vue3-essential.ts'
import vue3StronglyRecommended from './vue3-strongly-recommended.ts'
import vue3StronglyRecommendedError from './vue3-strongly-recommended-error.ts'
import vue3Recommended from './vue3-recommended.ts'
import vue3RecommendedError from './vue3-recommended-error.ts'
import flatBase from './flat/base.ts'
import flatVue2Essential from './flat/vue2-essential.ts'
import flatVue2StronglyRecommended from './flat/vue2-strongly-recommended.ts'
import flatVue2StronglyRecommendedError from './flat/vue2-strongly-recommended-error.ts'
import flatVue2Recommended from './flat/vue2-recommended.ts'
import flatVue2RecommendedError from './flat/vue2-recommended-error.ts'
import flatVue3Essential from './flat/vue3-essential.ts'
import flatVue3StronglyRecommended from './flat/vue3-strongly-recommended.ts'
import flatVue3StronglyRecommendedError from './flat/vue3-strongly-recommended-error.ts'
import flatVue3Recommended from './flat/vue3-recommended.ts'
import flatVue3RecommendedError from './flat/vue3-recommended-error.ts'
import noLayoutRules from './no-layout-rules.ts'

const configs = {
// eslintrc configs
base,

'vue2-essential': vue2Essential,
'vue2-strongly-recommended': vue2StronglyRecommended,
'vue2-strongly-recommended-error': vue2StronglyRecommendedError,
'vue2-recommended': vue2Recommended,
'vue2-recommended-error': vue2RecommendedError,

essential: vue3Essential,
'strongly-recommended': vue3StronglyRecommended,
'strongly-recommended-error': vue3StronglyRecommendedError,
recommended: vue3Recommended,
'recommended-error': vue3RecommendedError,

// flat configs
'flat/base': flatBase,

'flat/vue2-essential': flatVue2Essential,
'flat/vue2-strongly-recommended': flatVue2StronglyRecommended,
'flat/vue2-strongly-recommended-error': flatVue2StronglyRecommendedError,
'flat/vue2-recommended': flatVue2Recommended,
'flat/vue2-recommended-error': flatVue2RecommendedError,

'flat/essential': flatVue3Essential,
'flat/strongly-recommended': flatVue3StronglyRecommended,
'flat/strongly-recommended-error': flatVue3StronglyRecommendedError,
'flat/recommended': flatVue3Recommended,
'flat/recommended-error': flatVue3RecommendedError,

// config-format-agnostic configs
'no-layout-rules': noLayoutRules
}

export default configs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file has been automatically generated,
* in order to update its content execute "npm run update"
*/
module.exports = {
export default {
rules: {
'vue/array-bracket-newline': 'off',
'vue/array-bracket-spacing': 'off',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file has been automatically generated,
* in order to update its content execute "npm run update"
*/
module.exports = {
export default {
extends: require.resolve('./base'),
rules: {
'vue/multi-word-component-names': 'error',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file has been automatically generated,
* in order to update its content execute "npm run update"
*/
module.exports = {
export default {
extends: require.resolve('./vue2-strongly-recommended-error'),
rules: {
'vue/attributes-order': 'error',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file has been automatically generated,
* in order to update its content execute "npm run update"
*/
module.exports = {
export default {
extends: require.resolve('./vue2-strongly-recommended'),
rules: {
'vue/attributes-order': 'warn',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file has been automatically generated,
* in order to update its content execute "npm run update"
*/
module.exports = {
export default {
extends: require.resolve('./vue2-essential'),
rules: {
'vue/attribute-hyphenation': 'error',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file has been automatically generated,
* in order to update its content execute "npm run update"
*/
module.exports = {
export default {
extends: require.resolve('./vue2-essential'),
rules: {
'vue/attribute-hyphenation': 'warn',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file has been automatically generated,
* in order to update its content execute "npm run update"
*/
module.exports = {
export default {
extends: require.resolve('./base'),
rules: {
'vue/multi-word-component-names': 'error',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file has been automatically generated,
* in order to update its content execute "npm run update"
*/
module.exports = {
export default {
extends: require.resolve('./vue3-strongly-recommended-error'),
rules: {
'vue/attributes-order': 'error',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file has been automatically generated,
* in order to update its content execute "npm run update"
*/
module.exports = {
export default {
extends: require.resolve('./vue3-strongly-recommended'),
rules: {
'vue/attributes-order': 'warn',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file has been automatically generated,
* in order to update its content execute "npm run update"
*/
module.exports = {
export default {
extends: require.resolve('./vue3-essential'),
rules: {
'vue/attribute-hyphenation': 'error',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* This file has been automatically generated,
* in order to update its content execute "npm run update"
*/
module.exports = {
export default {
extends: require.resolve('./vue3-essential'),
rules: {
'vue/attribute-hyphenation': 'warn',
Expand Down
2 changes: 1 addition & 1 deletion lib/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import configs from './configs/index.js'
import configs from './configs/index.ts'
import plugin from './plugin.ts'

export default Object.assign(plugin, { configs })
2 changes: 1 addition & 1 deletion tools/generate-typegen.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fs from 'node:fs/promises'
import { pluginsToRulesDTS } from 'eslint-typegen/core'
import plugin from '../lib/index.ts'
import plugin from '../lib/plugin.ts'

const dts = await pluginsToRulesDTS(
{
Expand Down
Loading
Loading