-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheslint.config.mjs
34 lines (32 loc) · 977 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
// @ts-check
import withNuxt from './.nuxt/eslint.config.mjs'
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'
import { includeIgnoreFile } from '@eslint/compat'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const gitignorePath = path.resolve(__dirname, '.gitignore')
export default withNuxt(
// Your custom configs here
eslintPluginPrettierRecommended,
includeIgnoreFile(gitignorePath),
{
rules: {
'no-console': 'error',
'vue/no-v-html': 'off',
'prettier/prettier': [
'warn',
{
$schema: 'https://json.schemastore.org/prettierrc',
semi: false,
tabWidth: 2,
singleQuote: true,
printWidth: 100,
trailingComma: 'es5',
},
],
},
files: ['**/*.vue', '**/*.js', '**/*.jsx', '**/*.mjs', '**/*.cjs'],
}
)