mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-11-21 01:13:16 +08:00
99 lines
2.3 KiB
JavaScript
99 lines
2.3 KiB
JavaScript
module.exports = {
|
|
extends: ['plugin:markdown/recommended-legacy', 'prettier'],
|
|
overrides: [
|
|
{
|
|
files: '*.mjs',
|
|
parserOptions: {
|
|
sourceType: 'module',
|
|
ecmaVersion: 'latest'
|
|
}
|
|
},
|
|
{
|
|
files: '*.vue',
|
|
extends: [
|
|
'@vue/typescript/recommended',
|
|
'plugin:vue/vue3-recommended',
|
|
'@vue/typescript'
|
|
]
|
|
},
|
|
{
|
|
files: ['*.vue', '*.js'],
|
|
extends: ['plugin:vue/essential', '@vue/standard'],
|
|
rules: {
|
|
'vue/multiline-html-element-content-newline': 0,
|
|
'vue/multi-word-component-names': 0,
|
|
'vue/max-attributes-per-line': [
|
|
2,
|
|
{
|
|
singleline: 20,
|
|
multiline: 1
|
|
}
|
|
],
|
|
'vue/require-default-prop': 0,
|
|
'vue/no-multiple-template-root': 0,
|
|
'vue/no-lone-template': 0,
|
|
'vue/no-v-model-argument': 0,
|
|
'vue/one-component-per-file': 0,
|
|
'import/no-cycle': 1
|
|
}
|
|
},
|
|
{
|
|
files: ['*.ts', '*.tsx'],
|
|
extends: ['love', 'plugin:import/typescript'],
|
|
parserOptions: {
|
|
project: './tsconfig.json',
|
|
ecmaFeatures: {
|
|
jsx: true
|
|
}
|
|
},
|
|
rules: {
|
|
'@typescript-eslint/strict-boolean-expressions': 0,
|
|
'@typescript-eslint/prefer-nullish-coalescing': 0,
|
|
'@typescript-eslint/naming-convention': 0,
|
|
'multiline-ternary': 0,
|
|
'no-void': 0,
|
|
'import/no-cycle': 1
|
|
}
|
|
},
|
|
{
|
|
files: ['light.ts'],
|
|
rules: {
|
|
'@typescript-eslint/explicit-module-boundary-types': 0,
|
|
'@typescript-eslint/explicit-function-return-type': 0
|
|
}
|
|
},
|
|
{
|
|
files: '**/*.md/*.js',
|
|
rules: {
|
|
'no-undef': 0
|
|
}
|
|
},
|
|
{
|
|
files: ['**/*.md/*.ts'],
|
|
processor: 'markdown/markdown',
|
|
rules: {
|
|
'import/order': 0,
|
|
'prettier/prettier': 0,
|
|
'@typescript-eslint/consistent-type-definitions': 0
|
|
}
|
|
},
|
|
{
|
|
files: ['*.spec.ts', '*.spec.js'],
|
|
globals: {
|
|
describe: 'readonly',
|
|
it: 'readonly',
|
|
expect: 'readonly'
|
|
},
|
|
rules: {
|
|
'@typescript-eslint/no-floating-promises': 0
|
|
}
|
|
},
|
|
{
|
|
files: '*',
|
|
globals: {
|
|
__DEV__: 'readonly'
|
|
}
|
|
}
|
|
]
|
|
}
|