forked from onetimesecret/onetimesecret
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheslint.config.mjs
36 lines (35 loc) · 949 Bytes
/
eslint.config.mjs
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
// https://eslint.org/docs/latest/use/getting-started
// Run manually: pnpm run lint
import globals from 'globals';
import pluginJs from '@eslint/js';
import tseslint from 'typescript-eslint';
import pluginVue from 'eslint-plugin-vue';
export default [
// Ignore everything except src directory
{
ignores: ['**/**', '!src/**', '!vite.config.ts'],
},
{
files: ['src/**/*.{js,mjs,cjs,ts,vue}', 'vite.config.ts'],
},
{
languageOptions: { globals: globals.browser },
},
...tseslint.configs.recommended,
...pluginVue.configs['flat/essential'],
{
files: ['src/**/*.vue'],
languageOptions: {
parserOptions: {
parser: tseslint.parser,
},
},
},
// Directly integrate what would have been an override
{
files: ["src/views/*.vue", "src/layouts/*.vue"], // Target files in the views directory
rules: {
"vue/multi-word-component-names": "off" // Turn off the rule
}
}
];