38 lines
885 B
JavaScript
38 lines
885 B
JavaScript
import js from '@eslint/js'
|
|
import prettier from 'eslint-config-prettier'
|
|
import globals from 'globals'
|
|
import vue from 'eslint-plugin-vue'
|
|
import tseslint from 'typescript-eslint'
|
|
|
|
export default tseslint.config(
|
|
{ ignores: ['dist/**', 'dist-demo/**', 'coverage/**', 'node_modules/**'] },
|
|
js.configs.recommended,
|
|
...tseslint.configs.recommended,
|
|
...vue.configs['flat/essential'],
|
|
{
|
|
files: ['src/**/*.{ts,vue}'],
|
|
languageOptions: {
|
|
globals: globals.browser,
|
|
},
|
|
rules: {
|
|
'max-lines': ['error', { max: 400, skipBlankLines: false, skipComments: false }],
|
|
},
|
|
},
|
|
{
|
|
files: ['scripts/**/*.mjs'],
|
|
languageOptions: {
|
|
globals: globals.node,
|
|
},
|
|
},
|
|
{
|
|
files: ['**/*.vue'],
|
|
languageOptions: {
|
|
parserOptions: {
|
|
parser: tseslint.parser,
|
|
extraFileExtensions: ['.vue'],
|
|
},
|
|
},
|
|
},
|
|
prettier,
|
|
)
|