@flexent/eslint-config-vue 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.mjs +54 -0
  2. package/package.json +20 -0
package/index.mjs ADDED
@@ -0,0 +1,54 @@
1
+ import pluginVue from 'eslint-plugin-vue';
2
+ import globals from 'globals';
3
+ import vueParser from 'vue-eslint-parser';
4
+
5
+ export const vueConfigs = [
6
+ ...pluginVue.configs['flat/recommended'],
7
+ {
8
+ files: ['**/*.vue'],
9
+ languageOptions: {
10
+ parser: vueParser,
11
+ parserOptions: {
12
+ parser: '@typescript-eslint/parser',
13
+ ecmaVersion: 2022,
14
+ sourceType: 'module',
15
+ modules: true,
16
+ },
17
+ globals: {
18
+ ...globals.node,
19
+ ...globals.browser,
20
+ },
21
+ },
22
+ rules: {
23
+ 'vue/attribute-hyphenation': ['error', 'never'],
24
+ 'vue/attributes-order': 'error',
25
+ 'vue/component-definition-name-casing': ['error', 'PascalCase'],
26
+ 'vue/first-attribute-linebreak': 'error',
27
+ 'vue/html-closing-bracket-newline': ['error', { singleline: 'never', multiline: 'never' }],
28
+ 'vue/html-closing-bracket-spacing': 'error',
29
+ 'vue/html-end-tags': 'error',
30
+ 'vue/html-indent': ['error', 4, { alignAttributesVertically: false }],
31
+ 'vue/html-self-closing': ['error', { html: { void: 'always' } }],
32
+ 'vue/max-attributes-per-line': ['error', { singleline: { max: 6 }, multiline: { max: 1 } }],
33
+ 'vue/multi-word-component-names': 'off',
34
+ 'vue/multiline-html-element-content-newline': 'off',
35
+ 'vue/no-multi-spaces': 'error',
36
+ 'vue/no-mutating-props': 'off',
37
+ 'vue/no-template-shadow': 'off',
38
+ 'vue/no-v-html': 'off',
39
+ 'vue/order-in-components': 'error',
40
+ 'vue/padding-line-between-blocks': ['error', 'always'],
41
+ 'vue/padding-lines-in-component-definition': ['error', {
42
+ betweenOptions: 'always',
43
+ withinOption: 'ignore',
44
+ groupSingleLineProperties: false,
45
+ }],
46
+ 'vue/prefer-import-from-vue': 'off',
47
+ 'vue/prop-name-casing': 'error',
48
+ 'vue/require-default-prop': 'off',
49
+ 'vue/require-prop-types': 'off',
50
+ 'vue/singleline-html-element-content-newline': 'off',
51
+ 'vue/v-on-event-hyphenation': ['error', 'never'],
52
+ },
53
+ },
54
+ ];
package/package.json ADDED
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@flexent/eslint-config-vue",
3
+ "version": "2.0.0",
4
+ "description": "Vue SFC ESLint rules for Flexent (extends @flexent/eslint-config)",
5
+ "type": "module",
6
+ "exports": {
7
+ ".": "./index.mjs"
8
+ },
9
+ "files": [
10
+ "index.mjs"
11
+ ],
12
+ "peerDependencies": {
13
+ "eslint": ">=9",
14
+ "eslint-plugin-vue": "^10.8.0"
15
+ },
16
+ "dependencies": {
17
+ "globals": "^14.0.0",
18
+ "vue-eslint-parser": "^10.4.0"
19
+ }
20
+ }