forked from jfmartinez4/stac-browser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
103 lines (92 loc) · 2.93 KB
/
Copy patheslint.config.js
File metadata and controls
103 lines (92 loc) · 2.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
import js from '@eslint/js';
import pluginVue from 'eslint-plugin-vue';
import globals from 'globals'; // Import globals package
export default [
// Apply to JavaScript and Vue files
{
files: ['**/*.{js,mjs,cjs,vue}'],
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
globals: {
...globals.browser,
// Your custom globals
STAC_BROWSER_VERSION: 'readonly',
CONFIG_PATH: 'readonly',
CONFIG_CLI: 'readonly',
CONFIG: 'readonly'
}
}
},
// ESLint recommended rules
js.configs.recommended,
// Vue 3 strongly recommended rules
...pluginVue.configs['flat/strongly-recommended'],
// Custom rules
{
rules: {
// General JavaScript rules
'curly': [1, 'all'],
'semi': [1, 'always'],
// Vue component naming
'vue/multi-word-component-names': 'off',
'vue/singleline-html-element-content-newline': 'off',
'vue/attribute-hyphenation': 'off',
// Vue formatting
'vue/max-attributes-per-line': ['error', {
'singleline': {
'max': 6
},
'multiline': {
'max': 4
}
}],
// Component structure
'vue/block-order': ['error', {
'order': ['template', 'script', 'style']
}],
'vue/this-in-template': 'error',
// Vue 3 specific
'vue/no-v-model-argument': 'off',
'vue/require-explicit-emits': 'warn',
'vue/v-on-event-hyphenation': 'warn',
'vue/prefer-import-from-vue': 'error',
// Vue 2 to Vue 3 migration warnings (no longer deprecated)
'vue/no-deprecated-v-on-native-modifier': 'error',
'vue/no-deprecated-v-bind-sync': 'error',
'vue/no-deprecated-destroyed-lifecycle': 'error',
'vue/no-deprecated-dollar-listeners-api': 'error',
'vue/no-deprecated-events-api': 'error',
'vue/no-deprecated-filter': 'error',
'vue/no-deprecated-functional-template': 'error',
'vue/no-deprecated-html-element-is': 'error',
'vue/no-deprecated-inline-template': 'error',
'vue/no-deprecated-props-default-this': 'error',
'vue/no-deprecated-router-link-tag-prop': 'error',
'vue/no-deprecated-scope-attribute': 'error',
'vue/no-deprecated-slot-attribute': 'error',
'vue/no-deprecated-slot-scope-attribute': 'error',
'vue/no-deprecated-v-is': 'error',
'vue/no-deprecated-vue-config-keycodes': 'error',
// Code quality
'vue/no-unused-vars': 'warn',
'vue/no-unused-components': 'warn',
'vue/require-default-prop': 'warn',
'vue/no-undef-properties': 'off',
'vue/no-empty-component-block': 'warn',
'vue/no-reserved-component-names': 'warn'
}
},
// Ignore patterns
{
ignores: [
'**/stac-fields/**',
'**/stac-migrate/**',
'**/stac-layer/**',
'config.js',
'*.config.js',
'dist/**',
'node_modules/**'
]
}
];