forked from CorentinTh/it-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.eslintrc.cjs
More file actions
31 lines (29 loc) · 885 Bytes
/
Copy path.eslintrc.cjs
File metadata and controls
31 lines (29 loc) · 885 Bytes
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
/**
* @type {import('eslint').Linter.Config}
*/
module.exports = {
root: true,
extends: ['@antfu', './.eslintrc-auto-import.json', '@unocss'],
rules: {
'curly': ['error', 'all'],
'@typescript-eslint/semi': ['error', 'always'],
'@typescript-eslint/no-use-before-define': ['error', { allowNamedExports: true, functions: false }],
'vue/no-empty-component-block': ['error'],
'no-restricted-imports': ['error', {
paths: [{
name: '@vueuse/core',
importNames: ['useClipboard'],
message: 'Please use local useCopy from src/composable/copy.ts instead of useClipboard.',
}],
}],
},
overrides: [
{
// The API runs on Node, where reading configuration from `process.env` is the norm.
files: ['server/**/*.ts', 'api/**/*.ts'],
rules: {
'n/prefer-global/process': 'off',
},
},
],
};